/* Premium Header Design System */
:root {
    --header-height: 80px;
    --header-bg: rgba(15, 15, 15, 0.98);
    --header-blur: 10px;
    --accent-color: #f9b442;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: #000000;
    backdrop-filter: blur(var(--header-blur));
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.header-fixed.scrolled {
    height: 70px;
    background: #000000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Light Header Mode Extensions */
.light-header .header-fixed {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.light-header .header-fixed.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-header .nav-link {
    color: #1f2937 !important;
}

.light-header .nav-link:hover,
.light-header .nav-link.active {
    color: #000000 !important;
}

.light-header .regional-selector {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #1f2937;
}

.light-header .regional-selector:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.light-header .mobile-toggle {
    background: #f3f4f6;
    color: #1f2937;
}

.light-header .logo-img {
    filter: brightness(0); /* Make black if logo is white */
}

.light-header .btn-auth {
    background: #000000;
    color: #ffffff;
}

.light-header .btn-auth:hover {
    background: #374151;
    color: #ffffff;
    border-color: #374151;
}

.nav-container {
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo-wrapper .logo-img {
    height: 45px;
    width: auto;
    transition: var(--transition-base);
}

.scrolled .logo-img {
    height: 38px;
}

/* Main Navigation */
.nav-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 1400px) {
    .nav-content {
        gap: 2.5rem;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 1400px) {
    .nav-menu {
        gap: 2rem;
    }
}

.nav-link {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-base);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    min-width: 250px;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
}

/* Scrollbar for dropdown */
.nav-dropdown::-webkit-scrollbar {
    width: 6px;
}

.nav-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.nav-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-base);
    font-weight: 500;
}

.nav-dropdown-item:hover {
    background: #f3f4f6;
    color: #000;
    transform: translateX(5px);
}

/* Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.regional-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
}

.regional-selector:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
}

.btn-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: #000;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.btn-auth:hover {
    background: transparent;
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Mobile Controls */
.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.mobile-toggle:active {
    background: var(--accent-color);
    color: #000;
}

/* Mobile Drawer Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 10001;
    transition: var(--transition-base);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.btn-close-drawer {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: #1e293b;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem;
    background: #f8fafc;
    border-radius: 16px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.drawer-link:hover {
    background: var(--accent-color);
    color: #000;
}

.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* Responsive Breakpoints */
@media (max-width: 1250px) {
    .nav-content {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-actions {
        gap: 0.75rem;
    }

    .nav-actions .regional-selector {
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
    }

    .nav-actions .regional-selector span:last-of-type {
        display: none;
        /* Hide currency text, keep symbol */
    }

    .nav-actions .btn-auth span {
        display: none;
    }

    .nav-actions .btn-auth {
        width: 45px;
        height: 45px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0 1rem;
    }

    .mobile-drawer {
        width: 85%;
        right: -85%;
    }

    .logo-wrapper .logo-img {
        height: 35px;
    }
}

/* Regional Modal Styles */
.regional-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.regional-modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.regional-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 20001;
}

.regional-modal-backdrop.show .regional-modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #4b5563;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #111;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.selection-item {
    border: 2px solid #f3f4f6;
    padding: 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.selection-item:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}

.selection-item.active {
    border-color: var(--accent-color);
    background: #fffdf9;
}

.selection-item.active::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.selection-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 1rem;
}

.selection-item.active .selection-icon {
    background: var(--accent-color);
    color: #000;
}

.selection-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
}

.selection-item.active .selection-text {
    color: #000;
}

.save-settings-btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.save-settings-btn:hover {
    opacity: 0.9;
    transform: scale(0.99);
}