/* ============================================================
   NAVBAR.CSS — Cryptara
   Cleaned + responsive + language button beside hamburger
============================================================ */

/* ===== NAVBAR WRAPPER ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    padding: 0.8rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* Light mode */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    line-height: 1;
}

.logo-text span {
    color: var(--accent-orange);
    text-shadow: 0 0 8px rgba(255, 94, 0, 0.5);
}

/* ===== NAV LINKS ===== */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    flex: 1;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 0;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.15rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-orange);
    transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 94, 0, 0.45);
    outline: none;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-orange);
}

/* Light mode links */
[data-theme="light"] .nav-links a {
    color: rgba(0, 0, 0, 0.65);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a:focus-visible {
    color: rgba(0, 0, 0, 0.95);
    text-shadow: none;
}

[data-theme="light"] .nav-links a.active {
    color: #d97706;
}

[data-theme="light"] .nav-links a::after {
    box-shadow: none;
}

/* ===== RIGHT SIDE AREA ===== */
.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Optional compatibility if some navbar still uses nav-actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===== THEME TOGGLE, IF USED ===== */
.theme-toggle {
    position: relative;
    z-index: 10000;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.45rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent-orange);
    transform: scale(1.08);
}

[data-theme="light"] .theme-toggle {
    color: rgba(0, 0, 0, 0.8);
}

/* ===== LANGUAGE BUTTON ===== */
.lang-btn,
.lang-switcher {
    position: relative;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 58px;
    height: 34px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 94, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 94, 0, 0.16), rgba(255, 138, 0, 0.06));
    color: var(--accent-orange);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(255, 94, 0, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.lang-btn::before,
.lang-switcher::before {
    content: "\f0ac";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.72rem;
}

.lang-btn:hover,
.lang-switcher:hover {
    transform: translateY(-1px);
    border-color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(255, 94, 0, 0.28), rgba(255, 138, 0, 0.12));
    box-shadow: 0 0 18px rgba(255, 94, 0, 0.22);
    color: var(--accent-orange);
}

.lang-btn:active,
.lang-switcher:active {
    transform: translateY(0);
}

/* Light mode language button */
[data-theme="light"] .lang-btn,
[data-theme="light"] .lang-switcher {
    background: linear-gradient(135deg, rgba(255, 94, 0, 0.10), rgba(255, 138, 0, 0.04));
    border: 1px solid rgba(255, 94, 0, 0.28);
    color: #d97706;
    box-shadow: 0 2px 10px rgba(255, 94, 0, 0.10);
}

[data-theme="light"] .lang-btn:hover,
[data-theme="light"] .lang-switcher:hover {
    background: linear-gradient(135deg, rgba(255, 94, 0, 0.18), rgba(255, 138, 0, 0.08));
    color: #d97706;
}

/* ===== HAMBURGER ===== */
.hamburger {
    position: relative;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.55rem;
    cursor: pointer;
    padding: 0.45rem;
    line-height: 1;
    transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
    color: var(--accent-orange);
    text-shadow: 0 0 8px rgba(255, 94, 0, 0.5);
    outline: none;
}

