/* CSS Variables for theming */
:root {
    /* Colors */
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #4cc9f0;
    --accent: #7209b7;
    --warning: #f72585;
    --danger: #e63946;
    --success: #2ecc71;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --background: #ffffff;
    --text: #333333;
    --border: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --header-bg: #f8f9fa;
    --footer-bg: #f8f9fa;
    
    /* Typography */
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --line-height: 1.6;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Borders */
    --border-radius: 8px;
    --border-radius-lg: 15px;
    --border-width: 1px;
    
    /* Transitions */
    --transition-fast: 0.15s;
    --transition-base: 0.3s;
    --transition-slow: 0.5s;
}

/* Dark mode variables */
.dark-mode {
    --background: #121212;
    --text: #f8f9fa;
    --border: #495057;
    --shadow: rgba(255, 255, 255, 0.05);
    --card-bg: #1e1e1e;
    --input-bg: #2d2d2d;
    --header-bg: #1a1a1a;
    --footer-bg: #1a1a1a;
}

/* High contrast mode */
.high-contrast {
    --primary: #0000ff;
    --primary-dark: #00008b;
    --secondary: #00ffff;
    --accent: #800080;
    --warning: #ff0000;
    --danger: #8b0000;
    --success: #008000;
    --light: #ffffff;
    --dark: #000000;
    --gray: #808080;
    --background: #ffffff;
    --text: #000000;
    --border: #000000;
    --shadow: rgba(0, 0, 0, 0.8);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --header-bg: #eeeeee;
    --footer-bg: #eeeeee;
    --border-width: 2px;
}

.high-contrast.dark-mode {
    --background: #000000;
    --text: #ffffff;
    --border: #ffffff;
    --shadow: rgba(255, 255, 255, 0.8);
    --card-bg: #000000;
    --input-bg: #222222;
    --header-bg: #111111;
    --footer-bg: #111111;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    color: var(--text);
    background-color: var(--background);
    padding: var(--spacing-lg);
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--spacing-sm);
    z-index: 10000;
    transition: top var(--transition-base);
    text-decoration: none;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-nav:focus {
    top: 0;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--header-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px var(--shadow);
    position: relative;
}

h1 {
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
    font-size: 2.5rem;
}

.description {
    color: var(--text);
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    font-size: 1.1rem;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.control-btn-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
}

.tab {
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    background: var(--card-bg);
    border: none;
    flex-grow: 1;
    text-align: center;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    min-width: 120px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab:hover:not(.active) {
    background: var(--input-bg);
}

.tab:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: -2px;
    z-index: 1;
}

/* Tab panels */
.tab-content {
    display: none;
    padding: var(--spacing-xl);
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 5px 15px var(--shadow);
    animation: fadeIn var(--transition-base) ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Forms */
.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.form-group .error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: var(--spacing-xs);
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger);
}

.form-group.error .error-message {
    display: block;
}

label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: var(--border-width) solid var(--border);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Buttons */
button {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary);
    color: white;
    border: var(--border-width) solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    min-height: 44px; /* Minimum touch target size */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

button:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

button.secondary {
    background: var(--accent);
}

button.secondary:hover {
    background: #5a08a1;
}

button.success {
    background: var(--success);
}

button.success:hover {
    background: #25a25a;
}

button.warning {
    background: var(--warning);
}

button.warning:hover {
    background: #d11467;
}

button.danger {
    background: var(--danger);
}

button.danger:hover {
    background: #c82332;
}

/* List items */
[class*="-item"] {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--input-bg);
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--border);
    transition: all var(--transition-base);
}

[class*="-item"]:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.grade-item-content, .course-item-content {
    flex-grow: 1;
    margin-right: var(--spacing-md);
}

/* Action buttons */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray);
    transition: var(--transition-base);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Footer */
footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    color: var(--text);
    opacity: 0.7;
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    border-radius: var(--border-radius);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text);
    opacity: 0.7;
    font-style: italic;
}

/* Info boxes */
.info-box {
    background: var(--input-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
    border-left: 4px solid var(--primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: var(--spacing-sm);
    background: var(--primary);
    color: white;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--success);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(150%);
    transition: transform var(--transition-base) ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: var(--danger);
}

.notification.warning {
    background: var(--warning);
}

/* Charts */
.chart-container {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px var(--shadow);
    position: relative;
    min-height: 300px;
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.chart-loading.active {
    opacity: 1;
}

.chart-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    color: var(--primary);
}

.charts-row {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: var(--spacing-xs);
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: var(--light);
    text-align: center;
    border-radius: 6px;
    padding: var(--spacing-xs);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Progress bars */
.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    margin-top: var(--spacing-sm);
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    transition: width var(--transition-base);
}

/* Tables */
.grading-scale-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-sm);
}

.grading-scale-table caption {
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
    text-align: left;
}

.grading-scale-table th,
.grading-scale-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border: 1px solid var(--border);
}

.grading-scale-table th {
    background-color: var(--input-bg);
}

