/* WaveFX Trading - MT5 Color Palette Theme */
/* Optimized for 1920x1080 and 2560x1440 displays */

:root {
    --orange-red: #FF4500;
    --royal-blue: #4169E1;
    --lime: #00FF00;
    --gold: #FFD700;
    --green: #008000;
    --orange: #FFA500;
    --yellow: #FFFF00;
    --midnight-blue: #191970;
    --maroon: #800000;
    --bg-deep: #0a0a14;
    --bg-panel: #0f0f1e;
    --bg-card: #141428;
    --bg-hover: #1a1a38;
    --blue-glow: #4169E1;
    --blue-bright: #5a7fe8;
    --blue-dim: #2a4a9a;
    --text-bright: #ffffff;
    --text-gold: #FFD700;
    --text-primary: #c4c4d4;
    --text-dim: #8888aa;
    --text-muted: #555577;
    --border: #2a2a4a;
    --border-highlight: #3a3a6a;
    --grid-line: #1a1a3a;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--royal-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold);
}

/* Background Effects */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: url('../images/wavefx-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.glow-orb.blue {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.2) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: orbFloat 20s ease-in-out infinite;
}

.glow-orb.orange {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.15) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: orbFloat 25s ease-in-out infinite reverse;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -20px); }
    66% { transform: translate(-20px, 30px); }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03) 1px, transparent 1px, transparent 2px);
    opacity: 0.5;
}

/* Navigation */
nav#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, var(--bg-deep) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

nav#navbar.scrolled {
    background: rgba(10, 10, 20, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 0 30px rgba(65, 105, 225, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.logo::before { content: '◢'; color: var(--royal-blue); }
.logo::after { content: '◣'; color: var(--orange-red); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--gold);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-login {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 2px solid var(--royal-blue);
    color: var(--royal-blue);
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-login:hover {
    background: var(--royal-blue);
    color: var(--text-bright);
    box-shadow: 0 0 30px rgba(65, 105, 225, 0.5);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    background: var(--gold);
    color: var(--bg-deep);
}

/* Buttons */
.btn-primary {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 2.5rem;
    background: var(--royal-blue);
    border: none;
    color: var(--text-bright);
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(65, 105, 225, 0.4);
    background: var(--blue-bright);
    color: var(--text-bright);
}

.btn-secondary {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--orange-red);
    color: var(--orange-red);
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--orange-red);
    color: var(--text-bright);
    box-shadow: 0 10px 40px rgba(255, 69, 0, 0.3);
    transform: translateY(-2px);
}

.btn-gold {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 2.5rem;
    background: var(--gold);
    border: none;
    color: var(--bg-deep);
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-gold:hover {
    background: var(--yellow);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
    color: var(--bg-deep);
}

/* Page Header */
.page-header {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-deep) 100%);
}

.page-header .breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.page-header .breadcrumb a {
    color: var(--text-dim);
}

.page-header .breadcrumb a:hover {
    color: var(--gold);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.main-content.wide {
    max-width: 1400px;
}

/* Prose / Article Content */
.prose {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.prose h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.prose h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-bright);
    margin: 2rem 0 1rem;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose ul,
.prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.prose li::marker {
    color: var(--lime);
}

.prose strong {
    color: var(--text-bright);
    font-weight: 600;
}

.prose em {
    color: var(--orange);
    font-style: italic;
}

.prose blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-left: 4px solid var(--gold);
    border-radius: 0 8px 8px 0;
    color: var(--text-dim);
    font-style: italic;
}

.prose img {
    border-radius: 8px;
    margin: 2rem auto;
    border: 1px solid var(--border);
}

.prose a {
    color: var(--royal-blue);
    border-bottom: 1px solid transparent;
}

.prose a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.prose a.btn-primary,
.prose a.btn-secondary,
.prose a.btn-gold,
.prose article a.btn-primary {
    color: #fff;
    border-bottom: none;
}

.prose a.btn-primary:hover,
.prose article a.btn-primary:hover {
    color: #fff;
}

.prose a.btn-gold:hover {
    color: var(--bg-deep);
}

/* Tables in prose */
.prose table {
    margin-bottom: 2.5rem;
    border-collapse: collapse;
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prose table th,
.prose table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
}

.prose table th {
    background: var(--midnight-blue);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.prose table td {
    color: var(--text-primary);
}

.prose table tr:hover td {
    background: rgba(65, 105, 225, 0.05);
}

/* Article content panel background */
.prose article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
}

.prose article > h2:first-child,
.prose article > img:first-child + h2,
.prose article > img:first-child {
    margin-top: 0;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.lesson-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
    display: block;
}

.lesson-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.1);
}

.lesson-card .lesson-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 1rem 1.5rem 0;
    color: var(--orange);
    letter-spacing: 2px;
}

.lesson-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem 1rem;
    color: var(--text-bright);
}