[data-theme="light"] .hamburger {
    color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .hamburger:hover,
[data-theme="light"] .hamburger:focus-visible {
    color: #d97706;
    text-shadow: none;
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet / small laptop */
@media (max-width: 1200px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.88rem;
    }
}

/* Mobile navbar */
@media (max-width: 992px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.8rem 5%;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.45rem;
    }

    .logo-img {
        height: 30px;
    }

    .nav-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.65rem;
        order: 2;
    }

    .nav-actions {
        margin-left: auto;
    }

    .lang-btn,
    .lang-switcher {
        min-width: 52px;
        height: 32px;
        padding: 0 0.65rem;
        font-size: 0.72rem;
        order: 1;
    }

    .lang-btn::before,
    .lang-switcher::before {
        font-size: 0.68rem;
    }

    .hamburger {
        display: flex;
        order: 2;
        margin: 0;
    }

    .nav-links {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding: 1rem;
        border-radius: 16px;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 94, 0, 0.3);
        position: relative;
        z-index: 9999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.85rem 0.8rem;
        border-radius: 12px;
        font-size: 0.95rem;
        color: var(--text-secondary);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover,
    .nav-links a:focus-visible,
    .nav-links a.active {
        background: rgba(255, 94, 0, 0.12);
        border: 1px solid rgba(255, 94, 0, 0.35);
        box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.12);
        color: var(--accent-orange);
        text-shadow: none;
    }

    [data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .nav-links a {
        color: rgba(0, 0, 0, 0.68);
    }

    [data-theme="light"] .nav-links a:hover,
    [data-theme="light"] .nav-links a:focus-visible,
    [data-theme="light"] .nav-links a.active {
        background: rgba(255, 94, 0, 0.10);
        border: 1px solid rgba(255, 94, 0, 0.22);
        box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.10);
        color: #d97706;
    }
}

/* Small mobile */
@media (max-width: 600px) {
    .navbar {
        padding: 0.75rem 5%;
    }

    .logo {
        font-size: 1.3rem;
        gap: 7px;
    }

    .logo-img {
        height: 28px;
    }

    .nav-right {
        gap: 0.55rem;
    }

    .lang-btn,
    .lang-switcher {
        min-width: 48px;
        height: 30px;
        padding: 0 0.56rem;
        font-size: 0.68rem;
    }

    .hamburger {
        font-size: 1.42rem;
        padding: 0.4rem;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .navbar {
        padding: 0.7rem 4.5%;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-img {
        height: 26px;
    }

    .nav-right {
        gap: 0.48rem;
    }

    .lang-btn,
    .lang-switcher {
        min-width: 44px;
        height: 28px;
        padding: 0 0.5rem;
        font-size: 0.64rem;
    }

    .lang-btn::before,
    .lang-switcher::before {
        font-size: 0.62rem;
    }

    .hamburger {
        font-size: 1.35rem;
        padding: 0.35rem;
    }

    .nav-links {
        padding: 0.85rem;
        border-radius: 14px;
    }

    .nav-links a {
        padding: 0.78rem 0.7rem;
        font-size: 0.9rem;
    }
}

/* Very narrow screen */
@media (max-width: 360px) {
    .logo-text {
        display: none;
    }

    .logo-img {
        height: 30px;
    }

    .lang-btn,
    .lang-switcher {
        min-width: 42px;
        height: 27px;
        font-size: 0.62rem;
    }

    .hamburger {
        font-size: 1.3rem;
    }
}

/* ============================================================
   FORCE MOBILE LANG BUTTON BESIDE HAMBURGER
   Taruh PALING BAWAH navbar.css
============================================================ */

@media (max-width: 992px) {
    .navbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
    }

    .logo {
        order: 1 !important;
        flex-shrink: 0 !important;
    }

    .nav-right {
        order: 2 !important;
        margin-left: auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.6rem !important;
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .nav-right .lang-btn,
    .nav-right .lang-switcher {
        position: static !important;
        order: 1 !important;
        margin: 0 !important;
        display: inline-flex !important;
        width: auto !important;
        min-width: 46px !important;
        height: 28px !important;
        padding: 0 0.55rem !important;
        font-size: 0.65rem !important;
        line-height: 1 !important;
        flex: 0 0 auto !important;
    }

    .nav-right .hamburger {
        position: static !important;
        order: 2 !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
    }

    .nav-links {
        order: 3 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .nav-right {
        gap: 0.5rem !important;
    }

    .nav-right .lang-btn,
    .nav-right .lang-switcher {
        min-width: 42px !important;
        height: 26px !important;
        padding: 0 0.5rem !important;
        font-size: 0.62rem !important;
    }

    .nav-right .hamburger {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.35rem !important;
    }
}