/* ===========================
   ForMedEx – Main Stylesheet
   Dark Medical Luxury Theme
=========================== */

/* ---- Theme: Default (Dark Gold) ---- */
:root,
[data-theme="dark"] {
    --black:       #06060A;
    --dark:        #0D0D14;
    --dark-card:   #12121C;
    --dark-border: #1E1E2E;
    --gold:        #C8A96E;
    --gold-light:  #E2C990;
    --gold-dim:    #8A6E42;
    --white:       #F0EDE6;
    --muted:       #8A8A9A;
    --accent-red:  #8B2635;
    --accent-teal: #1A5C6B;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'DM Mono', monospace;

    --radius-sm: 4px;
    --radius:    10px;
    --radius-lg: 20px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow: 0 0 40px rgba(200, 169, 110, 0.15);
}

/* ---- Theme: Light (White & Black) ---- */
[data-theme="light"] {
    --black:       #FFFFFF;
    --dark:        #F4F4F6;
    --dark-card:   #FFFFFF;
    --dark-border: #DCDCE4;
    --gold:        #003147;
    --gold-light:  #004d6e;
    --gold-dim:    #C8A96E;
    --white:       #111118;
    --muted:       #555566;
    --accent-red:  #8B2635;
    --accent-teal: #1A5C6B;
    --glow: 0 0 40px rgba(139, 94, 26, 0.10);
}
[data-theme="light"] body { background: #F4F4F6; color: #111118; }
[data-theme="light"] .site-header { background: rgba(255,255,255,0.92) !important; border-bottom-color: #DCDCE4; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
[data-theme="light"] .site-header.scrolled { background: rgba(255,255,255,0.98) !important; }
[data-theme="light"] .noise-overlay { display: none; }
[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,0.05); color: #111118; }
[data-theme="light"] .dropdown-menu { background: #fff; border-color: #DCDCE4; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
[data-theme="light"] .dropdown-menu li a:hover { background: #F4F4F6; }
[data-theme="light"] .page-hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
[data-theme="light"] .page-hero-label,
[data-theme="light"] .page-hero-title,
[data-theme="light"] .page-hero-desc { color: #F0EDE6 !important; }
[data-theme="light"] .page-hero-title span { color: #C8A96E !important; }
[data-theme="light"] .btn-primary { background: #003147; color: #fff; }
[data-theme="light"] .btn-primary:hover { background: #004d6e; color: #fff; }
[data-theme="light"] .footer-logo { color: #003147; }
[data-theme="light"] .site-footer { background: #1a1a2e; color: #ccc; }
[data-theme="light"] .site-footer a { color: #C8A96E; }
[data-theme="light"] .footer-nav-group h4 { color: #fff; }
[data-theme="light"] .footer-bottom { border-top-color: rgba(255,255,255,0.1); }
[data-theme="light"] .footer-bottom p,
[data-theme="light"] .footer-bottom-links a { color: #aaa; }
[data-theme="light"] .card,
[data-theme="light"] .news-card,
[data-theme="light"] .kb-cat,
[data-theme="light"] .forum-thread,
[data-theme="light"] .mission-card { border-color: #DCDCE4 !important; }
[data-theme="light"] .news-detail-section { border-color: #DCDCE4; background: #fafafa; }
[data-theme="light"] .notice { background: #f0f0f4; border-color: #DCDCE4; color: #444; }
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select { background: #fff !important; color: #111 !important; border-color: #DCDCE4 !important; }
[data-theme="light"] .hamburger span { background: #111118; }

/* ---- Theme Switcher Widget ---- */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--dark-border);
    border-radius: 100px;
    padding: 0.25rem;
    flex-shrink: 0;
}
[data-theme="light"] .theme-switcher {
    background: rgba(0,0,0,0.06);
    border-color: #DCDCE4;
}
.theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
    color: var(--muted);
    title: '';
}
.theme-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }
[data-theme="light"] .theme-btn:hover { background: rgba(0,0,0,0.08); }
.theme-btn.active {
    background: var(--gold);
    color: #000;
}
[data-theme="light"] .theme-btn.active { background: #003147; color: #fff; }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Noise Overlay ---- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px;
}

/* ---- Utility ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 1rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 1.5rem;
}
.section-title span { color: var(--gold); }
.section-desc {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 600px;
    line-height: 1.8;
        margin: 0 auto;
}
.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 1.5rem 0;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--gold);
    color: var(--black);
}
.btn-primary:hover {
    background: var(--gold-light);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 169, 110, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}
.btn-outline:hover {
    background: rgba(200, 169, 110, 0.1);
    color: var(--gold-light);
    transform: translateY(-2px);
}
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.82rem; }

/* ---- Header ---- */
/* =============================================
   TOP BAR — slim, logo + actions only
============================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(6, 6, 10, 0.90);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--dark-border);
    transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
    background: rgba(6, 6, 10, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.75rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img {
    width: 46px; height: 46px;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid var(--gold-dim);
}
.logo-main {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}
.logo-sub {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1;
    margin-top: 3px;
}

/* Header right actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Menu trigger button */
.menu-trigger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px; height: 42px;
    background: rgba(200,169,110,0.08);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    align-items: center;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.menu-trigger:hover {
    background: rgba(200,169,110,0.15);
    border-color: var(--gold-dim);
}
.menu-trigger.active {
    background: rgba(200,169,110,0.18);
    border-color: var(--gold);
}
.trigger-bar {
    display: block;
    width: 20px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
    transform-origin: center;
}
.menu-trigger.active .trigger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-trigger.active .trigger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-trigger.active .trigger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   SIDEBAR OVERLAY
============================================= */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* =============================================
   NAV SIDEBAR DRAWER — slides from right
============================================= */
.nav-sidebar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 340px;
    max-width: 92vw;
    z-index: 1100;
    background: var(--dark);
    border-left: 1px solid var(--dark-border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}
.nav-sidebar.open {
    transform: translateX(0);
}

/* Sidebar top bar */
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
    background: var(--dark-card);
}
.sidebar-head-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}
.sidebar-logo-img {
    width: 36px; height: 36px;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid var(--gold-dim);
}
.sidebar-logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}
.sidebar-logo-tagline {
    display: block;
    font-size: 0.58rem;
    font-family: var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}
.sidebar-close {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
    flex-shrink: 0;
}
.sidebar-close:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* Sidebar nav list */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--dark-border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--dark-border); border-radius: 2px; }

.snav-list { list-style: none; padding: 0; margin: 0; }
.snav-item { border-bottom: 1px solid rgba(255,255,255,0.04); }

/* Flat nav link */
a.snav-link, button.snav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, padding-left 0.2s;
    text-align: left;
}
a.snav-link:hover, button.snav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.04);
}
a.snav-link.active, button.snav-link.active {
    color: var(--gold);
    background: rgba(200,169,110,0.06);
    border-left: 3px solid var(--gold);
    padding-left: calc(1.5rem - 3px);
}
.snav-icon {
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.snav-text { flex: 1; }
.snav-arrow {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.25s ease;
    margin-left: auto;
}
.snav-has-sub.open > button.snav-link .snav-arrow {
    transform: rotate(180deg);
}
.snav-has-sub.open > button.snav-link {
    color: var(--white);
}

/* Sub-menu */
.snav-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.18);
}
.snav-has-sub.open .snav-sub {
    max-height: 400px;
}
.snav-sub-link {
    display: block;
    padding: 0.65rem 1.5rem 0.65rem 3.4rem;
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    border-left: 2px solid transparent;
    margin-left: 1.5rem;
    border-left: 2px solid var(--dark-border);
}
.snav-sub-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.04);
}
.snav-sub-link.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(200,169,110,0.06);
}

/* Sidebar footer */
.sidebar-foot {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--dark-border);
    flex-shrink: 0;
    background: var(--dark-card);
}
.sidebar-join-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--gold);
    color: var(--black);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    margin-bottom: 0.75rem;
}
.sidebar-join-btn:hover { background: var(--gold-light); color: var(--black); }
.sidebar-tagline {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}
.sidebar-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.sidebar-theme-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.sidebar-email {
    display: block;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
    text-decoration: none;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    transition: color var(--transition);
}
.sidebar-email:hover { color: var(--gold-light); text-decoration: underline; }

