/* navbar.css
   Clean, modern navbar — matches home.css philosophy
   -------------------------------------------------- */

/* ── FOUC prevention: reserve space before JS loads ── */
#navbar_placeholder {
    min-height: 60px;
}

/* ── WRAPPER ─────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(43, 102, 82, 0.1);
    display: flex;
    align-items: center;
    padding: 0 5%;
    gap: 32px;
    box-sizing: border-box;

    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ── LOGO ─────────────────────────────────────────── */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-mark {
    width: 28px;
    height: 28px;
    background: #2b6652;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-mark svg {
    color: #fff;
}

.nav-logo-text {
    font-family: 'GmarketSansMedium', 'Chiron GoRound TC', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.nav-logo-text small {
    display: block;
    font-size: 10px;
    color: #2b6652;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ── DESKTOP NAV LINKS ────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    flex: 1;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    display: block;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-links li a:hover {
    background: #f0f7f4;
    color: #2b6652;
}

.nav-links li a.active {
    color: #2b6652;
    background: #e8f5f0;
}

/* ── RIGHT SIDE ───────────────────────────────────── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-lang {
    appearance: none;
    border: 1px solid #dde8e4;
    border-radius: 8px;
    padding: 5px 10px;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-size: 12px;
    color: #444;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s;
}

.nav-lang:hover {
    border-color: #2b6652;
}

.nav-btn {
    display: inline-block;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}

.nav-btn-ghost {
    background: transparent;
    color: #444;
    border: 1px solid #dde8e4;
}

.nav-btn-ghost:hover {
    border-color: #2b6652;
    color: #2b6652;
}

.nav-btn-primary {
    background: #2b6652;
    color: #fff !important;
}

.nav-btn-primary:hover {
    background: #1e4f3e;
}

/* ── HAMBURGER ────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.15s;
    margin-left: auto;
}

.nav-hamburger:hover {
    background: #f0f7f4;
}

.nav-hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── MOBILE DRAWER ────────────────────────────────── */
.nav-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(43, 102, 82, 0.1);
    padding: 12px 5% 20px;
    z-index: 99;

    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.nav-drawer.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.nav-drawer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.nav-drawer ul li a {
    display: block;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    padding: 11px 4px;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.15s;
}

.nav-drawer ul li:last-child a {
    border-bottom: none;
}

.nav-drawer ul li a:hover {
    color: #2b6652;
}

.nav-drawer-bottom {
    display: flex;
    gap: 8px;
    padding-top: 4px;
}

.nav-drawer-bottom .nav-btn {
    flex: 1;
    text-align: center;
}

.nav-drawer-lang {
    appearance: none;
    border: 1px solid #dde8e4;
    border-radius: 8px;
    padding: 7px 12px;
    font-family: 'Chiron GoRound TC', sans-serif;
    font-size: 13px;
    color: #444;
    background: transparent;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media screen and (max-width: 860px) {
    .nav-links,
    .nav-right {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-drawer {
        display: block;
    }
}