/* ===================================
   HEADER STYLES
   =================================== */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* Header container */
#altimmo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    background: var(--color-bg-white);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    height: 120px;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

/* Body offset for fixed header */
body {
    padding-top: 120px;
    /* Matches #altimmo-header height */
}

/* Navigation container */
#altimmo-header .nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
}

@media (max-width: 1200px) {
    #altimmo-header .nav-container {
        padding: 0 24px;
        /* Restore padding on tablets/mobile */
    }
}

/* Logo */
#altimmo-header .logo img {
    height: 95px;
    width: auto;
    display: block;
}

/* Navigation menu */
#altimmo-header .nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
    align-items: center;
}

#altimmo-header .nav-menu a {
    text-decoration: none;
    color: var(--color-dark-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: var(--transition-base);
}

#altimmo-header .nav-menu a:hover {
    color: var(--color-blue-primary);
}

#altimmo-header .nav-menu a.active {
    color: var(--color-blue-primary);
    position: relative;
}

#altimmo-header .nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-blue);
    border-radius: 2px;
}

/* Dropdown */
.has-dropdown {
    position: relative;
    padding: var(--spacing-lg) 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-white);
    min-width: 300px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-md);
    padding: 10px 0;
    border: 1px solid #edf2f7;
    z-index: var(--z-dropdown);
}

.dropdown-content a {
    padding: 14px var(--spacing-lg) !important;
    font-size: var(--font-size-sm) !important;
    text-transform: none !important;
    display: block !important;
    color: var(--color-dark-primary) !important;
    border-bottom: 1px solid #f8fafc;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--color-blue-primary) !important;
}

.has-dropdown:hover .dropdown-content {
    display: block;
}

/* Contact info */
#altimmo-header .contact-info {
    display: flex;
    align-items: right;
    gap: 100px;
}

#altimmo-header .phone-link {
    text-decoration: none;
    color: var(--color-dark-primary);
    font-weight: var(--font-weight-extrabold);
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-base);
}

#altimmo-header .phone-link:hover {
    color: var(--color-blue-primary);
}

#altimmo-header .btn-quote {
    background: var(--color-dark-primary);
    color: var(--color-bg-white) !important;
    padding: var(--spacing-md) 30px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-extrabold);
    transition: var(--transition-fast);
}

#altimmo-header .btn-quote:hover {
    transform: scale(1.05);
}

/* Burger menu (mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: calc(var(--z-mobile-menu) + 1);
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-dark-primary);
    border-radius: 3px;
    transition: var(--transition-base);
}

/* Mobile styles */
@media (max-width: 1150px) {
    #altimmo-header {
        height: 90px;
    }

    body {
        padding-top: 90px;
    }

    #altimmo-header .logo img {
        height: 60px;
    }

    .menu-toggle {
        display: flex;
    }

    #altimmo-header .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: var(--color-bg-white);
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-lg);
        transition: var(--transition-slow);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: var(--z-mobile-menu);
    }

    #altimmo-header .nav-menu.active {
        right: 0;
    }

    #altimmo-header .btn-quote {
        display: none;
    }

    #altimmo-header .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        /* Prevent it from being too wide on tablets */
        height: 100vh;
        background: var(--color-bg-white);
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-lg);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        /* Smoother definition */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: var(--z-mobile-menu);
        padding-bottom: 40px;
        /* Space for phones */
    }

    /* Mobile Menu Backdrop */
    #altimmo-header .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease;
        pointer-events: none;
    }

    #altimmo-header .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        width: 200vw;
        /* Ensure it covers everything even if offset */
        left: -200vw;
        /* Position relative to the menu which is off-screen */
    }

    .has-dropdown {
        padding: 10px 0;
    }
}