/**
 * ==========================================================================
 * Filename: header.css
 * Folder: /site/css/
 * Version: 1.0.1
 * Author: Mr Jim
 * Website: weflipify.com
 * Description: Site header styles - dark navbar with white text
 * Copyright: Vianke Ltd 2025
 * Created: 2026-01-05
 * ==========================================================================
 */

/* ========================================
   Site Header - Dark Background
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

/* ========================================
   Logo
   ======================================== */
.site-header .logo {
    display: flex;
    align-items: center;
}

.site-header .logo-img {
    height: 36px;
    width: auto;
}

/* ========================================
   Main Navigation
   ======================================== */
.site-header .main-nav ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header .nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.site-header .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}

.site-header .nav-link svg {
    opacity: 0.7;
}

/* ========================================
   Dropdown Menu - HIDDEN BY DEFAULT
   ======================================== */
.site-header .has-dropdown {
    position: relative;
}

.site-header .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.site-header .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header .dropdown-content {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0.5rem;
    min-width: 220px;
}

.site-header .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569 !important;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.site-header .dropdown-item:hover {
    background: #f1f5f9;
    color: #2563eb !important;
}

.site-header .dropdown-icon {
    font-size: 1.25rem;
}

.site-header .dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.site-header .dropdown-item-all {
    color: #2563eb !important;
    font-weight: 500;
}

/* ========================================
   Header Actions
   ======================================== */
.site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header .login-link {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.site-header .login-link:hover {
    color: #fff !important;
}

/* ========================================
   Language Switcher
   ======================================== */
.site-header .lang-switcher {
    position: relative;
}

.site-header .lang-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.site-header .lang-btn:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
}

.site-header .lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.site-header .lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header .lang-option {
    display: block;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.site-header .lang-option:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.site-header .lang-option:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.site-header .lang-option:hover {
    background: #f1f5f9;
}

.site-header .lang-option.active {
    background: #2563eb;
    color: #fff;
}

/* ========================================
   Header Buttons
   ======================================== */
.site-header .btn-outline {
    color: #fff !important;
    border-color: rgba(255,255,255,0.5);
}

.site-header .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* ========================================
   Mobile Header Actions (hidden on desktop)
   ======================================== */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.mobile-lang-select {
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    padding-right: 1.2rem;
    min-width: 50px;
}

.mobile-lang-select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
}

.mobile-lang-select option {
    background: #0f172a;
    color: #fff;
}

.mobile-auth-link {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.4rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.mobile-auth-link:hover {
    color: #fff !important;
}

.mobile-auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.65rem;
    background: #2563eb;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.mobile-auth-btn:hover {
    background: #1d4ed8;
}

/* ========================================
   Responsive Header
   ======================================== */
@media (max-width: 1024px) {
    .site-header .main-nav {
        display: none;
    }

    .site-header .header-actions .btn-outline {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll - lock everything */
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }

    /* Lock header to screen width */
    .site-header {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        overflow: hidden !important;
    }

    .site-header .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    .site-header .header-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.5rem 0;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }

    /* Hide desktop navigation and actions */
    .site-header .main-nav {
        display: none !important;
    }

    .site-header .header-actions {
        display: none !important;
    }

    /* HIDE hamburger menu completely */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* Show mobile header actions - flex to fit */
    .mobile-header-actions {
        display: flex !important;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    /* Smaller logo on mobile */
    .site-header .logo-img {
        height: 24px;
        flex-shrink: 0;
    }

    /* Compact language select */
    .mobile-lang-select {
        padding: 4px 20px 4px 6px;
        font-size: 11px;
        min-width: 42px;
        background-position: right 4px center;
    }

    /* Compact login link */
    .mobile-auth-link {
        font-size: 12px;
        padding: 4px 6px;
    }

    /* Compact register button */
    .mobile-auth-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}