/* MindInsight - Critical Thinking Theme with Dark/Light Mode */

/* ========================================
   CSS Custom Properties (Theme Variables)
======================================== */

:root {
    /* Light theme colors */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --accent-50: #fffbeb;
    --accent-100: #fef3c7;
    --accent-200: #fde68a;
    --accent-300: #fcd34d;
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --accent-700: #b45309;
    --accent-800: #92400e;
    --accent-900: #78350f;
    
    /* Semantic colors - Light mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Brand colors - more subtle */
    --brand-primary: var(--primary-600);
    --brand-secondary: var(--accent-600);
    --brand-gradient: var(--bg-secondary);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-primary: #334155;
    --border-secondary: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    
    /* Adjust brand colors for dark mode */
    --brand-primary: var(--primary-400);
    --brand-secondary: var(--accent-400);
    --brand-gradient: var(--bg-secondary);
    
    /* Override light accent colors for dark mode */
    --accent-50: #334155;
    --accent-100: #334155;
    --accent-300: #64748b;
    --accent-800: var(--accent-300);
    --primary-900: var(--primary-300);
    --primary-200: var(--primary-700);
}

/* ========================================
   CSS Reset & Base Styles
======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Account for fixed header height + proper spacing for cross-page navigation */
}

body {
    font-family: 'Charter', 'Iowan Old Style', 'Times New Roman', 'Droid Serif', 'Times', serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   Typography - Academic Style
======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Charter', 'Iowan Old Style', 'Times New Roman', 'Droid Serif', 'Times', serif;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.75em;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-decoration-color: rgba(30, 58, 138, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

a:hover {
    color: #1e40af;
    text-decoration-color: rgba(30, 64, 175, 0.6);
}

/* ========================================
   Layout & Grid
======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 2.4rem 0 4rem 0;
}

/* Anchor positioning handled by scroll-padding-top: 150px on html element */

.section-alt {
    background-color: var(--bg-tertiary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ========================================
   Navigation - Scientific Journal Style
======================================== */

.header {
    background-color: var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-brand a {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--brand-secondary);
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7em;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--brand-secondary);
    border-left-color: var(--brand-primary);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #374151;
    transition: 0.2s;
}

/* ========================================
   Hero Section - Academic Paper Style
======================================== */

.hero {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 11rem 0 7.5rem;
    margin-top: 70px;
    text-align: center;
    border-bottom: 1px solid var(--border-primary);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    white-space: pre-line;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Buttons - Academic Style
======================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline:hover {
    background-color: var(--brand-primary);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    letter-spacing: 0.15em;
}

/* ========================================
   Theme Toggle Button
======================================== */

.theme-toggle {
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

/* ========================================
   Cards & Grid - Academic Style
======================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-secondary);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card h3 a {
    color: inherit;
    text-decoration: none;
}

.card h3 a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.card p {
    color: var(--text-tertiary);
    margin-bottom: 0;
}

.section-alt .card {
    background-color: var(--bg-secondary);
}

/* ========================================
   CTA Section - Academic Style
======================================== */

.cta-section {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    border-top: 1px solid var(--border-primary);
    position: relative;
}

.cta-section::before {
    display: none;
}

.cta-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cta-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-indent: 0;
}

/* ========================================
   Footer - Academic Journal Style
======================================== */

.footer {
    background-color: #1a202c;
    color: #cbd5e0;
    padding: 3rem 0 1rem;
    border-top: 4px solid #2d3748;
}

/* Footer Controls */
.footer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #4a5568;
}

.footer-theme-toggle {
    background: transparent;
    border: 1px solid #4a5568;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #cbd5e0;
}

.footer-theme-toggle:hover {
    background-color: #2d3748;
    border-color: #f59e0b;
    color: #f59e0b;
}

.footer-theme-toggle .theme-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.footer-theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

.footer-language-selector {
    position: relative;
}

.footer-language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #cbd5e0;
    transition: all 0.2s ease;
}

.footer-language-toggle:hover {
    background-color: #2d3748;
    border-color: #f59e0b;
}

.footer-language-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.footer-language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.footer-language-menu .lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    color: #cbd5e0;
}

.footer-language-menu .lang-btn:hover {
    background-color: #374151;
    color: #f7fafc;
}