/* ---- Legacy stubs (keep so nothing breaks) ---- */
.main-nav, .hamburger, .nav-backdrop, .has-dropdown, .dropdown-menu, .dropdown-arrow { display: none !important; }

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 50%, rgba(200,169,110,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(26,92,107,0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--black) 0%, var(--dark) 100%);
}
.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(200,169,110,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200,169,110,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(200,169,110,0.1);
    border: 1px solid rgba(200,169,110,0.25);
    border-radius: 100px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.hero-title .line-gold { color: var(--gold); display: block; }
.hero-desc {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 480px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--dark-border);
}
.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-emblem {
    width: 380px;
    height: 380px;
    position: relative;
}
.hero-emblem svg { width: 100%; height: 100%; }

/* ---- Cards ---- */
.card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
        
    display: inline-block;
} 
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.card:hover {
    border-color: rgba(200,169,110,0.25);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}
.card:hover::before { opacity: 1; }
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(200,169,110,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
}
.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.6rem;
}
.card-desc {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
}

/* ---- Features Grid ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

/* ---- Why Section ---- */
.why-section {
    background: var(--dark);
    border-top: 1px solid var(--dark-border);
    border-bottom: 1px solid var(--dark-border);
}
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.check-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200,169,110,0.15);
    border: 1px solid rgba(200,169,110,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.check-icon::after {
    content: '✓';
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 700;
}
.check-text strong { color: var(--white); display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.check-text span { color: var(--muted); font-size: 0.83rem; }

/* ---- News Card ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.news-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}
.news-card:hover {
    border-color: rgba(200,169,110,0.25);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}
.news-card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.news-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(200,169,110,0.12);
    color: var(--gold);
    border: 1px solid rgba(200,169,110,0.2);
}
.news-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(200,169,110,0.12);
    line-height: 1;
}
.news-card-body { padding: 1.5rem; }
.news-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.news-card-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.25rem; }
.news-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-meta { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); }

/* ---- CTA Banner ---- */
.cta-banner {
    background: linear-gradient(135deg, var(--dark-card) 0%, rgba(26,92,107,0.15) 100%);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cta-banner-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}
.cta-banner-desc { color: var(--muted); margin-bottom: 2rem; font-size: 1rem; }
.cta-banner-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Page Hero ---- */
.page-hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
    border-bottom: 1px solid var(--dark-border);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 80% 50%, rgba(200,169,110,0.05) 0%, transparent 70%);
}
.page-hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.page-hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 1rem;
}
.page-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.page-hero-desc { color: var(--muted); font-size: 1.05rem; max-width: 600px; }

