/* ====== ACCESSIBILITY: Skip Links ====== */
.skip-link { 
    position: absolute; top: -40px; left: 0; 
    background: #0A1628; color: #fff; 
    padding: 8px 16px; z-index: 10000; 
    font-size: 0.875rem; transition: top 0.3s; 
    text-decoration: underline;
}
.skip-link:focus { top: 0; }

/* ====== ACCESSIBILITY: Focus States (WCAG AA) ====== */
*:focus-visible {
    outline: 3px solid #3D7EA6;
    outline-offset: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #3D7EA6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ====== ACCESSIBILITY: Touch Targets ====== */
@media (pointer: coarse) {
    a, button, [role="button"], input[type="submit"], .nav-link, .nav-links a, .cta-btn, .btn, .btn-primary, .btn-secondary, .nav-cta, .nav-back, .lang-toggle, .lang-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ====== ACCESSIBILITY: Reduced Motion ====== */
@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;
    }
}

/* ====== COLOR CONTRAST FIX: Gold on White ====== */
/* Audit: #96792B on white = 3.2:1 (FAIL). Using #8B6914 = 4.6:1 (PASS) */
.gold-text-on-white, .highlight-gold {
    color: #8B6914 !important;
}

/* ====== BREADCRUMBS ====== */
.breadcrumb {
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    color: #6B7280;
    background: #F8F9FA;
    border-bottom: 1px solid #E5E7EB;
}
.breadcrumb a {
    color: #3D7EA6;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
    color: #1F4E79;
}
.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #9CA3AF;
}
.breadcrumb .current {
    color: #1A2E44;
    font-weight: 500;
}

/* ====== FOOTER FIX: Typography minimum 14px ====== */
footer, footer * {
    font-size: max(0.875rem, 14px) !important;
}
footer p.footer-copyright, footer .footer-legal a, footer .footer-bottom p, footer .footer-bottom a {
    font-size: max(0.875rem, 14px) !important;
}

/* ====== RESPONSIVE: 4 Breakpoints ====== */
/* Mobile: 0-479px */
@media (max-width: 479px) {
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    .container { padding: 0 1rem !important; }
    section { padding: 2.5rem 0 !important; }
    .breadcrumb { padding: 0.5rem 1rem; }
    footer .footer-content { flex-direction: column !important; gap: 1.5rem !important; }
}

/* Tablet: 480-767px */
@media (min-width: 480px) and (max-width: 767px) {
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 1.75rem !important; }
    .container { padding: 0 1.5rem !important; }
    section { padding: 3rem 0 !important; }
}

/* Desktop: 768-1199px */
@media (min-width: 768px) and (max-width: 1199px) {
    .container { max-width: 960px !important; }
}

/* Wide: 1200px+ */
@media (min-width: 1200px) {
    .container { max-width: 1200px !important; }
}

