/* Base Reset & Variables */
:root {
    --primary: #06b6d4;        /* Vibrant Cyan */
    --primary-dark: #0891b2;   /* Deep Cyan */
    --accent: #f97316;         /* Bright Orange */
    --accent-dark: #ea580c;    /* Deep Orange */
    --dark-bg: #0f172a;        /* Deep Slate */
    --text-main: #334155;
    --text-dark: #0f172a;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8fafc;
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.top-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.top-bar .flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-area img {
    height: 65px;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 800;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    font-weight: 700;
}

.top-bar-social a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 15px;
    transition: color 0.2s;
}

.top-bar-social a:hover {
    color: var(--primary-dark);
}

.main-nav {
    background: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-list {
    display: flex;
    list-style: none;
    align-items: center;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 18px 20px;
    color: #f1f5f9;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.menu-link:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-bg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-top: 3px solid var(--primary);
    list-style: none;
    min-width: 240px;
    display: none;
    border-radius: 0 0 6px 6px;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    padding-left: 25px;
}

.menu-item:hover .dropdown-menu {
    display: block;
}

/* Announcements & News Marquees */
.ticker-wrap {
    background: #ecfeff;
    border-bottom: 1px solid #cffafe;
    padding: 12px 0;
    overflow: hidden;
}

.ticker-container {
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--accent);
    color: #ffffff;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    margin-right: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
    z-index: 2;
}

.ticker-track {
    display: flex;
    gap: 50px;
    width: max-content;
    animation: marqueeLeftToRight 5s linear infinite;
}

.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-track a {
    color: #164e63;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes marqueeLeftToRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01);
}

.news-widget h2 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.news-container-window {
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.news-feed-scroller {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    width: calc(100% - 20px);
    animation: marqueeBottomToTop 25s linear infinite;
}

.news-container-window:hover .news-feed-scroller {
    animation-play-state: paused;
}

@keyframes marqueeBottomToTop {
    0% { top: 100%; }
    100% { top: -100%; }
}

.news-item {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.news-item:nth-child(odd) {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary);
}

.news-item:nth-child(even) {
    background-color: #f0fdfa;
    border-left: 4px solid var(--primary-dark);
}

.news-item.urgent {
    background-color: #fff7ed !important;
    border-color: #ffedd5 !important;
    border-left: 4px solid var(--accent) !important;
}

.news-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.news-date {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.news-item h3 a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
}

.news-item.urgent h3 a { color: #7c2d12; }

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 420px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.slide-window {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr; }
    .menu-list { flex-direction: column; align-items: stretch; }
    .dropdown-menu { position: static; box-shadow: none; border-left: 2px solid var(--primary); border-top: none; background: rgba(0,0,0,0.1); }
}

/* Restoring Older Design Color Combinations */
.dynamic-bootstrap-nav {
    background-color: var(--dark-bg, #0f172a) !important; /* Original deep dark navigation background */
    border-bottom: none !important;
}

/* Base text navigation color layout */
.dynamic-bootstrap-nav .nav-link {
    font-family: 'Open Sans', sans-serif;
    color: #cbd5e1 !important; /* Original off-white/light gray links */
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
}

/* Hover & Active States matching older profile */
.dynamic-bootstrap-nav .nav-link:hover,
.dynamic-bootstrap-nav .nav-item:hover .nav-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05); /* Soft highlight on hover */
}