.lesson-card .lesson-footer {
    padding: 1rem 1.5rem;
    background: var(--midnight-blue);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-card .read-more {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
}

.lesson-card:hover .read-more {
    color: var(--yellow);
}

/* ============================================
   SIDEBAR LAYOUT - SIMPLE CSS GRID
   ============================================ */

.content-with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* Sidebar container - ORDER MATTERS */
.content-with-sidebar > aside.sidebar {
    grid-column: 1;
    grid-row: 1;
    width: 280px;
}

/* Main content area - ORDER MATTERS */
.content-with-sidebar > main.prose {
    grid-column: 2;
    grid-row: 1;
    max-width: 800px;
}

/* Sidebar navigation box */
.sidebar-nav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.sidebar-nav h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    margin: 0 0 1rem 0;
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav ul li {
    margin: 0 0 0.25rem 0;
}

.sidebar-nav ul li a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav ul li a:hover {
    background: var(--bg-hover);
    color: var(--text-bright);
}

.sidebar-nav ul li a.active {
    background: var(--midnight-blue);
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding-left: calc(1rem - 3px);
}

/* ============================================
   END SIDEBAR LAYOUT
   ============================================ */

/* Lesson Navigation */
.lesson-nav {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.lesson-nav a {
    flex: 1;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lesson-nav a:hover {
    border-color: var(--gold);
    background: var(--bg-hover);
}

.lesson-nav .prev {
    text-align: left;
}

.lesson-nav .next {
    text-align: right;
}

.lesson-nav .label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.lesson-nav .title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
}

/* Sections */
.section {
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
}

.section.alt-bg {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--orange);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-disclaimer {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-disclaimer strong {
    color: var(--maroon);
}
.copyright {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================ */

/* Large tablets and small laptops (1200px and below) */
@media (max-width: 1200px) {
    .content-with-sidebar {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .content-with-sidebar > aside.sidebar {
        width: 250px;
    }
}

/* Tablets landscape and small laptops (1024px and below) */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .content-with-sidebar > aside.sidebar {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar-nav {
        position: relative;
        top: 0;
    }
    
    .content-with-sidebar > main.prose {
        grid-column: 1;
        grid-row: 2;
        max-width: 100%;
    }
    
    /* Collapsible sidebar on tablets */
    .sidebar-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .sidebar-nav ul li {
        margin: 0;
    }
}

/* Tablets portrait and large phones (900px and below) */
@media (max-width: 900px) {
    /* Hide desktop nav, show mobile menu button */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Smaller page headers */
    .page-header {
        padding: 6rem 1.5rem 2rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header .subtitle {
        font-size: 1rem;
    }
    
    /* Stack footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Stack lesson navigation */
    .lesson-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lesson-nav a {
        text-align: center !important;
    }
    
    /* Section headers */
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Single column sidebar on tablets */
    .sidebar-nav ul {
        grid-template-columns: 1fr;
    }
}

/* Tablets portrait (768px and below - iPad) */
@media (max-width: 768px) {
    /* Adjust navbar */
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    /* Content padding */
    .main-content {
        padding: 2rem 1.5rem;
    }
    
    .content-with-sidebar {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    /* Prose adjustments */
    .prose {
        font-size: 1rem;
    }
    
    .prose article {
        padding: 2rem;
    }
    
    .prose h2 {
        font-size: 1.4rem;
    }
    
    .prose h3 {
        font-size: 1.2rem;
    }
    
    /* Images responsive */
    .prose img {
        max-width: 100%;
        height: auto;
    }
    
    /* Card grid - 2 columns on tablet */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Lesson cards */
    .lesson-card {
        padding: 1.25rem;
    }
    
    /* Buttons larger for touch */
    .btn-primary,
    .btn-secondary,
    .btn-gold {
        padding: 1rem 2rem;
        font-size: 0.85rem;
        min-height: 48px; /* Touch-friendly */
    }
}

/* Mobile phones (600px and below) */
@media (max-width: 600px) {
    /* Tighter padding */
    .page-header {
        padding: 5rem 1rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .content-with-sidebar {
        padding: 1rem;
        gap: 1rem;
    }
    
    /* Single column cards */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar as accordion-style on mobile */
    .sidebar-nav {
        padding: 1rem;
    }
    
    .sidebar-nav h4 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .sidebar-nav ul li a {
        padding: 0.75rem 0.75rem;
        font-size: 0.85rem;
        min-height: 44px; /* Touch target */
        display: flex;
        align-items: center;
    }
    
    /* Prose adjustments */
    .prose {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .prose article {
        padding: 1.5rem;
    }
    
    .prose h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }
    
    .prose p {
        margin-bottom: 1rem;
    }
    
    /* Lesson nav full width buttons */
    .lesson-nav a {
        padding: 1rem;
    }
    
    .lesson-nav .title {
        font-size: 0.9rem;
    }
    
    /* Footer compact */
    .footer-content {
        padding: 2rem 1rem;
    }
    
    .footer-disclaimer {
        font-size: 0.75rem;
        line-height: 1.5;
    }
    
    /* Breadcrumb wrap */
    .breadcrumb {
        font-size: 0.75rem;
        word-break: break-word;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    /* Stack buttons vertically */
    .hero-cta,
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta a,
    .cta-buttons a {
        width: 100%;
    }
}

/* Ensure images never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Touch-friendly link spacing */
@media (hover: none) and (pointer: coarse) {
    .nav-links li a,
    .sidebar-nav ul li a,
    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--bg-panel);
    border-top: 1px solid var(--gold);
    padding: 1.25rem 2rem;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.cookie-consent.show {
    display: block;
}
.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.cookie-consent-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    min-width: 280px;
}
.cookie-consent-text a {
    color: var(--gold);
    text-decoration: underline;
}
.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}
.cookie-btn-accept {
    background: var(--gold);
    color: #000;
}
.cookie-btn-accept:hover {
    background: #e6c200;
}
.cookie-btn-decline {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.cookie-btn-decline:hover {
    border-color: var(--text-dim);
    color: var(--text-bright);
}
@media (max-width: 600px) {
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   MOBILE MENU (JavaScript controlled)
   ============================================ */
.nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.5rem;
    z-index: 1000;
}

.nav-links.mobile-open li a {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* ============================================
   ACCESSIBILITY & SEO ENHANCEMENTS
   ============================================ */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--bg-deep);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--royal-blue);
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .scanline,
    .grid-bg,
    .glow-orb,
    nav#navbar,
    .mobile-menu-btn,
    .skip-link,
    footer {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .prose {
        max-width: 100%;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
