/* =====================================================
   LOGOVARO NAVIGATION
   Premium desktop + mobile navigation
   ===================================================== */


/* =====================================================
   HEADER SHELL
   ===================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background:
        rgba(255, 255, 255, 0.92);

    border-bottom:
        1px solid rgba(226, 232, 240, 0.9);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.04);
}


.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    max-width: 1280px;

    min-height: 76px;

    margin: 0 auto;
    padding: 0 40px;
}


/* =====================================================
   BRAND
   ===================================================== */

.brand {
    display: inline-flex;
    align-items: center;

    color: #111827;

    font-size: 1.85rem;
    font-weight: 800;

    letter-spacing: -0.045em;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


.brand:hover {
    transform: translateY(-1px);
}


.brand-accent {
    background:
        linear-gradient(
            135deg,
            #635bff,
            #8b78ff
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


/* =====================================================
   DESKTOP NAVIGATION
   ===================================================== */

.main-nav {
    display: flex;
    align-items: center;

    gap: 10px;
}


.main-nav .nav-link,
.main-nav > a:not(.nav-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 14px;

    border-radius: 10px;

    color: #475467;

    font-size: 0.92rem;
    font-weight: 650;

    text-decoration: none;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.main-nav .nav-link:hover,
.main-nav > a:not(.nav-button):hover {
    color: #635bff;

    background: #f5f3ff;

    transform: translateY(-1px);
}


/* =====================================================
   NAVIGATION BUTTONS
   ===================================================== */

.nav-button,
.pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 17px;

    border: 0;
    border-radius: 11px;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}


.nav-register-button,
.nav-logout-button {
    background:
        linear-gradient(
            135deg,
            #635bff,
            #7568ff
        );

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(99, 91, 255, 0.17);
}


.nav-register-button:hover,
.nav-logout-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 26px rgba(99, 91, 255, 0.24);
}


.pwa-install-button {
    background: #f4f2ff;

    color: #635bff;

    border: 1px solid #ddd9ff;
}


.pwa-install-button:hover {
    background: #ebe8ff;

    transform: translateY(-1px);
}


.nav-logout-form {
    margin: 0;
}


/* =====================================================
   MOBILE TOGGLE
   ===================================================== */

.mobile-nav-toggle {
    display: none;

    position: relative;

    width: 46px;
    height: 46px;

    padding: 0;

    border: 1px solid #e3e6ec;
    border-radius: 13px;

    background: #ffffff;

    cursor: pointer;

    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.05);
}


.mobile-nav-toggle-line {
    position: absolute;

    left: 12px;

    width: 20px;
    height: 2px;

    border-radius: 999px;

    background: #172033;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease,
        top 0.25s ease;
}


.mobile-nav-toggle-line:nth-child(1) {
    top: 14px;
}


.mobile-nav-toggle-line:nth-child(2) {
    top: 21px;
}


.mobile-nav-toggle-line:nth-child(3) {
    top: 28px;
}


/* Hamburger → X */

.mobile-nav-toggle.is-open
.mobile-nav-toggle-line:nth-child(1) {
    top: 21px;

    transform: rotate(45deg);
}


.mobile-nav-toggle.is-open
.mobile-nav-toggle-line:nth-child(2) {
    opacity: 0;
}


.mobile-nav-toggle.is-open
.mobile-nav-toggle-line:nth-child(3) {
    top: 21px;

    transform: rotate(-45deg);
}


/* =====================================================
   TABLET / MOBILE
   ===================================================== */

@media (max-width: 820px) {

    .nav-container {
        position: relative;

        min-height: 68px;

        padding:
            0
            22px;
    }


    .brand {
        font-size: 1.65rem;
    }


    .mobile-nav-toggle {
        display: block;
    }


    .main-nav {
        position: absolute;

        top: calc(100% + 10px);
        left: 22px;
        right: 22px;

        display: none;
        flex-direction: column;
        align-items: stretch;

        gap: 8px;

        padding: 14px;

        border:
            1px solid rgba(226, 232, 240, 0.95);

        border-radius: 18px;

        background:
            rgba(255, 255, 255, 0.98);

        box-shadow:
            0 24px 50px rgba(15, 23, 42, 0.14);

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }


    .main-nav.is-open {
        display: flex;
    }


    .main-nav .nav-link,
    .main-nav > a:not(.nav-button),
    .main-nav .nav-button,
    .main-nav .pwa-install-button {
        width: 100%;

        min-height: 48px;

        justify-content: flex-start;

        padding:
            0
            16px;

        border-radius: 12px;
    }


    .main-nav .nav-link,
    .main-nav > a:not(.nav-button) {
        color: #344054;

        background: transparent;
    }


    .main-nav .nav-link:hover,
    .main-nav > a:not(.nav-button):hover {
        background: #f7f5ff;
    }


    .nav-logout-form {
        width: 100%;

        padding-top: 6px;

        border-top:
            1px solid #eef0f4;
    }


    .nav-logout-button {
        width: 100%;

        justify-content: center;
    }


    .nav-register-button {
        justify-content: center !important;
    }


    .pwa-install-button {
        justify-content: center !important;
    }

}

/* =====================================================
   HIDDEN PWA INSTALL BUTTON
   ===================================================== */

.pwa-install-button[hidden] {
    display: none !important;
}

/* =====================================================
   SMALL MOBILE
   ===================================================== */

@media (max-width: 480px) {

    .nav-container {
        padding:
            0
            18px;
    }


    .main-nav {
        left: 18px;
        right: 18px;
    }


    .brand {
        font-size: 1.55rem;
    }

}