/* ---- Membership ---- */
.membership-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}
.benefit-item {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}
.benefit-item:hover {
    border-color: rgba(200,169,110,0.2);
    background: rgba(200,169,110,0.04);
}
.benefit-item .icon { font-size: 1.3rem; }
.benefit-item span { font-size: 0.9rem; color: var(--white); font-weight: 500; }

/* ---- Knowledgebase ---- */
.kb-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 2.5rem 0;
}
.kb-cat {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.kb-cat:hover {
    border-color: var(--gold-dim);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}
.kb-cat .icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.kb-cat-name { font-weight: 600; color: var(--white); font-size: 0.95rem; margin-bottom: 0.3rem; }
.kb-cat-count { font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono); }

/* ---- Forum ---- */
.forum-thread {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: all var(--transition);
}
.forum-thread:hover {
    border-color: rgba(200,169,110,0.2);
}
.thread-title {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}
.thread-meta { font-size: 0.78rem; color: var(--muted); }
.thread-stats {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}
.thread-replies { font-size: 1.1rem; font-weight: 700; color: var(--gold); display: block; }

/* ---- Contact Form ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(200,169,110,0.1);
    border: 1px solid rgba(200,169,110,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-info-text strong { color: var(--white); display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.contact-info-text span { color: var(--muted); font-size: 0.85rem; }

/* ---- Form ---- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.form-control {
    width: 100%;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: var(--white);
    font-family: var(--font-body);
    transition: all var(--transition);
    outline: none;
    appearance: none;
}
.form-control:focus {
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 3px rgba(200,169,110,0.1);
}
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { cursor: pointer; }

/* ---- About Timeline ---- */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.mission-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.mission-card::after {
    content: attr(data-num);
    position: absolute;
    bottom: -0.5rem;
    right: 1rem;
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 900;
    color: rgba(200,169,110,0.05);
    line-height: 1;
}

