
/* ========================================
   Fardagam - Shared Navbar
======================================== */

.site-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;

    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    font-family: inherit;
}

.navbar-container {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    max-width: 1240px;
    min-height: 82px;

    margin: 0 auto;
    padding: 0 28px;

    gap: 28px;
}

/* ========================================
   Brand / Logo
======================================== */

.navbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 11px;

    color: #172554;
    text-decoration: none;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    border-radius: 15px;

    color: #ffffff;

    font-size: 27px;
    font-weight: 900;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-text strong {
    color: #172554;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.4;
}

.brand-text small {
    color: #7b8497;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* ========================================
   Navigation Links
======================================== */

.navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.navbar-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 14px;
    border-radius: 10px;

    color: #475569;
    text-decoration: none;
    white-space: nowrap;

    font-size: 13px;
    font-weight: 650;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.navbar-link::after {
    content: "";

    position: absolute;
    right: 14px;
    bottom: 5px;

    width: 0;
    height: 2px;

    border-radius: 2px;
    background: #54258f;

    transition: width 0.25s ease;
}

.navbar-link:hover {
    color: #54258f;
    background: #f6f3fb;
}

.navbar-link:hover::after {
    width: calc(100% - 28px);
}

/* ========================================
   Account Button
======================================== */

.navbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 125px;
    min-height: 43px;

    padding: 0 20px;
    border: 1px solid #172554;
    border-radius: 11px;

    background: #172554;
    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    box-shadow: 0 4px 12px rgba(23, 37, 84, 0.10);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.navbar-account-button:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    box-shadow: 0 7px 17px rgba(23, 37, 84, 0.17);
    transform: translateY(-1px);
}

.navbar-account-button:active {
    transform: translateY(0);
}

/* ========================================
   Mobile Menu Controls
======================================== */

.navbar-toggle,
.navbar-menu-button,
.navbar-mobile-account {
    display: none;
}

/* ========================================
   Keyboard Accessibility
======================================== */

.navbar-link:focus-visible,
.navbar-account-button:focus-visible,
.navbar-brand:focus-visible,
.navbar-menu-button:focus-visible {
    outline: 3px solid #a78bfa;
    outline-offset: 4px;
}

/* ========================================
   Tablet
======================================== */

@media (max-width: 1050px) {
    .navbar-container {
        gap: 14px;
        padding: 0 20px;
    }

    .navbar-links {
        gap: 2px;
    }

    .navbar-link {
        padding: 10px 9px;
        font-size: 12px;
    }

    .brand-text strong {
        font-size: 19px;
    }

    .navbar-account-button {
        min-width: 110px;
        padding: 0 14px;
    }
}

/* ========================================
   Mobile Navigation
======================================== */

@media (max-width: 780px) {
    .navbar-container {
        min-height: 72px;
        padding: 0 18px;
        gap: 12px;
    }

    .brand-mark {
        width: 41px;
        height: 41px;
        border-radius: 13px;
        font-size: 24px;
    }

    .brand-text strong {
        font-size: 19px;
    }

    .brand-text small {
        font-size: 9px;
    }

    /* Hide desktop account button */
    .navbar-actions {
        display: none;
    }

    /* Hamburger button */
    .navbar-menu-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;

        width: 43px;
        height: 43px;
        flex-shrink: 0;

        border: 1px solid #e2e8f0;
        border-radius: 12px;

        background: #ffffff;
        cursor: pointer;

        transition:
            background-color 0.2s ease,
            border-color 0.2s ease;
    }

    .navbar-menu-button:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

    .navbar-menu-button span {
        display: block;
        width: 19px;
        height: 2px;

        border-radius: 2px;
        background: #172554;

        transition:
            transform 0.25s ease,
            opacity 0.2s ease;
    }

    /* Dropdown menu */
    .navbar-links {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;

        padding: 14px 18px 18px;

        background: #ffffff;
        border-bottom: 1px solid #e5eaf2;
        box-shadow: 0 14px 25px rgba(15, 23, 42, 0.08);

        visibility: hidden;
        opacity: 0;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    .navbar-link {
        display: flex;
        justify-content: flex-start;

        width: 100%;
        min-height: 45px;

        padding: 12px 14px;
        border-radius: 9px;

        font-size: 14px;
    }

    .navbar-link::after {
        display: none;
    }

    .navbar-link:hover {
        background: #f6f3fb;
    }

    /* Open dropdown */
    .navbar-toggle:checked ~ .navbar-links {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* Animate hamburger into X */
    .navbar-toggle:checked ~ .navbar-menu-button span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .navbar-toggle:checked ~ .navbar-menu-button span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle:checked ~ .navbar-menu-button span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .navbar-toggle:focus-visible ~ .navbar-menu-button {
        outline: 3px solid #a78bfa;
        outline-offset: 4px;
    }

    /* Account button inside mobile menu */
    .navbar-mobile-account {
        display: flex;
        padding-top: 10px;
        margin-top: 5px;
        border-top: 1px solid #edf0f5;
    }

    .navbar-mobile-account .navbar-account-button {
        width: 100%;
        min-height: 46px;
    }
}

/* ========================================
   Small Mobile
======================================== */

@media (max-width: 380px) {
    .navbar-container {
        padding: 0 12px;
    }

    .brand-mark {
        width: 37px;
        height: 37px;
        font-size: 22px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        font-size: 8px;
    }

    .navbar-menu-button {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {
    .navbar-brand,
    .brand-mark,
    .navbar-link,
    .navbar-link::after,
    .navbar-account-button,
    .navbar-menu-button,
    .navbar-menu-button span,
    .navbar-links {
        transition: none;
    }
}
