/* navbar.css - Clean Focus & Hover (Keep Original Layout) */

/* ======== MAIN NAVBAR - MODERN 2026 STYLE ======== */
#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Modern gradient background for 2026 */
    background: linear-gradient(
        135deg,
        rgba(10, 15, 18, 0.85) 0%,
        rgba(18, 25, 28, 0.9) 50%,
        rgba(14, 20, 22, 0.88) 100%
    );
    /* Enhanced glass morphism effect */
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    color: #fff;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 clamp(24px, 4vw, 48px);
    /* Modern refined shadow */
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    /* Subtle glow border */
    border-bottom: 1px solid rgba(105, 178, 84, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state - slightly more solid */
#navbar.scrolled {
    background: linear-gradient(
        135deg,
        rgba(10, 15, 18, 0.92) 0%,
        rgba(18, 25, 28, 0.95) 50%,
        rgba(14, 20, 22, 0.93) 100%
    );
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ======== LOGO & BRAND - MODERN 2026 ======== */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 10px;
    border-radius: 12px;
    margin-left: -10px;
    position: relative;
}

.logo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(105, 178, 84, 0) 0%,
        rgba(105, 178, 84, 0.08) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo:hover::before {
    opacity: 1;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo img {
    height: 52px;
    width: 52px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    filter: brightness(1);
}

.logo:hover img {
    filter:
        drop-shadow(0 4px 12px rgba(105, 178, 84, 0.5))
        drop-shadow(0 0 20px rgba(105, 178, 84, 0.3))
        brightness(1.1);
    transform: scale(1.05) rotate(-3deg);
}

.brand-name {
    font-weight: 700;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #69B254 0%, #7bc463 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
}

.logo:hover .brand-name {
    background: linear-gradient(135deg, #7bc463 0%, #8dd470 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(105, 178, 84, 0.4));
}

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

.nav-links li {
    position: relative;
}

.nav-links li a {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

/* Responsive padding for large desktops only (1201px-1400px) */
@media (min-width: 1201px) and (max-width: 1400px) {
    .nav-links li a {
        padding: 10px 14px;
        font-size: 0.92rem;
    }

    .nav-links {
        gap: 2px;
    }

    #navbar .login-btn {
        padding: 10px 20px;
        margin-left: 8px;
        font-size: 0.92rem;
    }
}

/* Very large desktops (1400px+) - standard spacing */
@media (min-width: 1401px) {
    .nav-links li a {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 4px;
    }
}

/* Modern 2026 hover with glow */
.nav-links li a:hover {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        rgba(105, 178, 84, 0.15) 0%,
        rgba(105, 178, 84, 0.08) 100%
    );
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(105, 178, 84, 0.15);
}

/* Modern bottom line indicator with glow */
.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(105, 178, 84, 0.3),
        #69B254,
        rgba(105, 178, 84, 0.3)
    );
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(105, 178, 84, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Focus for accessibility */
.nav-links li a:focus-visible {
    outline: 2px solid #69B254;
    outline-offset: 3px;
    background: rgba(105, 178, 84, 0.12);
}

/* ======== LOGIN BUTTON - MODERN 2026 STYLE ======== */
#navbar .login-btn {
    padding: 10px 24px;
    /* Modern multi-layer gradient */
    background: linear-gradient(
        135deg,
        #69B254 0%,
        #5fa149 50%,
        #56a041 100%
    );
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.94rem;
    cursor: pointer;
    letter-spacing: 0.2px;
    margin-left: 12px;
    position: relative;
    overflow: hidden;

    /* Modern layered shadow */
    box-shadow:
        0 2px 8px rgba(105, 178, 84, 0.2),
        0 6px 20px rgba(105, 178, 84, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shine effect on hover */
#navbar .login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

#navbar .login-btn:hover::before {
    left: 100%;
}

#navbar .login-btn:hover {
    background: linear-gradient(
        135deg,
        #7bc463 0%,
        #69B254 50%,
        #5fa149 100%
    );
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(105, 178, 84, 0.3),
        0 8px 28px rgba(105, 178, 84, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

#navbar .login-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 6px rgba(105, 178, 84, 0.3),
        inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

#navbar .login-btn:focus-visible {
    outline: 2px solid #8dd470;
    outline-offset: 3px;
}

/* ======== USER BOX & AVATAR - MODERN 2026 ======== */
.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    /* Modern layered border */
    border: 2px solid rgba(105, 178, 84, 0.5);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(105, 178, 84, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Rotating glow effect on hover */
.user-avatar:hover {
    border-color: #69B254;
    transform: scale(1.1) rotate(5deg);
    box-shadow:
        0 6px 20px rgba(105, 178, 84, 0.4),
        0 0 0 4px rgba(105, 178, 84, 0.2),
        0 0 20px rgba(105, 178, 84, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.user-avatar:focus-visible {
    outline: 2px solid #69B254;
    outline-offset: 3px;
}

/* ======== HAMBURGER MENU - MODERN 2026 ======== */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(105, 178, 84, 0.25);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu:hover {
    background: linear-gradient(
        135deg,
        rgba(105, 178, 84, 0.15) 0%,
        rgba(105, 178, 84, 0.08) 100%
    );
    border-color: #69B254;
    box-shadow:
        0 4px 12px rgba(105, 178, 84, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger-menu span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: linear-gradient(90deg, #69B254, #7bc463);
    border-radius: 2px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(105, 178, 84, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======== LANGUAGE SWITCHER - MODERN 2026 ======== */
.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    cursor: pointer;
    outline: none;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn img {
    width: 22px;
    height: 22px;
    display: block;
    transition: all 0.3s ease;
    filter: brightness(0.95);
}

.lang-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(105, 178, 84, 0.15) 0%,
        rgba(105, 178, 84, 0.08) 100%
    );
    border-color: rgba(105, 178, 84, 0.4);
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 4px 12px rgba(105, 178, 84, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lang-btn:hover img {
    filter: brightness(1.1);
    transform: scale(1.1);
}

.lang-btn.selected {
    background: linear-gradient(
        135deg,
        rgba(105, 178, 84, 0.25) 0%,
        rgba(105, 178, 84, 0.15) 100%
    );
    border-color: rgba(105, 178, 84, 0.6);
    box-shadow:
        0 0 0 2px rgba(105, 178, 84, 0.2),
        0 4px 12px rgba(105, 178, 84, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.lang-btn.selected img {
    filter: brightness(1.15);
}

.lang-btn:focus-visible {
    outline: 2px solid #69B254;
    outline-offset: 2px;
}

/* ========= RESPONSIVE ========= */

/* Tablet / small desktop */
@media (max-width: 900px) {
    #navbar {
        padding: 0 20px;
        height: 66px;
        position: relative;
    }

    /* Hamburger menu - always visible on right */
    .hamburger-menu {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1200;
    }

    /* User box - positioned in navbar, visibility controlled by JavaScript */
    .user-box {
        display: flex; /* navbar-mobile-fix.css controls this with attribute selectors */
        position: absolute !important;
        right: 80px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1200;
        margin: 0;
    }

    .user-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        cursor: pointer;
        border: 2px solid rgba(105, 178, 84, 0.4);
        transition: all 0.3s ease;
        display: block !important;
    }

    .user-avatar:hover {
        border-color: rgba(105, 178, 84, 0.7);
        transform: scale(1.08);
    }

    /* FULL-WIDTH MODERN MOBILE MENU */
    .nav-links {
        position: fixed;
        top: 66px;
        left: 0;
        right: 0;
        width: 100%;
        /* Clean gradient background */
        background: linear-gradient(
            180deg,
            rgba(14, 20, 22, 0.98) 0%,
            rgba(18, 25, 28, 0.99) 100%
        );
        backdrop-filter: blur(32px) saturate(200%);
        -webkit-backdrop-filter: blur(32px) saturate(200%);
        flex-direction: column;
        padding: 32px 24px 28px;
        display: none;
        /* Professional shadow */
        box-shadow:
            0 16px 56px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(105, 178, 84, 0.25);
        z-index: 1050;
        gap: 2px;
        border-bottom: 2px solid rgba(105, 178, 84, 0.3);
        max-height: calc(100vh - 66px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Full-width centered items */
    .nav-links li {
        width: 100%;
        list-style: none;
    }

    /* Large touch-friendly links */
    .nav-links li a,
    .nav-links li button {
        width: 100%;
        text-align: center;
        padding: 18px 24px;
        font-size: 1.15rem;
        font-weight: 500;
        border-radius: 14px;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.3px;
    }

    .nav-links li a:hover,
    .nav-links li button:hover {
        background: rgba(105, 178, 84, 0.15);
        color: #7bc463;
        transform: scale(1.02);
    }

    .nav-links li a::after {
        display: none;
    }

    /* Login button styling in mobile menu */
    .nav-links .login-btn {
        background: linear-gradient(135deg, #69B254 0%, #5fa149 100%);
        color: #fff;
        font-weight: 600;
        margin-top: 16px;
        box-shadow: 0 6px 20px rgba(105, 178, 84, 0.45);
        border: none;
        cursor: pointer;
    }

    .nav-links .login-btn:hover {
        background: linear-gradient(135deg, #5fa149 0%, #69B254 100%);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 28px rgba(105, 178, 84, 0.6);
    }

    /* Language switcher centered */
    .nav-links .language-switcher {
        margin-top: 20px;
        justify-content: center;
    }

    /* Smooth professional animation */
    .nav-links.open {
        display: flex;
        animation: slideDownFade 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideDownFade {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Custom scrollbar for menu */
    .nav-links::-webkit-scrollbar {
        width: 6px;
    }

    .nav-links::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: rgba(105, 178, 84, 0.5);
        border-radius: 10px;
    }

    /* Logo adjustment */
    .logo {
        order: 1;
    }

    .logo img {
        height: 46px;
        width: 46px;
    }

    .brand-name {
        font-size: 1.2rem;
    }
}

/* Phone */
@media (max-width: 600px) {
    #navbar {
        height: 62px;
        padding: 0 16px;
    }

    .logo img {
        height: 42px;
        width: 42px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    /* Hamburger positioning */
    .hamburger-menu {
        right: 16px;
    }

    /* User box positioning */
    .user-box {
        right: 72px;
    }

    /* Full-width menu on phone */
    .nav-links {
        top: 62px;
        padding: 28px 20px 24px;
    }

    .nav-links li a,
    .nav-links li button {
        padding: 16px 20px;
        font-size: 1.08rem;
        min-height: 56px;
    }

    /* Login button in mobile menu */
    .nav-links .login-btn {
        margin-top: 16px;
        width: 100%;
    }

    /* Language switcher */
    .language-switcher {
        gap: 8px;
    }

    .lang-btn {
        padding: 7px;
    }

    .lang-btn img {
        width: 22px;
        height: 22px;
    }

    /* User avatar in navbar */
    .user-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    #navbar {
        height: 58px;
        padding: 0 12px;
    }

    .logo img {
        height: 38px;
        width: 38px;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .hamburger-menu {
        width: 38px;
        height: 38px;
        right: 12px;
    }

    .user-box {
        right: 64px;
    }

    .nav-links {
        top: 58px;
        padding: 24px 16px 20px;
    }

    .nav-links li a,
    .nav-links li button {
        padding: 14px 16px;
        font-size: 1.05rem;
        min-height: 54px;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
    }
}

/* ========= ACCESSIBILITY ========= */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch devices - larger targets */
@media (hover: none) and (pointer: coarse) {
    .nav-links li a,
    #navbar .login-btn {
        min-height: 48px;
        padding: 14px 20px;
    }

    .hamburger-menu {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    #navbar {
        border-bottom: 2px solid #69B254;
    }

    .nav-links li a,
    #navbar .login-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* ========= LANDSCAPE ORIENTATION OPTIMIZATIONS ========= */

/* Mobile Landscape - compact navbar */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    #navbar {
        height: 56px;
        padding: 0 16px;
    }

    .logo img {
        height: 38px;
        width: 38px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .nav-links {
        top: 56px;
        padding: 16px 0 12px;
    }

    .nav-links li a {
        padding: 10px 16px;
        font-size: 0.92rem;
    }

    #navbar .login-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
        margin: 6px auto;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .hamburger-menu {
        width: 36px;
        height: 36px;
    }
}

/* Tablet Landscape - optimized navbar */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    #navbar {
        height: 64px;
        padding: 0 20px;
    }

    .logo img {
        height: 44px;
        width: 44px;
    }

    .brand-name {
        font-size: 1.15rem;
    }
}

/* Very Small Phone Landscape - minimal navbar */
@media (max-width: 740px) and (max-height: 420px) and (orientation: landscape) {
    #navbar {
        height: 52px;
        padding: 0 12px;
    }

    .logo img {
        height: 34px;
        width: 34px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .nav-links {
        top: 52px;
        padding: 12px 0 8px;
        max-height: calc(100vh - 52px);
        overflow-y: auto;
    }

    .nav-links li a {
        padding: 8px 14px;
        font-size: 0.88rem;
    }

    .hamburger-menu {
        width: 34px;
        height: 34px;
    }
}
