/**
 * HEADER COMPONENT CSS - Real Estate Professional
 * Brand Colors: #0066b3 | #00aeef | #f5821f
 */

/* CSS Variables for Header (fallback) */
:root {
    --color-primary: #0066b3;
    --color-secondary: #00aeef;
    --color-accent: #f5821f;
    --color-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-light: #f8fafc;
    --shadow-sm: 0 2px 8px rgba(0, 102, 179, 0.08);
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.site-header.header-solid {
    position: relative;
    background: var(--color-white);
}

.site-header.header-solid .header-content {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
}

/* Header Content */
.header-content {
    transition: all 0.4s ease;
}

.header-content.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Header Inner */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* height: 90px; */
}

.header-content.is-sticky .header-inner {
    /* height: 80px; */
}

/* ==========================================================================
   LOGO
   ========================================================================== */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    width: 45px;
    height: 45px;
    color: #fff;
    transition: color 0.3s ease;
}

.header-content.is-sticky .logo-icon,
.header-solid .logo-icon {
    color: var(--color-primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
}

.header-content.is-sticky .logo-name,
.header-solid .logo-name {
    color: var(--color-primary);
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
    transition: color 0.3s ease;
}

.header-content.is-sticky .logo-tagline,
.header-solid .logo-tagline {
    color: var(--color-secondary);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.header-nav {
    display: none;
}

@media (min-width: 992px) {
    .header-nav {
        display: block;
    }
    .header-logo img {
        height: 70px;
        width: auto;
        margin-top: 7px;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 10px 25px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.1em;
}

.header-content.is-sticky .nav-item > a,
.header-solid .nav-item > a {
    color: var(--text-primary);
}

.nav-item > a:hover,
.nav-item.active > a {
    color: var(--color-secondary);
}

/* Active Indicator */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 3px;
    background: var(--color-secondary);
}

/* Dropdown Arrow */
.nav-item.has-dropdown > a::after {
    content: '\f107';
    font-family: FontAwesome;
    margin-left: 6px;
    font-size: 1rem;
    opacity: 0.7;
}

/* Dropdown Menu - Override Bootstrap */
.header-nav .nav-menu .nav-item.has-dropdown > .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    padding: 12px 0;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 102, 179, 0.15);
    border-radius: 8px;
    border-top: 3px solid var(--color-primary, #0066b3);
    border-bottom: none;
    border-left: none;
    border-right: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    margin: 0;
    z-index: 1001;
    /* Override Bootstrap */
    display: block !important;
    float: none;
    font-size: inherit;
    text-align: left;
}

.header-nav .nav-menu .nav-item.has-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown menu items */
.header-nav .dropdown-menu li {
    margin: 0;
    list-style: none;
}

.header-nav .dropdown-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    background: transparent;
}

.header-nav .dropdown-menu > li > a:hover {
    color: var(--color-primary, #0066b3);
    background: #f8fafc;
    border-left-color: var(--color-primary, #0066b3);
    padding-left: 24px;
}

/* Submenu (Level 2) */
.header-nav .dropdown-menu li.has-submenu {
    position: relative;
}

.header-nav .dropdown-menu li.has-submenu > a i {
    font-size: 10px;
    color: #94a3b8;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.header-nav .dropdown-menu li.has-submenu:hover > a i {
    transform: translateX(3px);
    color: var(--color-primary, #0066b3);
}

.header-nav .dropdown-menu .submenu {
    position: absolute;
    top: -12px;
    left: 100%;
    min-width: 220px;
    padding: 12px 0;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 102, 179, 0.15);
    border-radius: 8px;
    border-left: 3px solid var(--color-secondary, #00aeef);
    border-top: none;
    border-bottom: none;
    border-right: none;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    /* Override Bootstrap */
    display: block !important;
}

.header-nav .dropdown-menu li.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.header-nav .dropdown-menu .submenu li {
    list-style: none;
}

.header-nav .dropdown-menu .submenu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    transition: all 0.25s ease;
    background: transparent;
}

.header-nav .dropdown-menu .submenu a:hover {
    color: var(--color-secondary, #00aeef);
    padding-left: 25px;
    background: #f8fafc;
}

/* ==========================================================================
   HEADER ACTIONS
   ========================================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Header Phone */
.header-phone {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

@media (min-width: 992px) {
    .header-phone {
        display: flex;
    }
}

.header-content.is-sticky .header-phone,
.header-solid .header-phone {
    border-color: var(--color-primary);
}

.header-phone:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.phone-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-icon i {
    font-size: 14px;
    color: #fff;
    transition: color 0.3s ease;
}

.header-content.is-sticky .phone-icon i,
.header-solid .phone-icon i {
    color: var(--color-primary);
}

.header-phone:hover .phone-icon i {
    color: #fff;
}

.phone-number {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.header-content.is-sticky .phone-number,
.header-solid .phone-number {
    color: var(--color-primary);
}

.header-phone:hover .phone-number {
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.header-content.is-sticky .mobile-toggle span,
.header-solid .mobile-toggle span {
    background: var(--color-primary);
}

/* ==========================================================================
   SOCIAL SIDEBAR
   ========================================================================== */
.social-sidebar {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

@media (max-width: 991px) {
    .social-sidebar {
        display: none;
    }
}

.social-sidebar a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-sidebar a:hover {
    color: var(--color-secondary);
    transform: scale(1.2);
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: var(--color-white);
    overflow-y: auto;
    transition: right 0.4s ease;
    z-index: 1002;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.mobile-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-close:hover {
    color: var(--color-secondary);
}

.mobile-nav {
    padding: 20px 0;
    margin: 0;
    list-style: none;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a {
    display: block;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--color-secondary);
    padding-left: 30px;
}

/* Mobile Submenu */
.mobile-nav li.has-submenu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav li.has-submenu > a::after {
    content: '\f107';
    font-family: FontAwesome;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.mobile-nav li.has-submenu.open > a::after {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    padding: 0;
    margin: 0;
    list-style: none;
    background: var(--bg-light);
}

.mobile-nav li.has-submenu.open > .mobile-submenu {
    display: block;
}

.mobile-submenu li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    padding: 12px 25px 12px 40px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.mobile-submenu a:hover {
    color: var(--color-secondary);
    padding-left: 45px;
}

.mobile-contact {
    padding: 20px 25px;
}

/* ==========================================================================
   PAGE TITLE BAR
   ========================================================================== */
.page-title-bar {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2840 100%);
    text-align: center;
}

.page-title-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    letter-spacing: -0.02em;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: var(--color-secondary);
}

.breadcrumb-nav .separator {
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-nav .current {
    color: var(--color-secondary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .header-inner {
        /* height: 70px; */
    }

    .logo-name {
        font-size: 22px;
    }

    .logo-tagline {
        display: none;
    }

    .page-title-bar {
        padding: 60px 0 40px;
    }

    .page-title {
        font-size: var(--fs-3xl);
    }
    
    .header-logo img {
        height: 50px;
        width: auto;
        margin-top: 2px;
    }

    
}

@media (max-width: 767px) {
    .header-inner {
        /* height: 60px; */
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    .logo-name {
        font-size: 18px;
    }

    .page-title-bar {
        padding: 50px 0 30px;
    }

    .page-title {
        font-size: var(--fs-2xl);
    }

    .breadcrumb-nav {
        font-size: 12px;
    }
}