/* Required field indicator */
.required {
    color: var(--danger);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-btn-group {
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .tab {
        padding: var(--spacing-md);
    }
    
    header {
        padding: var(--spacing-lg);
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .grading-system {
        grid-template-columns: 1fr;
    }
    
    .history-controls {
        flex-direction: column;
    }
    
    button {
        min-height: 44px; /* Ensure touch targets are large enough on mobile */
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .tab-content {
        padding: var(--spacing-md);
    }
    
    .chart-container {
        padding: var(--spacing-md);
        min-height: 250px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    .tab-content:not(.active) {
        display: none !important;
    }
    
    .chart-container {
        break-inside: avoid;
    }
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Accessibility */
.skip-nav {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-nav:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 10px;
    background: #4361ee;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
}
.sr-only { /* For screen-reader only text */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* --- Header Styles (for ALL content pages: About, Blog, FAQ, Contact, Terms, Privacy, Services, Donation) --- */
/* This header styling is explicitly NOT for index.html */
header {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex; /* Allows logo image and text to align */
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px; /* Adjust logo image height */
    width: auto;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Mobile Menu Toggle --- */
.mobile-menu-toggle {
    display: none; /* Hidden by default for desktop */
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Main Content Area (for ALL content pages) --- */
main {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 20px;
    min-height: 70vh; /* Push footer down for shorter content */
}

/* --- Footer Styles (Unified for ALL pages) --- */
/* This footer styling is intended to be universal. If index.html uses a different footer structure,
   it will simply not apply there. */
footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-content p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #cbd5e0;
}
.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}
.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: white;
}

/* --- Utility Classes (Buttons) --- */
.btn {
    display: inline-block;
    background: #4361ee;
    color: white !important; /* Ensure button text color is white */
    padding: 0.8rem 1.6rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}
.btn:hover {
    background: #3a0ca3;
    transform: translateY(-2px);
}
.btn i { /* For Font Awesome icons within buttons */
    margin-right: 0.5rem;
}

.btn-secondary { /* Button style for secondary actions */
    background: #6c757d;
    color: white !important;
}
.btn-secondary:hover {
    background: #5a6268;
}

/* --- Page Headers (for About, Blog, FAQ, etc.) --- */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.page-header h1 {
    color: #4361ee;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 2.8rem);
}
.page-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Content Sections (Used on About, Terms, Privacy, Services, and sometimes as general wrappers) --- */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}
.content-section h2 {
    color: #4361ee;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
    font-size: 1.8rem;
}
.content-section h3 {
    color: #3a0ca3;
    margin: 1.8rem 0 1rem 0;
    font-size: 1.4rem;
}
.content-section ul,
.content-section ol {
    margin: 1rem 0 1.5rem 1.5rem;
    padding-left: 0;
}
.content-section li {
    margin-bottom: 0.6rem;
}

/* --- Blog Post & FAQ Item Styles (Used on blog.html and faq.html) --- */
.blog-post { /* Also used for individual FAQ items for consistent styling */
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}
.blog-post h2 {
    color: #4361ee;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}
.blog-post .post-meta { /* For date/author on blog posts */
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: block;
}
.blog-post p {
    margin-bottom: 1rem;
}
.blog-post ol,
.blog-post ul {
    margin: 1rem 0 1.5rem 1.5rem;
    padding-left: 0;
}
.blog-post li {
    margin-bottom: 0.75rem;
}
.blog-post strong {
    color: #3a0ca3;
    font-weight: 600;
}
.blog-post a.btn { /* For read more buttons on blog list page */
    margin-top: 1rem;
}

/* --- Service Cards (Services page) --- */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem 0;
}
.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Allows content and button to stack */
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.service-card h3 { color: #4361ee; margin-bottom: 1rem; font-size: 1.5rem; }
.service-card p { margin-bottom: 1.5rem; flex-grow: 1; } /* Makes cards of equal height */
.service-card ul { text-align: left; margin: 0 0 1.5rem 0; padding-left: 1.2rem; list-style: none; flex-grow: 1; }
.service-card li { margin-bottom: 0.75rem; position: relative; padding-left: 1.2rem; }
.service-card li::before { /* Custom bullet point for service lists */
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro'; /* Ensure Font Awesome is linked in your HTML */
    font-weight: 900; /* For solid icon */
    color: #4361ee;
    position: absolute;
    left: 0;
    top: 2px;
}
.service-card .btn { margin-top: auto; } /* Pushes button to bottom */

/* --- Contact Page Specific Styles --- */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.contact-item {
    text-align: center;
    padding: 1.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.contact-item h3 {
    color: #4361ee;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.contact-item p { font-size: 0.95rem; color: #555; margin-bottom: 1rem; }
.contact-item a.btn { margin-top: 0.5rem; }

/* --- Form Styles (Contact page) --- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
/* Client-side validation styles */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none; /* Hidden by default, shown by JS */
}
input:invalid:not(:placeholder-shown) + .error-message,
textarea:invalid:not(:placeholder-shown) + .error-message {
    display: block;
}
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* --- Donation Page Image Button Style --- */
.donation-options {
    text-align: center;
    margin-top: 2rem;
}
.donation-image-button {
    display: inline-block;
    max-width: 250px; /* Adjust max width as needed */
    height: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    border: 1px solid transparent;
}
.donation-image-button:hover, .donation-image-button:focus {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    outline: none;
    border: 1px solid #4361ee;
}

/* --- General Preview/Demo Sections (can be used on any content page) --- */
.calculator-preview { /* For showing a glimpse of the calculator's features on an About or Services page */
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 2.5rem 0;
}
.calculator-preview h2 { color: #4361ee; text-align: center; margin-bottom: 2.5rem; font-size: 1.8rem; }
.preview-container { /* Grid for preview items */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.preview-item {
    background: #f8f9fa;
    padding: 1.8rem;
    border-radius: 8px;
    border-left: 5px solid #4361ee;
}
.preview-item h3 { color: #4361ee; margin-bottom: 1rem; font-size: 1.3rem; }

.features { /* For listing features with cards on a Services or About page */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.feature-card h3 { color: #4361ee; margin-bottom: 1rem; font-size: 1.3rem; }
.feature-card p { color: #666; font-size: 0.95rem; }

.calculator-demo { /* Call to action section to encourage using the calculator */
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 3rem 0;
}
.calculator-demo h2 { color: white; margin-bottom: 1rem; font-size: 1.8rem; }
.calculator-demo p { margin-bottom: 2rem; opacity: 0.9; font-size: 1.1rem; }


/* ===============================================
    DARK MODE & RESPONSIVE STYLES FOR CONTENT PAGES
===============================================
*/

/* Dark Mode Styles (Triggered by body.dark-mode, assuming a global toggle adds this class to <body>) */
body.dark-mode {
    background-color: #1a202c;
    color: #cbd5e0;
}
body.dark-mode header {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
body.dark-mode .logo a, body.dark-mode nav a { color: #e2e8f0; }
body.dark-mode nav a:hover, body.dark-mode nav a.active { background-color: rgba(255, 255, 255, 0.1); }

body.dark-mode .page-header,
body.dark-mode .content-section,
body.dark-mode .blog-post,
body.dark-mode .calculator-preview,
body.dark-mode .feature-card,
body.dark-mode .service-card {
    background-color: #2d3748;
    color: #cbd5e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
body.dark-mode .page-header h1,
body.dark-mode .content-section h2,
body.dark-mode .blog-post h2,
body.dark-mode .calculator-preview h2,
body.dark-mode .feature-card h3,
body.dark-mode .service-card h3 {
    color: #90cdf4; /* Light blue for headings */
}
body.dark-mode .page-header p,
body.dark-mode .content-section p,
body.dark-mode .blog-post p,
body.dark-mode .feature-card p,
body.dark-mode .service-card p {
    color: #a0aec0;
}
body.dark-mode .content-section h3,
body.dark-mode .blog-post strong {
    color: #bee3f8; /* Even lighter blue */
}
body.dark-mode footer { background: #1a202c; }
body.dark-mode .footer-links a { color: #a0aec0; }
body.dark-mode .footer-links a:hover { color: #e2e8f0; }

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}
body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #90cdf4;
    box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.2);
}

body.dark-mode .contact-item { background: #2d3748; border-color: #4a5568; }
body.dark-mode .contact-item h3 { color: #90cdf4; }
body.dark-mode .contact-item p { color: #a0aec0; }


/* Responsive Design */
@media (max-width: 768px) {
    /* Standard Header Responsive */
    header .header-container {
        flex-direction: row; /* Keep logo and toggle on same line */
        position: relative;
    }
    header nav {
        display: none; /* Hide nav by default */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        right: 0;
        background: #3a0ca3; /* Darker background for dropdown */
        padding: 1rem;
        z-index: 1000;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    header nav.show { /* Class added by JS to show mobile menu */
        display: flex;
    }
    header nav a {
        padding: 0.8rem 1rem;
        text-align: center;
    }
    .mobile-menu-toggle {
        display: block; /* Show toggle button */
    }

    /* General layout adjustments */
    main { margin: 1.5rem auto; padding: 0 15px; }
    .page-header { padding: 1.5rem 1rem; margin-bottom: 2rem; }
    .page-header h1 { font-size: 1.8rem; }
    .page-header p { font-size: 1rem; }
    .content-section, .blog-post, .calculator-preview { padding: 1.5rem; margin-bottom: 2rem; }
    .content-section h2, .blog-post h2, .calculator-preview h2 { font-size: 1.5rem; }
    .footer-links { gap: 0.8rem 1rem; }
    
    /* Responsive grids */
    .service-cards, .contact-info, .preview-container, .features {
        grid-template-columns: 1fr;
    }
    .service-card, .contact-item, .preview-item, .feature-card {
        padding: 1.5rem;
    }

    /* Donation Button */
    .donation-image-button { max-width: 200px; }
}

@media (max-width: 480px) {
    header nav { gap: 0.5rem; } /* Reduce gap further on very small screens */
    .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
}
```http://googleusercontent.com/image_generation_content/18

