/* ========================================
   CONSOLIDATED NAVBAR STYLES
   Single source of truth for all navbar styling
   ======================================== */

/* ================================
   BASE NAVBAR STYLES
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 998;
    padding: 0 0.5rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0.5rem;
    height: 100%;
    position: relative;
}

/* ================================
   LOGO SECTION
   ================================ */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.nav-logo svg {
    height: 2.25rem;
    width: auto;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1C1917;
}

.beta-tag {
    font-size: 0.625rem;
    font-weight: 600;
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    margin-left: 0.25rem;
}

/* ================================
   NAVIGATION MENU
   ================================ */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 2rem;
    gap: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu a {
    color: #4A4742;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #10B981;
}

/* ================================
   NAVIGATION ACTIONS
   ================================ */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: fit-content;
    margin-left: auto;
}

/* ================================
   LANGUAGE SELECTOR
   ================================ */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: #4A4742;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    min-width: fit-content;
}

.language-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1A1918;
}

.globe-icon {
    width: 1.125rem;
    height: 1.125rem;
    stroke-width: 1.5;
}

.chevron-icon {
    transition: transform 0.2s ease;
}

.language-selector:hover .chevron-icon {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #4A4742;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-family);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-option:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.language-option.active {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    font-weight: 600;
}

.nav-signin {
    color: #4A4742;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-signin:hover {
    color: #10B981;
}

.nav-cta {
    display: inline-block;
    background: #000000;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    border: 2px solid #000000;
    white-space: nowrap;
    min-width: fit-content;
}

.nav-cta:hover {
    background: #000000;
    border-color: #10B981;
    box-shadow: 0 0 0 2px #10B981;
    transform: none;
}

/* ================================
   MOBILE MENU
   ================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

/* When menu is open, ensure toggle stays on top */
body.menu-open .mobile-menu-toggle {
    z-index: 1002;
}

/* Show hamburger on desktop larger screens */
@media (min-width: 68.76rem) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hamburger span {
    display: block;
    width: 1.5rem;
    height: 0.125rem;
    background: #1C1917;
    transition: all 0.3s ease;
}

/* Hamburger animation */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(0.3125rem, -0.3125rem);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    padding: 6rem 2rem 2rem;
    height: 100%;
    overflow-y: auto;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.mobile-nav-menu li {
    margin-bottom: 1.5rem;
}

.mobile-nav-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1C1917;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.mobile-nav-menu a:hover {
    color: #10B981;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-actions .nav-signin {
    font-size: 1.125rem;
    text-align: center;
    padding: 1rem;
}

.mobile-menu-actions .nav-cta {
    font-size: 1.125rem;
    text-align: center;
    padding: 1rem 2rem;
    width: 100%;
    background: #000000;
    color: white;
    border: 2px solid #000000;
    border-radius: 0;
}

/* Mobile Language Selector */
.mobile-language-selector {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

.mobile-language-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mobile-lang-option {
    padding: 0.5rem 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-family);
    color: #4A4742;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-lang-option:hover,
.mobile-lang-option.active {
    background: #D1FAE5;
    border-color: #10B981;
    color: #059669;
}

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

/* Tablet */
@media (max-width: 64rem) {
    .navbar {
        height: 4.5rem;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
}

/* Navbar spacing adjustment for longer translations */
@media (max-width: 80rem) and (min-width: 68.76rem) {
    .nav-menu {
        gap: 1.25rem;
        padding: 0 1rem;
    }
    
    .nav-menu a {
        font-size: 0.75rem;
    }
}

/* Mobile Menu Breakpoint */
@media (max-width: 68.75rem) {
    .nav-menu,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Tablet - Adjust language selector */
@media (max-width: 64rem) {
    .language-text {
        display: none;
    }
    
    .language-btn {
        padding: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 48rem) {
    .navbar {
        height: 4.25rem;
    }
    
    .nav-logo svg {
        height: 2rem;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .beta-tag {
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
    }
}

/* Very Small Screens */
@media (max-width: 30rem) {
    .navbar {
        height: 3.75rem;
    }
}

