/* Airbnb-style Header for Kaareez */

/* Import Sahel Font */
@font-face {
    font-family: 'Sahel';
    src: url("../fonts/Sahel-Light.woff2") format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sahel';
    src: url("../fonts/Sahel.woff2") format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sahel';
    src: url("../fonts/Sahel-Bold.woff2") format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sahel';
    src: url("../fonts/Sahel-Black.woff2") format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Header Container - from homepage styles */
.header-airbnb {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (min-width: 744px) {
    .header-content {
        padding: 0 var(--space-10);
    }
}

@media (min-width: 1128px) {
    .header-content {
        padding: 0 var(--space-20);
    }
}

/* Logo Section - from homepage styles */
.logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: none !important;
}

.logo-section:hover {
    transform: none !important;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: none !important;
}

.logo-section:hover .logo-icon {
    transform: none !important;
}

.logo-text {
    font-family: 'Sahel', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #00796b;
    display: inline-block;
}

@media (max-width: 768px) {
    .logo-text {
        display: inline-block !important;
    }
}

/* Header Slogan */
.header-slogan {
    font-family: 'Sahel', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Center Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Request Certificate Link - Unified Style */
.request-certificate-link {
    display: none;
    align-items: center;
    background: linear-gradient(135deg, #00A693 0%, #008F7A 100%);
    color: white;
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 166, 147, 0.15);
}

@media (min-width: 744px) {
    .request-certificate-link {
        display: inline-flex;
    }
}

.request-certificate-link:hover {
    background: linear-gradient(135deg, #008F7A 0%, #00796B 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 166, 147, 0.25);
}

/* Unified Certificate Button Style for all certificate CTAs */
.btn-certificate,
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #00A693 0%, #008F7A 100%);
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Sahel', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 166, 147, 0.15);
}

.btn-certificate:hover,
.cta-button:hover {
    background: linear-gradient(135deg, #008F7A 0%, #00796B 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 166, 147, 0.25);
}

/* Specific sizing for different contexts */
.btn-certificate {
    padding: 15px 40px;
    font-size: 18px;
}

.cta-section.producer .cta-button {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Language Selector Container */
.language-selector-wrapper {
    position: relative;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.language-selector:hover {
    background: var(--bg-secondary);
}

.language-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

/* RTL adjustment for language dropdown */
[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

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

.language-option {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.language-option:hover {
    background: var(--bg-secondary);
}

.language-option.active {
    background: var(--primary);
    color: white;
}

/* Account Section */
.account-section {
    position: relative;
}

/* Login Button (Not logged in) */
.login-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.login-button:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    text-decoration: none;
}

/* Account Button (Logged in) */
.account-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.account-button:hover,
.account-button.active {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

/* Account Icon */
.account-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
}

.account-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Sahel', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* Account Dropdown Menu */
.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

/* RTL adjustment for account dropdown */
[dir="rtl"] .account-dropdown {
    right: auto;
    left: 0;
}

.account-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-menu-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.account-menu-item {
    margin: 0;
}

.account-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.account-menu-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
}

.menu-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

.account-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* Responsive adjustments */
@media (max-width: 743px) {
    .header-content {
        padding: 0 var(--space-4);
    }
    
    /* Show certificate CTA button on mobile by reducing spacing and text */
    .request-certificate-link {
        display: inline-flex !important;
        font-size: 12px;
        padding: 3px 6px;
        margin-right: 8px;
    }
    
    /* Reduce spacing in header actions for mobile */
    .header-actions {
        gap: 8px;
    }
    
    /* Hide login text on mobile, keep only icon */
    .account-text {
        display: none !important;
    }
    
    /* Reduce header slogan font size and spacing */
    .header-slogan {
        font-size: 11px !important;
        line-height: 1.2;
        margin: 0 4px;
    }
    
    .account-dropdown {
        position: fixed;
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        min-width: unset;
        max-width: calc(100vw - 20px);
    }
    
    .language-dropdown {
        position: fixed;
        top: 70px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        min-width: 200px;
    }
    
    .language-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Ensure RTL dropdowns stay within viewport on mobile */
    [dir="rtl"] .account-dropdown {
        right: 10px;
        left: 10px;
    }
    
    [dir="rtl"] .language-dropdown {
        right: auto;
        left: 50%;
    }
}