/* ═══════════════════════════════════════════════════════════════════
   Header Modern - CityStone Theme
   A minimal, elegant, and modern header design
   ═══════════════════════════════════════════════════════════════════ */

/* CSS Variables for Header */
:root {
    --header-bg: rgba(255, 255, 255, 0.98);
    --header-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    --header-blur: blur(20px);
    --header-border: 1px solid rgba(0, 0, 0, 0.05);
    --header-height: 80px;
    --header-height-scrolled: 70px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Main Header Container */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: var(--header-blur);
    -webkit-backdrop-filter: var(--header-blur);
    box-shadow: none;
    border-bottom: var(--header-border);
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    box-shadow: var(--header-shadow);
    --header-bg: rgba(255, 255, 255, 0.95);
}

/* Header Inner Container */
.header-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
    transition: var(--transition-smooth);
}

.site-header.scrolled .header-content-wrapper {
    min-height: var(--header-height-scrolled);
}

/* ═══════════════════════════════════════════════════════════════════
   Logo / Branding
   ═══════════════════════════════════════════════════════════════════ */

.site-branding {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-2px);
}

.logo-link img {
    height: 55px;
    width: auto;
    transition: var(--transition-smooth);
}

.site-header.scrolled .logo-link img {
    height: 45px;
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.site-description {
    font-size: 0.8rem;
    margin: 0;
    color: #777;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════
   Navigation Menu
   ═══════════════════════════════════════════════════════════════════ */

.nav-bar {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.menu-items {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-items>li {
    position: relative;
}

.menu-items>li>a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition-smooth);
    position: relative;
}

.menu-items>li>a:hover,
.menu-items>li.current-menu-item>a {
    color: var(--primary-color);
    background: rgba(44, 62, 80, 0.06);
}

/* Menu Item Underline Effect */
.menu-items>li>a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.menu-items>li>a:hover::after,
.menu-items>li.current-menu-item>a::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown Arrow */
.dropdown-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    font-size: 0.7rem;
    color: #888;
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-items>li:hover>.dropdown-arrow,
.menu-items>li.has-child:hover .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--secondary-color);
}

/* Dropdown Menu */
.menu-items .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    z-index: 100;
    list-style: none;
}

.menu-items>li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-items .sub-menu li a {
    display: block;
    padding: 12px 16px;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.menu-items .sub-menu li a:hover {
    background: rgba(44, 62, 80, 0.06);
    color: var(--primary-color);
}

/* ═══════════════════════════════════════════════════════════════════
   Header Actions (CTA Button)
   ═══════════════════════════════════════════════════════════════════ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.25);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.35);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button i {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Header Search (Luxury Modern Overlay)
   ═══════════════════════════════════════════════════════════════════ */

.search-toggle-modern {
    background: rgba(44, 62, 80, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--primary-color);
}

.search-toggle-modern:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-toggle-modern i {
    font-size: 1.2rem;
}

/* Overlay Styling */
.search-overlay-luxury {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    transform: scale(1.1);
}

.search-overlay-luxury.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.close-search-overlay {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 60px;
    height: 60px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ef4444;
    transition: var(--transition-smooth);
}

.close-search-overlay:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);
}

.search-overlay-content {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.search-overlay-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: rgba(44, 62, 80, 0.05);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1rem;
}

.search-overlay-form {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 15px;
    transition: var(--transition-smooth);
}

.search-overlay-form:focus-within {
    border-color: var(--primary-color);
}

.search-overlay-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e293b;
    outline: none;
    font-family: 'Alexandria', sans-serif;
    padding: 0 20px;
}

.search-overlay-input::placeholder {
    color: #cbd5e1;
}

.search-overlay-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.search-overlay-submit:hover {
    background: #1a252f;
    transform: translateX(-10px);
}

.search-overlay-suggestions {
    margin-top: 40px;
    color: #64748b;
    font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Mobile Menu Button
   ═══════════════════════════════════════════════════════════════════ */

.menu-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(44, 62, 80, 0.06);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.menu-trigger:hover {
    background: rgba(44, 62, 80, 0.12);
}

.menu-trigger i {
    font-size: 20px;
    color: var(--primary-color);
}

.close-menu {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: #f8f8f8;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.close-menu:hover {
    background: #fee;
}

.close-menu i {
    font-size: 18px;
    color: #e74c3c;
}

/* ═══════════════════════════════════════════════════════════════════
   Body Padding (for fixed header)
   ═══════════════════════════════════════════════════════════════════ */

body {
    padding-top: var(--header-height);
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive Design
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .menu-items>li>a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .header-content-wrapper {
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .menu-trigger {
        display: flex;
        order: -1;
    }

    .nav-bar {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        z-index: 1001;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        overflow-y: auto;
    }

    .nav-bar.active {
        right: 0;
    }

    .main-navigation {
        flex-direction: column;
        padding: 80px 20px 30px;
        align-items: stretch;
    }

    .menu-items {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .menu-items>li>a {
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .menu-items>li>a::after {
        display: none;
    }

    .menu-items .sub-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
    }

    .close-menu {
        display: flex;
    }

    .header-actions {
        display: none;
    }

    .site-branding {
        flex: 1;
    }

    .header-content-wrapper {
        min-height: 70px;
        padding: 0 15px;
    }

    body {
        padding-top: 70px;
    }
}

/* Mobile Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 576px) {
    .site-title {
        font-size: 1.1rem;
    }

    .site-description {
        font-size: 0.75rem;
    }

    .logo-link img {
        height: 45px;
    }

    .logo-link {
        gap: 10px;
    }
}