/*==========================================
   Premium Header - FIXED HOVER & 4 COLUMNS
==========================================*/

:root {
    --primary: #ff6b00;
    --primary-dark: #e05a00;
    --text-dark: #1a1a1a;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --border-color: #dee2e6;
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-full: 9999px;
}

/* Header Base */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    border-bottom: 1px solid #dee2e6;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    padding: 0 15px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo img {
    height: 50px;
    width: auto;
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

/* ===== DROPDOWN FIX - PROPER HOVER AREA ===== */
.nav-item.dropdown {
    position: static;
}

/* Create a larger invisible bridge between nav item and dropdown */
.nav-item.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 30px;
    background: transparent;
    z-index: 9999;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    border-radius: 9999px;
    position: relative;
    z-index: 10;
}

.nav-link i {
    color: #ff6b00;
}

.nav-link.has-dropdown {
    padding-right: 1.8rem;
    position: relative;
}

.nav-link.has-dropdown::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.8rem;
    font-size: 0.8rem;
}

/* Dropdown Menu Container */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 99999;
    border: 1px solid #dee2e6;
    
    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

/* Show dropdown with proper hover */
.nav-item.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

/* Mega Menu - 4 COLUMNS */
.mega-menu {
    width: 1200px;
    max-width: 90vw;
    padding: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* If fewer than 4 categories, adjust columns */
.mega-menu-section {
    min-width: 0;
}

.mega-menu-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff6b00;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ff6b00;
    text-decoration: none;
}

.mega-menu-title i {
    font-size: 1rem;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.7rem;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.mega-menu-item:hover {
    background: #ff6b00;
    color: white;
    transform: translateX(5px);
}

.mega-menu-item:hover .mega-menu-icon {
    background: white;
    color: #ff6b00;
}

.mega-menu-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b00;
    transition: all 0.3s ease;
}

.mega-menu-content {
    flex: 1;
    overflow: hidden;
}

.mega-menu-content h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu-content p {
    font-size: 0.7rem;
    color: #6c757d;
    margin: 3px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu-item:hover .mega-menu-content p {
    color: rgba(255,255,255,0.9);
}

/* Service Areas Dropdown - FIX POSITION */
.nav-item:has(.service-areas-dropdown) {
    position: relative;
}

.service-areas-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: auto;
    transform: none;
    min-width: 300px;
    max-height: 450px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item i {
    color: #ff6b00;
    width: 24px;
    font-size: 1rem;
}

.dropdown-item div {
    flex: 1;
}

.dropdown-item strong {
    display: block;
    font-size: 0.9rem;
}

.dropdown-item small {
    font-size: 0.7rem;
    color: #6c757d;
    display: block;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #ff6b00;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

.dropdown-item:hover small {
    color: #ff6b00;
}

/* Prevent dropdowns from interfering with each other */
.nav-item.dropdown:first-child .dropdown-menu {
    left: 0;
    right: auto;
    transform: none;
}

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

.btn-cta {
    background: #ff6b00;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cta:hover {
    background: #e05a00;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,107,0,0.2);
}

.btn-cta i {
    transition: transform 0.3s ease;
}

.btn-cta:hover i {
    transform: translateX(5px);
}

/* ===== MOBILE MENU ===== */
.menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    background: #ff6b00;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    z-index: 999999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0 !important;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.mobile-menu-logo {
    max-height: 35px;
    width: auto;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: #ff6b00;
    color: white;
    transform: rotate(90deg);
}

.mobile-menu-content {
    padding: 1.5rem;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: #ff6b00;
    color: white;
}

.mobile-nav-link:hover i {
    color: white;
}

.mobile-nav-link span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-link i:first-child {
    color: #ff6b00;
    width: 20px;
}

.mobile-nav-link .chevron {
    transition: transform 0.3s ease;
}

.mobile-dropdown {
    display: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.mobile-dropdown.active {
    display: block !important;
}

/* Category header in mobile */
.category-header {
    background: #fff3e0 !important;
    margin: 10px 0 5px !important;
    border-radius: 8px !important;
}

.category-header .mobile-nav-link {
    background: #fff3e0 !important;
    color: #ff6b00 !important;
    font-weight: 700 !important;
}

/* Service items in mobile */
.service-item {
    padding-left: 15px !important;
}

.service-item .mobile-nav-link {
    background: transparent !important;
    font-size: 0.95rem;
}

.service-item .mobile-nav-link i {
    color: #ff6b00;
    font-size: 0.8rem;
}

.service-item .mobile-nav-link:hover {
    background: #f8f9fa !important;
}

/* Dropdown separator */
.dropdown-separator {
    height: 1px;
    background: #dee2e6;
    margin: 15px 0;
}

/* Mobile Menu Actions */
.mobile-menu-actions {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.mobile-menu-actions .btn-cta {
    width: 100%;
    justify-content: center;
    display: flex !important;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: none;
}

.overlay.active {
    display: block !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .mega-menu {
        width: 1000px;
        padding: 1.5rem;
    }
    
    .mega-menu-grid {
        gap: 1rem;
    }
    
    .mega-menu-content h4 {
        font-size: 0.8rem;
    }
    
    .mega-menu-item {
        padding: 0.6rem 0.7rem;
    }
}

@media (max-width: 991px) {
    .nav-desktop {
        display: none !important;
    }
    
    .menu-toggle {
        display: flex !important;
    }
    
    .btn-cta {
        display: none;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        width: 95vw;
        left: 50%;
        transform: translateX(-50%);
        padding: 1rem;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .mega-menu-section {
        margin-bottom: 0.5rem;
    }
    
    .mega-menu-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .mega-menu-item {
        padding: 0.5rem 0.75rem;
    }
    
    .mega-menu-content h4 {
        font-size: 0.85rem;
        white-space: normal;
    }
    
    .mega-menu-content p {
        white-space: normal;
        font-size: 0.7rem;
    }
    
    .service-areas-dropdown {
        width: 280px;
        right: 0;
        left: auto;
    }
}

@media (max-width: 576px) {
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .service-areas-dropdown {
        width: 260px;
    }
}