.footer-language-menu .lang-btn.active {
    background-color: #d97706;
    color: white;
    font-weight: 500;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
    background-color: transparent;
    box-shadow: none;
    border: none;
}

.footer-section h3,
.footer-section h4 {
    color: #f7fafc;
    margin-bottom: 1rem;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.footer-section li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: #718096;
}

.footer-section a {
    color: #cbd5e0;
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-section a:hover {
    color: #f7fafc;
    text-decoration: underline;
}

/* Footer Settings Styles */
.footer-setting {
    margin-bottom: 1rem;
}

.footer-setting .footer-theme-toggle {
    background: none;
    border: 1px solid #4a5568;
    color: #cbd5e0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 220px;
    justify-content: flex-start;
    font-size: 0.85rem;
    white-space: nowrap;
}

.footer-setting .footer-theme-toggle:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.footer-setting .footer-language-selector {
    position: relative;
}

.footer-setting .footer-language-toggle {
    background: none;
    border: 1px solid #4a5568;
    color: #cbd5e0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 220px;
    justify-content: space-between;
    font-size: 0.85rem;
}

.footer-setting .footer-language-toggle:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.footer-setting .footer-language-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    margin-bottom: 0.25rem;
}

.footer-setting .footer-language-menu.show {
    display: block;
}

.footer-setting .footer-language-menu .lang-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.footer-setting .footer-language-menu .lang-btn:hover {
    background-color: #4a5568;
}

.footer-setting .footer-language-menu .lang-btn.active {
    background-color: #4299e1;
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
    color: #a0aec0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    font-style: italic;
}