/* ---- Alert / Notice ---- */
.notice {
    background: rgba(200,169,110,0.08);
    border: 1px solid rgba(200,169,110,0.2);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    font-size: 0.88rem;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* ---- News Detail ---- */
.news-detail-header {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
}
.news-detail-section {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.news-detail-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.news-detail-section ul { display: flex; flex-direction: column; gap: 0.6rem; }
.news-detail-section ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--dark-border);
    font-size: 0.88rem;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.news-detail-section ul li:last-child { border-bottom: none; }

/* ---- Footer ---- */
.site-footer {
    background: var(--dark);
    border-top: 1px solid var(--dark-border);
    padding: 5rem 0 0;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 1rem;
}
.footer-brand p { color: var(--muted); font-size: 0.88rem; line-height: 1.8; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 0.75rem; }
.social-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all var(--transition);
}
.social-link:hover { color: var(--gold); border-color: var(--gold-dim); }
.social-link svg { width: 16px; height: 16px; }
.footer-nav-group h4 {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.25rem;
}
.footer-nav-group ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav-group a {
    font-size: 0.85rem;
    color: var(--muted);
    transition: color var(--transition);
}
.footer-nav-group a:hover { color: var(--gold); }
.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: 0.8rem; color: var(--muted); }
.footer-bottom-links a:hover { color: var(--gold); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    /* Mobile nav — hidden by default, slides down when .open */
    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(6,6,10,0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 999;
        padding: 1rem 1.5rem 2rem;
        border-top: 1px solid var(--dark-border);
        overflow-y: auto;
        /* hidden state */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .main-nav.open {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--dark-border);
    }
    .main-nav ul li:first-child {
        border-top: 1px solid var(--dark-border);
    }
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 0.5rem;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 0;
    }
    .nav-link.active::after { display: none; }
    .nav-link.active {
        color: var(--gold);
        padding-left: 1rem;
        border-left: 3px solid var(--gold);
    }

    /* Mobile dropdown — toggled by .open class via JS */
    .has-dropdown .dropdown-menu {
        display: none !important;
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0.5rem 1rem;
        min-width: unset;
        flex-direction: column;
    }
    .has-dropdown.open .dropdown-menu {
        display: flex !important;
    }
    /* Disable CSS hover on mobile — JS handles it */
    .has-dropdown:hover > .dropdown-menu { display: none !important; }
    .has-dropdown.open > .dropdown-menu { display: flex !important; }

    .has-dropdown .dropdown-menu li { border-bottom: none; }
    .has-dropdown .dropdown-menu li a {
        padding: 0.55rem 0.5rem;
        font-size: 0.9rem;
        border-left: 2px solid var(--dark-border);
    }
    .has-dropdown .dropdown-menu li a:hover,
    .has-dropdown .dropdown-menu li a.active {
        border-left-color: var(--gold);
        color: var(--gold);
        background: transparent;
    }
    .dropdown-arrow { display: inline; }

    /* Hamburger becomes X when open */
    .hamburger { display: flex; }
    .hamburger span { transition: all 0.25s ease; }
    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Overlay backdrop */
    .nav-backdrop {
        display: none;
        position: fixed;
        inset: 68px 0 0 0;
        z-index: 998;
        background: rgba(0,0,0,0.5);
    }
    .nav-backdrop.open { display: block; }

    .hero-content { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .why-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .section { padding: 4rem 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 1.5rem; }
    .cta-banner { padding: 2.5rem 1.5rem; }
    .page-hero { padding: 110px 0 60px; }
    .news-grid { grid-template-columns: 1fr; }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.7s ease both; }
.fade-in-2 { animation: fadeInUp 0.7s ease 0.15s both; }
.fade-in-3 { animation: fadeInUp 0.7s ease 0.3s both; }
.fade-in-4 { animation: fadeInUp 0.7s ease 0.45s both; }

/* ============================================================
   KB CONTENT BODY — Rich text output from TinyMCE editor
   Applies to: .kb-content-body on all knowledgebase pages
   ============================================================ */

.kb-content-body {
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.85;
    color: var(--white);
    max-width: 900px;
}

/* Headings */
.kb-content-body h1,
.kb-content-body h2 {
    font-family: var(--font-display);
    color: var(--gold);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark-border);
}
.kb-content-body h1 { font-size: 1.7rem; }
.kb-content-body h2 { font-size: 1.35rem; }
.kb-content-body h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold-light);
    margin: 1.75rem 0 0.65rem;
}
.kb-content-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin: 1.25rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Paragraphs */
.kb-content-body p {
    margin-bottom: 1rem;
    color: var(--white);
}

