/* ========================================
   nav-styles.css — SYN-TECH English
   Unified Single-Bar Sticky Navbar
   Last updated: 2026-05-25
   ======================================== */

/* ── Design Tokens ── */
:root {
    --nav-height: 68px;
    --nav-bg: rgba(255, 255, 255, 0.90);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.97);
    --nav-border: rgba(46, 74, 58, 0.10);
    --nav-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    --nav-shadow-scrolled: 0 4px 28px rgba(0, 0, 0, 0.10);
    --nav-brand: #2E4A3A;
    --nav-brand-2: #6E5834;
    --nav-ink: #0f1f1a;
    --nav-ink-muted: rgba(15, 31, 26, 0.60);
    --nav-accent: #2E4A3A;

    /* Legacy tokens (keep for pages that may reference them) */
    --primary-color: #0077CC;
    --secondary-color: #0066cc;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --hover-color: #FF9933;
}

/* ── Sticky Container ── */
#navigation-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* ── Navbar Shell ── */
.site-navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-navbar.is-scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: var(--nav-shadow-scrolled);
}

/* ── Inner Layout ── */
.navbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ── Brand / Logo ── */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 5px rgba(46, 74, 58, 0.18));
    transition: transform 0.2s ease;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.04);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name-en {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--nav-brand);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.brand-tagline {
    font-size: 0.70rem;
    color: var(--nav-brand-2);
    opacity: 0.80;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Nav Links ── */
.navbar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: 0.15rem;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nav-ink);
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-chevron {
    font-size: 0.68rem;
    opacity: 0.55;
    transition: transform 0.2s ease;
}

.nav-item:hover > a,
.nav-item.is-active > a {
    background: rgba(46, 74, 58, 0.09);
    color: var(--nav-accent);
}

.nav-item:hover > a .nav-chevron {
    transform: rotate(180deg);
}

/* Active underline indicator */
.nav-item.is-active > a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(90deg, var(--nav-brand), var(--nav-brand-2));
    border-radius: 2px;
}

/* ── Dropdown Panel ── */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    border: 1px solid var(--nav-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
    z-index: 9999;
}

/* Hover bridge to prevent flicker */
.nav-item.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    z-index: 9998;
}

.nav-item.has-dropdown:hover .dropdown-panel,
.nav-item.has-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-panel li + li {
    border-top: 1px solid rgba(15, 31, 26, 0.06);
}

.dropdown-panel li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.2rem;
    color: var(--nav-ink);
    text-decoration: none;
    font-size: 0.90rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dropdown-panel li a:hover {
    background: rgba(46, 74, 58, 0.07);
    color: var(--nav-accent);
    border-left-color: var(--nav-brand);
}

.dropdown-panel li a i {
    width: 15px;
    font-size: 0.82rem;
    color: var(--nav-brand-2);
    opacity: 0.80;
    flex-shrink: 0;
}

/* ── Right Action Pills ── */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.44rem 0.9rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--nav-brand);
    border: 1px solid rgba(46, 74, 58, 0.28);
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(6px);
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-pill:hover {
    background: rgba(46, 74, 58, 0.09);
    border-color: rgba(110, 88, 52, 0.50);
    transform: translateY(-1px);
    color: var(--nav-brand);
}

/* ── Language Dropdown ── */
.lang-pill-dropdown {
    position: relative;
}

.lang-pill-btn {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.60);
}

.lang-pill-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.lang-pill-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: white;
    border: 1px solid rgba(46, 74, 58, 0.18);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    min-width: 120px;
    padding: 4px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 9999;
}

.lang-pill-menu.open {
    display: block;
}

.lang-pill-menu li,
.lang-pill-menu li:before {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lang-pill-menu li a {
    display: block !important;
    padding: 0.5rem 1.1rem !important;
    font-size: 0.86rem !important;
    font-weight: 600;
    color: var(--nav-brand) !important;
    text-decoration: none !important;
    white-space: nowrap;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    transform: none !important;
    transition: background 0.15s;
}

.lang-pill-menu li a:hover {
    background: rgba(46, 74, 58, 0.07) !important;
    transform: none !important;
}

/* ── Mobile Toggle ── */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--nav-ink);
    font-size: 1.25rem;
    padding: 0.5rem 0.55rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.18s ease;
    line-height: 1;
}

.mobile-toggle:hover {
    background: rgba(46, 74, 58, 0.08);
}

/* ── Responsive: 1024px ── */
@media (max-width: 1024px) {
    .brand-tagline { display: none; }
    .navbar-links  { gap: 0; }
    .nav-item > a  { padding: 0.5rem 0.75rem; font-size: 0.88rem; }
    .nav-pill span { display: none; }
    .nav-pill      { padding: 0.44rem 0.65rem; }
}

/* ── Responsive: 768px (Mobile) ── */
@media (max-width: 768px) {
    .mobile-toggle  { display: block; }
    .brand-tagline  { display: none; }
    .brand-name-en  { font-size: 0.82rem; }
    .brand-logo     { height: 34px; }
    .nav-pill span  { display: none; }
    .nav-pill       { padding: 0.42rem 0.6rem; }

    /* Mobile nav panel */
    .navbar-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid var(--nav-border);
        border-bottom: 1px solid var(--nav-border);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.10);
        padding: 0.4rem 0 0.6rem;
        z-index: 999;
    }

    .navbar-links.is-open { display: flex; }

    .nav-item > a {
        padding: 0.85rem 1.25rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(15, 31, 26, 0.06);
        justify-content: space-between;
    }

    .nav-item.is-active > a::after { display: none; }

    /* Mobile dropdown (slide in) */
    .dropdown-panel {
        position: static;
        opacity: 1 !important;
        visibility: hidden;
        transform: none !important;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(46, 74, 58, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, visibility 0.3s;
        padding: 0;
        pointer-events: auto;
    }

    .nav-item.mobile-open .dropdown-panel {
        visibility: visible;
        max-height: 500px;
    }

    .dropdown-panel li a {
        padding: 0.75rem 1.6rem;
        border-left: none;
        border-bottom: 1px solid rgba(15, 31, 26, 0.05);
        font-size: 0.90rem;
    }

    /* Flip chevron on mobile open */
    .nav-item.mobile-open > a .nav-chevron {
        transform: rotate(180deg);
    }

    /* Hide hover bridge on mobile */
    .nav-item.has-dropdown::before { display: none; }
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
    .navbar-inner { padding: 0 1rem; gap: 0.6rem; }
    .brand-name-en { display: none; }
}