.footer-bottom p {
    white-space: nowrap;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.footer-credit-highlight {
    color: #c5d1e0;
    font-weight: 300;
}

/* ========================================
   Interactive Elements (Checklist)
======================================== */

.checklist {
    margin: 1rem 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.checklist-item:hover {
    background-color: var(--bg-secondary);
}

.checklist-item input[type="checkbox"] {
    margin: 0;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 0.5rem;
    margin-top: 0.125rem;
}

.checklist-item span:last-child {
    flex: 1;
    line-height: 1.5;
}

/* ========================================
   Mobile-First Responsive Design
======================================== */

/* Touch Target Optimization */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .lang-btn, .footer-theme-toggle, .footer-language-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    .card {
        cursor: default;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .card:active {
        transform: translateY(1px);
        box-shadow: var(--shadow-sm);
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-section:nth-child(3) {
        order: 4;
    }
    
    .footer-section:nth-child(4) {
        order: 3;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Enhanced Mobile Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 2rem;
        gap: 0.5rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-controls {
        order: -1;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-primary);
        justify-content: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--border-primary);
        text-align: center;
        white-space: normal;
        font-size: 1rem;
    }

    /* Mobile Dropdown Styles */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--bg-secondary);
        border: none;
        border-radius: 0;
        box-shadow: none;
        min-width: auto;
        width: 100%;
        padding: 0;
        margin-top: 0.5rem;
        display: none;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-item {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--border-secondary);
        text-align: left;
        font-size: 0.9rem;
        border-left: none;
        background: var(--bg-secondary);
    }

    .nav-dropdown-item:last-child {
        border-bottom: none;
    }

    .nav-dropdown-toggle::after {
        float: right;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero {
        padding: 8.5rem 0 6rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .section {
        padding: 3rem 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
    
    .language-selector {
        margin-left: 0;
        margin-top: 1rem;
        order: 3;
        width: 100%;
    }
    
    .language-toggle {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .language-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
    }
    
    .lang-btn {
        padding: 1rem;
        border-bottom: 1px solid var(--border-primary);
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom p {
        white-space: normal;
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .footer-setting .footer-language-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 0;
        margin-bottom: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(100%);
    }
    
    .footer-setting .footer-language-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Enhanced Mobile Optimizations */
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card h3 {
        font-size: 1.3rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Content Page Mobile Optimizations */
    .content-hero {
        padding: 3rem 0 2rem;
    }
    
    .content-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .content-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .content-layout {
        display: block;
    }
    
    .content-sidebar {
        margin-top: 2rem;
        order: 2;
    }
    
    .content-main-column {
        margin-bottom: 2rem;
    }
    
    /* Interactive Elements Mobile */
    .practice-container,
    .example-box,
    .technique-box {
        margin: 1.5rem 0;
        padding: 1.5rem;
    }
    
    .strategy-list,
    .harm-grid,
    .analysis-grid {
        display: block;
    }
    
    .strategy-item,
    .harm-item,
    .analysis-item {
        margin-bottom: 1.5rem;
    }
    
    .breadcrumbs {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
    
    /* Form Elements Mobile */
    .checklist-item {
        padding: 0.75rem 0;
        margin-bottom: 0.5rem;
    }
    
    .checkmark {
        width: 20px;
        height: 20px;
    }
    
    /* Navigation Mobile */
    .content-navigation .nav-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .nav-title {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Navigation Brand */
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Section spacing */
    .section {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Footer optimizations */
    .footer-bottom p {
        font-size: 0.8rem;
        line-height: 1.4;
        white-space: normal;
        word-break: break-word;
    }
    
    /* Content pages */
    .content-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .content-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .content-hero {
        padding: 2.5rem 0 2rem;
    }
    
    /* Practice containers */
    .practice-container,
    .example-box,
    .technique-box {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    /* Interactive elements */
    .checklist-item {
        padding: 0.5rem 0;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .checkmark {
        width: 18px;
        height: 18px;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .nav-brand h1 {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.65rem 1.25rem;
    }
    
    .footer-bottom p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Optimize touch targets for very small screens */
    .nav-link, .btn, .lang-btn, .footer-theme-toggle, .footer-language-toggle {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Compact spacing */
    .section {
        padding: 2rem 0;
    }
    
    .content-hero {
        padding: 2rem 0 1.5rem;
    }
    
    .practice-container,
    .example-box,
    .technique-box {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
}

/* ========================================
   Language Selector
======================================== */

.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-dropdown {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.language-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--brand-secondary);
}

.current-lang-flag {
    font-size: 1rem;
}

.current-lang-name {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.language-dropdown .language-menu.show ~ .language-toggle .dropdown-arrow,
.language-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.lang-btn:hover {
    background-color: var(--bg-tertiary);
}

.lang-btn.active {
    background-color: var(--accent-50);
    color: var(--brand-secondary);
    font-weight: 500;
}

.lang-flag {
    font-size: 1rem;
}

.lang-name {
    flex: 1;
    text-align: left;
}

/* ========================================
   Utility Classes
======================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

.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;
}

/* ========================================
   Mobile Performance & Accessibility Optimizations
======================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-primary: #000000;
        --border-secondary: #000000;
        --text-primary: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-primary: #ffffff;
        --border-secondary: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Enhanced focus indicators for keyboard navigation */
@media (max-width: 768px) {
    .nav-link:focus,
    .btn:focus,
    .lang-btn:focus,
    .footer-theme-toggle:focus,
    .footer-language-toggle:focus,
    input:focus,
    button:focus {
        outline: 3px solid var(--brand-primary);
        outline-offset: 2px;
    }
}

/* Optimize for mobile Safari */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific fixes */
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    input, button, select, textarea {
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Fix iOS zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Dark mode mobile optimizations */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-menu {
        background-color: var(--bg-primary);
        border-color: var(--border-primary);
    }
    
    [data-theme="dark"] .nav-link {
        color: var(--text-secondary);
    }
    
    [data-theme="dark"] .nav-link:hover {
        background-color: var(--bg-tertiary);
        color: var(--text-primary);
    }
}

/* Dark Theme - Harm Item Components */
[data-theme="dark"] .harm-item {
    background-color: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .harm-item h3,
[data-theme="dark"] .harm-item h5 {
    color: #f87171; /* Lighter red for dark theme */
}

[data-theme="dark"] .harm-item p {
    color: var(--text-secondary);
}

/* ========================================
   Cookie Consent Banner
======================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-top: 2px solid var(--primary-500);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 1rem;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Responsive design for cookie banner */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
}

/* Dark theme for cookie banner */
[data-theme="dark"] .cookie-banner {
    background-color: var(--bg-primary);
    border-top-color: var(--primary-400);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}