/* Bold / Italic */
.kb-content-body strong, .kb-content-body b { color: var(--white); font-weight: 700; }
.kb-content-body em, .kb-content-body i { color: var(--muted); font-style: italic; }

/* Lists */
.kb-content-body ul,
.kb-content-body ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
    padding: 0;
}
.kb-content-body li {
    margin-bottom: 0.45rem;
    color: var(--white);
    line-height: 1.75;
}
.kb-content-body ul li { list-style-type: disc; }
.kb-content-body ol li { list-style-type: decimal; }
.kb-content-body li::marker { color: var(--gold); }

/* Nested lists */
.kb-content-body ul ul,
.kb-content-body ol ol,
.kb-content-body ul ol,
.kb-content-body ol ul {
    margin: 0.35rem 0 0.35rem 1.25rem;
}

/* Tables */
.kb-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 2rem;
    font-size: 0.88rem;
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--dark-border);
    display: table;
}
.kb-content-body thead tr {
    background: rgba(200,169,110,0.1);
    border-bottom: 2px solid var(--dark-border);
}
.kb-content-body th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--dark-border);
}
.kb-content-body td {
    padding: 0.7rem 1rem;
    border: 1px solid var(--dark-border);
    color: var(--white);
    vertical-align: top;
    line-height: 1.65;
}
.kb-content-body tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}
.kb-content-body tr:hover td {
    background: rgba(200,169,110,0.04);
    transition: background 0.2s;
}
/* Responsive tables */
.kb-content-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Blockquotes */
.kb-content-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--gold);
    background: rgba(200,169,110,0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--muted);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.8;
}
.kb-content-body blockquote strong { color: var(--white); }

/* Links */
.kb-content-body a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.kb-content-body a:hover { color: var(--gold-light); }

/* Horizontal rule */
.kb-content-body hr {
    border: none;
    border-top: 1px solid var(--dark-border);
    margin: 2rem 0;
}

/* Code */
.kb-content-body code {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--dark-border);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gold-light);
}
.kb-content-body pre {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.kb-content-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.82rem;
}

/* Images */
.kb-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    border: 1px solid var(--dark-border);
}

/* Light theme overrides */
[data-theme="light"] .kb-content-body,
[data-theme="light"] .kb-content-body p,
[data-theme="light"] .kb-content-body li,
[data-theme="light"] .kb-content-body td,
[data-theme="light"] .kb-content-body strong,
[data-theme="light"] .kb-content-body b { color: #111118; }

[data-theme="light"] .kb-content-body h1,
[data-theme="light"] .kb-content-body h2 { color: #003147; border-bottom-color: #DCDCE4; }
[data-theme="light"] .kb-content-body h3 { color: #003147; }
[data-theme="light"] .kb-content-body h4 { color: #111118; }

[data-theme="light"] .kb-content-body table { background: #fff; border-color: #DCDCE4; }
[data-theme="light"] .kb-content-body thead tr { background: #f0f4f8; border-bottom-color: #DCDCE4; }
[data-theme="light"] .kb-content-body th { color: #003147; border-color: #DCDCE4; }
[data-theme="light"] .kb-content-body td { color: #111118; border-color: #DCDCE4; }
[data-theme="light"] .kb-content-body tr:nth-child(even) td { background: #f8f9fc; }
[data-theme="light"] .kb-content-body tr:hover td { background: #eef4f8; }

[data-theme="light"] .kb-content-body blockquote { background: #f0f4f8; color: #555566; border-left-color: #003147; }
[data-theme="light"] .kb-content-body a { color: #003147; }
[data-theme="light"] .kb-content-body a:hover { color: #1A5C6B; }
[data-theme="light"] .kb-content-body code { background: #f0f4f8; border-color: #DCDCE4; color: #003147; }
[data-theme="light"] .kb-content-body em { color: #555566; }
[data-theme="light"] .kb-content-body li::marker { color: #003147; }
[data-theme="light"] .kb-content-body hr { border-color: #DCDCE4; }
[data-theme="light"] .kb-content-body img { border-color: #DCDCE4; }