/* Modular Header Styles */

/* Top Navigation Bar */
.top-navigation-bar {
    background: #F2F2F2;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: 32px;
}

.top-navigation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.language-selection-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.language-selection-wrapper:hover {
    color: #000;
}

.language-display-text {
    font-weight: 500;
}

/* Language Selection Popup */
.language-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-selection-overlay.active {
    display: flex;
    opacity: 1;
}

.language-selection-popup {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.language-selection-overlay.active .language-selection-popup {
    transform: scale(1);
}

.language-popup-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.language-popup-heading {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.language-popup-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.language-popup-close-btn:hover {
    background: #f5f5f5;
    color: #000;
}

.language-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.language-option-item:hover {
    background: #f8f9fa;
}

.language-option-item.active {
    background: #e8f0ff;
    color: #0066FF;
}

.language-flag-emoji {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

.language-display-name {
    font-size: 16px;
    font-weight: 500;
}

.language-native-name {
    font-size: 14px;
    color: #666;
    margin-left: auto;
}

/* Main Header */
.main-site-header {
    background: #FFFFFF;
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    z-index: 1000;
}

.main-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand-logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-text {
    font-weight: 700;
    font-size: 16px;
    color: #000;
    letter-spacing: 0.5px;
}

.primary-navigation {
    display: flex;
    align-items: center;
    gap: 32px;
}

.primary-nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.primary-nav-link:hover {
    color: #000;
}

.header-action-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-login-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.user-login-link:hover {
    color: #000;
}

.get-started-btn {
    background: #45A72A;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.get-started-btn:hover {
    background: #3d8f24;
}

/* Hamburger Menu */
.mobile-menu-trigger {
    display: none;
}

.hamburger-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.hamburger-line-top,
.hamburger-line-middle,
.hamburger-line-bottom {
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Animation */
.hamburger-menu-btn.menu-active .hamburger-line-top {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu-btn.menu-active .hamburger-line-middle {
    opacity: 0;
}

.hamburger-menu-btn.menu-active .hamburger-line-bottom {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Panel */
.mobile-navigation-panel {
    display: none;
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-navigation-panel.panel-active {
    display: block;
    max-height: 500px;
    padding: 20px 24px;
}

.mobile-nav-links-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.1s;
}

.mobile-navigation-panel.panel-active .mobile-nav-links-section {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-link-item {
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #666;
    font-weight: 500;
}

.mobile-nav-link-item:hover {
    background: #f8f9fa;
    color: #000;
}

.mobile-nav-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.2s;
}

.mobile-navigation-panel.panel-active .mobile-nav-actions-section {
    opacity: 1;
    transform: translateY(0);
}

.mobile-user-login-link {
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #666;
    font-weight: 500;
}

.mobile-user-login-link:hover {
    background: #f8f9fa;
    color: #000;
}

.mobile-get-started-btn {
    background: #45A72A;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-get-started-btn:hover {
    background: #3d8f24;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .primary-navigation {
        display: none;
    }

    .header-action-buttons .user-login-link,
    .header-action-buttons .get-started-btn {
        display: none;
    }

    .mobile-menu-trigger {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-trigger {
        display: none;
    }

    .mobile-navigation-panel {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .main-header-container {
        padding: 0 16px;
    }

    .top-navigation-container {
        padding: 0 16px;
    }
}