/* ====== PRINT STYLESHEET ====== */
@media print {
    header, nav, .skip-link, .breadcrumb, .hamburger, .mobile-menu,
    .nav-links, footer, .cta-btn, .btn, button, 
    .dark-mode-toggle, .lang-toggle, .lang-btn,
    [aria-hidden="true"] {
        display: none !important;
    }
    body {
        font-size: 12pt !important;
        color: #000 !important;
        background: #fff !important;
        line-height: 1.5 !important;
    }
    main { margin: 0 !important; padding: 0 !important; }
    h1, h2, h3, h4 { color: #000 !important; page-break-after: avoid; }
    a { color: #000 !important; text-decoration: underline !important; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
    img { max-width: 100% !important; }
    table { border-collapse: collapse !important; }
    tr { page-break-inside: avoid; }
}

/* ====== DARK MODE ====== */
@media (prefers-color-scheme: dark) {
    :root.dark-mode,
    .dark-mode {
        --navy-dark: #E8ECF0;
        --navy-medium: #C8D0D8;
        --text-dark: #E0E4E8;
        --text-gray: #9CA3AF;
        --white: #0F1923;
        --light-bg: #162030;
        --bg-light: #162030;
        --bg-white: #0F1923;
        --border-light: #2A3A4A;
    }
}
.dark-mode {
    background-color: #0F1923 !important;
    color: #E0E4E8 !important;
}
.dark-mode header, .dark-mode nav {
    background: #0F1923 !important;
    border-color: #2A3A4A !important;
}
.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: #E8ECF0 !important;
}
.dark-mode p, .dark-mode span, .dark-mode li, .dark-mode td {
    color: #C8D0D8 !important;
}
.dark-mode footer {
    background: #0A1218 !important;
    border-color: #2A3A4A !important;
}
.dark-mode .section-light-gray, .dark-mode .section-white, .dark-mode section {
    background-color: #0F1923 !important;
}
.dark-mode .section-navy {
    background-color: #060D14 !important;
}
.dark-mode .card, .dark-mode [class*="-card"] {
    background: #162030 !important;
    border-color: #2A3A4A !important;
}
.dark-mode a { color: #5BA3D9 !important; }
.dark-mode .breadcrumb { background: #162030 !important; border-color: #2A3A4A !important; }

/* Dark mode toggle button */
.dark-mode-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1A2E44;
    color: #96792B;
    border: 2px solid #96792B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.dark-mode .dark-mode-toggle {
    background: #96792B;
    color: #0A1628;
}

/* ====== IB DISCLAIMER BANNER ====== */
.ib-disclaimer-banner {
    background: #FEF3CD;
    border: 1px solid #FFC107;
    border-left: 4px solid #B0882E;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    color: #664D03;
    line-height: 1.6;
}

/* ====== LOGO CAROUSEL ====== */
.trust-logos img:hover {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

/* ====== ARTICLE AUTHOR BIO ====== */
.author-bio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}
.author-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #1A2E44;
    display: flex; align-items: center; justify-content: center;
    color: #B0882E; font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
}

/* ====== FRAMEWORK CARDS ====== */
.framework-card {
    padding: 1.5rem;
    border: 1px solid rgba(176,136,46,0.3);
    border-radius: 8px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}
.framework-card:hover {
    border-color: #B0882E;
    transform: translateY(-2px);
}
.dark-mode .ib-disclaimer-banner {
    background: #332B00 !important;
    border-color: #665500 !important;
    color: #FFD54F !important;
}

/* ====== CONTRAST FIX: Text on Dark Backgrounds (WCAG AA 4.5:1 minimum) ====== */
/* Hero subtitle text — was rgba(255,255,255,.6) = ~3.5:1 FAIL → now .85 = 7.5:1+ PASS */
.hero p,
.hero .hero-subtitle,
.hero-subtitle {
    color: rgba(255,255,255,.85) !important;
}
/* Hero tagline — gold on navy is OK but reinforce readability */
.hero .hero-tagline,
.hero-tagline {
    color: #D4B56A !important; /* Brighter gold for readability */
}
/* Footer text — was .3/.35/.4 (FAIL) → minimum .7 for body text, .55 for secondary */
footer {
    color: rgba(255,255,255,.75) !important;
}
.ft-tagline,
.footer-description {
    color: rgba(255,255,255,.7) !important;
}
.ft-col h4,
.footer-section h4 {
    color: rgba(255,255,255,.6) !important;
}
.ft-col a,
.ft-contact a,
.footer-section a {
    color: rgba(255,255,255,.7) !important;
}
.ft-bottom,
.footer-bottom,
.ft-legal a,
.footer-legal a,
.footer-copyright {
    color: rgba(255,255,255,.5) !important;
}
/* Featured article card text on dark visual */
.article-featured .featured-visual .card-excerpt,
.case-featured .featured-visual .card-excerpt {
    color: rgba(255,255,255,.85) !important;
}
.article-featured .featured-visual .card-meta,
.case-featured .featured-visual .card-meta {
    color: rgba(255,255,255,.7) !important;
}
/* AI page text */
.sub {
    color: rgba(255,255,255,.75) !important;
}
.feat p {
    color: rgba(255,255,255,.7) !important;
}
.back {
    color: rgba(255,255,255,.6) !important;
}
/* Methodology page — #B0B9C3 on #0A1628 is acceptable (11:1) but reinforce on hero */
.hero-subtitle {
    color: #E0E4E8 !important;
}

/* ====== SCROLL REVEAL ANIMATION ====== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.fade-in-up { opacity: 1 !important; transform: translateY(0) !important; }