/* Explicit color exception rule for the Active Home marker */
.dynamic-bootstrap-nav .nav-link.active-home-link {
    color: var(--primary, #0ea5e9) !important;
}

/* Dropdown Container adjustments to match the legacy menu palette */
.dynamic-bootstrap-nav .dropdown-menu {
    background-color: var(--dark-bg, #0f172a) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 3px solid var(--primary, #0ea5e9) !important; /* Top colored accent indicator bar */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

/* Dropdown List elements theme mapping */
.dynamic-bootstrap-nav .dropdown-item {
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.dynamic-bootstrap-nav .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding-left: 20px;
}

/* Mobile Hamburger Toggle customization for dark background visibility */
.dynamic-bootstrap-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

.dynamic-bootstrap-nav .navbar-toggler-icon {
    filter: invert(1); /* Forces hamburger lines to turn crisp white on mobile viewports */
}
/* ===== Site Footer (shared across all pages via footer.php) ===== */
.site-footer { background: var(--dark-bg); color: #94a3b8; padding: 60px 0 20px; margin-top: 60px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #ffffff; font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; }
.footer-contact-link { display: flex; align-items: center; gap: 12px; color: #cbd5e1; text-decoration: none; margin-bottom: 15px; }
.footer-form { display: flex; flex-direction: column; gap: 12px; }
.footer-form-group { display: flex; gap: 10px; }
.footer-input { width: 100%; background: #1e293b; border: 1px solid #334155; padding: 10px 14px; border-radius: 6px; color: #ffffff; font-size: 0.85rem; outline: none; }
.footer-submit { background: var(--accent); color: #ffffff; border: none; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s; text-align: center; }
.footer-submit:hover { background: var(--accent-dark); }
.bottom-bar { border-top: 1px solid #1e293b; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; font-size: 0.8rem; gap: 10px; }
.bottom-bar a { color: inherit; }

/* ===== Shared page utility classes ===== */
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--text-dark); margin: 40px 0 20px; position: relative; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; background: var(--primary); border-radius: 2px; }
.page-header-panel {
    background: #ffffff;
    padding: 30px;
    margin: 20px 0 30px 0;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    border-left: 6px solid var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.page-header-panel h1 { font-size: 2rem; color: var(--text-dark); margin: 0 0 5px 0; font-weight: 800; }
.page-header-panel p { color: #64748b; margin: 0; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Mission / vision style accent blocks reused across static content pages */
.mission-layout { display: block; width: 100%; }
.vision-block { margin-top: 25px; padding-left: 15px; border-left: 3px solid var(--primary); }
.vision-epoch { margin-bottom: 25px; position: relative; }
.vision-epoch::before { content: ''; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.vision-header { font-weight: 800; color: var(--primary); font-size: 1.2rem; margin-bottom: 5px; }

/* ===== Compatibility layer: forcefully reskin legacy template classes
   to the new palette. Old stylesheet uses !important with low-specificity
   selectors, so these overrides use higher specificity + !important to win
   the cascade without touching any markup/PHP logic. ===== */
html body { background-color: #f8fafc !important; color: var(--text-main) !important; font-family: 'Open Sans', sans-serif !important; }

/* Page title banners: every inner page uses
   <header class="section background-primary text-center"><h1>...</h1></header>
   Reskin this into the new gradient hero banner site-wide. */
header.section.background-primary,
body header.section.background-primary,
.primary-color-primary header.section.background-primary {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%) !important;
    padding: 55px 20px !important;
    border-bottom: 4px solid var(--primary) !important;
}
header.section.background-primary h1 {
    font-weight: 800 !important;
    letter-spacing: 0.3px;
}

/* Any other primary/dark full-bleed band (e.g. facts sections, CTA strips) */
.section.background-primary:not(header),
body .section.background-primary:not(header) {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%) !important;
}
.section.background-dark,
body .section.background-dark {
    background-color: var(--dark-bg) !important;
}

/* Content sections sit in a centered card on the light background */
.section.background-white {
    background-color: transparent !important;
}
.section.background-white > .line {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px !important;
    margin: 30px auto !important;
    max-width: 1160px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

/* Links, buttons, accents */
body a, body a:link { color: var(--primary-dark) !important; }
body a:hover { color: var(--primary) !important; }
.button, .submit-form, input[type="submit"], .signin,
a.button, button.button {
    background-color: var(--accent) !important;
    border-color: var(--accent-dark) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}
.button:hover, .submit-form:hover, input[type="submit"]:hover {
    background-color: var(--accent-dark) !important;
}
.text-primary, a.text-primary-hover:hover, .icon-mail.text-primary,
.icon-twitter.text-primary, .icon-facebook.text-primary {
    color: var(--primary-dark) !important;
}

/* Tables (member lists, journals, payments etc.) */
body table { border-collapse: collapse; width: 100%; }
body table th {
    background-color: var(--dark-bg) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px !important;
}
body table td { padding: 8px 10px !important; border-color: var(--border-color) !important; }
body table tr:nth-child(even) { background-color: #f8fafc; }

/* Form inputs */
body input[type="text"], body input[type="email"], body input[type="password"],
body input[type="tel"], body input[type="number"], body textarea, body select {
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-family: 'Open Sans', sans-serif !important;
}
body input[type="text"]:focus, body input[type="email"]:focus, body textarea:focus {
    border-color: var(--primary) !important;
    outline: none !important;
}

.background-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary-dark) !important; }
.background-dark { background-color: var(--dark-bg) !important; }
.button.background-primary, .submit-form.background-primary { background-color: var(--accent) !important; border-color: var(--accent) !important; }
