/**
 * Modern Header & Mobile Menu CSS
 * Fully responsive with hamburger menu
 */

/* ========== Announcement/Marquee Bar ========== */
.announcement-bar {
    background: linear-gradient(135deg, #1E40AF, #3B82F6, #8B5CF6);
    color: #FFFFFF;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    z-index: 999;
}

.announcement-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.announcement-icon {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.marquee {
    display: flex;
    align-items: center;
    gap: 40px;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

.marquee span {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.marquee span.highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause on hover */
.marquee:hover {
    animation-play-state: paused;
}

/* ========== Modern Header ========== */
.modern-header {
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 998;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 100%;
    margin: 0;
    padding: 10px 20px 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    gap: 15px;
}

/* Logo */
.header-logo {
    height: 100px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
}

.header-logo a {
    display: block;
    height: 100%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.header-logo a:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
}

/* Desktop Navigation */
.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    max-width: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex-wrap: nowrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: #1E293B;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Mega Dropdown */
.dropdown-mega {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #FFFFFF;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 30px;
    width: 800px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item.has-dropdown:hover .dropdown-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
}

.mega-column h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-column h4 i {
    color: #3B82F6;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column ul li {
    margin: 8px 0;
}

.mega-column ul li a {
    color: #64748B;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    padding: 6px 0;
}

.mega-column ul li a:hover {
    color: #3B82F6;
    padding-left: 8px;
}

/* ========== 3-Level Cascading Dropdown ========== */
.dropdown-level1 {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 220px;
    list-style: none;
    margin: 0;
}

.nav-item.has-3level:hover > .dropdown-level1 {
    opacity: 1;
    visibility: visible;
}

.dropdown-level1 > li {
    position: relative;
}

.dropdown-level1 > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #1E293B;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dropdown-level1 > li > a:hover {
    background: #EFF6FF;
    color: #3B82F6;
}

.dropdown-level1 > li > a i.arrow-right {
    font-size: 10px;
    margin-left: 10px;
}

/* Level 2 - Services */
.dropdown-level2 {
    position: absolute;
    top: 0;
    left: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 260px;
    list-style: none;
    margin: 0 0 0 5px;
}

.has-sublevel:hover > .dropdown-level2 {
    opacity: 1;
    visibility: visible;
}

.dropdown-level2 > li {
    position: relative;
}

.dropdown-level2 > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.dropdown-level2 > li > a:hover {
    background: #F8FAFC;
    color: #3B82F6;
    padding-left: 25px;
}

/* Level 3 - Areas */
.dropdown-level3 {
    position: absolute;
    top: 0;
    left: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 200px;
    max-height: 450px;
    overflow-y: auto;
    list-style: none;
    margin-left: 5px;
    z-index: 10002;
}

.has-areas:hover > .dropdown-level3 {
    opacity: 1;
    visibility: visible;
}

.dropdown-level3 > li > a {
    display: block;
    padding: 8px 20px;
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.dropdown-level3 > li > a:hover {
    background: #EFF6FF;
    color: #3B82F6;
    padding-left: 25px;
}

/* Scrollbar for Level 2 & 3 */
.dropdown-level2::-webkit-scrollbar,
.dropdown-level3::-webkit-scrollbar {
    width: 6px;
}

.dropdown-level2::-webkit-scrollbar-track,
.dropdown-level3::-webkit-scrollbar-track {
    background: #F8FAFC;
    border-radius: 10px;
}

.dropdown-level2::-webkit-scrollbar-thumb,
.dropdown-level3::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

.dropdown-level2::-webkit-scrollbar-thumb:hover,
.dropdown-level3::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 120px;
}

.btn-call {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-call i {
    font-size: 20px;
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
}

.call-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.call-text small {
    font-size: 10px;
    opacity: 0.9;
}

.call-text strong {
    font-size: 14px;
    font-weight: 700;
}

.btn-quote {
    padding: 12px 20px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.btn-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    width: 28px;
    height: 3px;
    background: #1E293B;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #E2E8F0;
}

.mobile-logo {
    height: 50px;
    display: flex;
    align-items: center;
}

.mobile-logo img {
    height: 100%;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    object-position: left center;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Mobile Navigation */
.mobile-nav {
    padding: 20px 0;
}

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

.mobile-nav-menu > li {
    border-bottom: 1px solid #E2E8F0;
}

.mobile-nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #1E293B;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mobile-nav-menu > li > a i:first-child {
    margin-right: 12px;
    color: #3B82F6;
}

.mobile-nav-menu > li > a:hover {
    background: #F8FAFC;
    padding-left: 30px;
}

/* Submenu - All Levels */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #F8FAFC;
}

/* Level 1 Submenu (Categories) */
.has-submenu.active > .submenu.level-1 {
    max-height: 600px;
    overflow-y: auto;
}

/* Level 2 Submenu (Services) */
.has-submenu-l2.active > .submenu.level-2 {
    max-height: 400px;
    overflow-y: auto;
}

/* Level 3 Submenu (150 Areas) */
.has-submenu-l3.active > .submenu.level-3 {
    max-height: 350px;
    overflow-y: auto;
}

/* Scrollbar Styling */
.submenu::-webkit-scrollbar {
    width: 6px;
}

.submenu::-webkit-scrollbar-track {
    background: #E2E8F0;
    border-radius: 10px;
}

.submenu::-webkit-scrollbar-thumb {
    background: #94A3B8;
    border-radius: 10px;
}

.submenu::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

/* Arrow Icons */
.submenu-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
    margin-left: auto;
}

.has-submenu.active > a > .submenu-icon,
.has-submenu-l2.active > a > .submenu-icon,
.has-submenu-l3.active > a > .submenu-icon {
    transform: rotate(90deg);
}

/* Level 1 Items (Categories) */
.has-submenu-l2 > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 14px 30px;
    color: #1E293B;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 1px solid #E2E8F0;
}

.has-submenu-l2 > a i:first-child {
    margin-right: 10px;
    color: #3B82F6;
}

.has-submenu-l2 > a:hover {
    background: #EFF6FF;
    color: #3B82F6;
    padding-left: 35px;
}

/* Level 2 Items (Services) */
.has-submenu-l3 > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 45px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

.has-submenu-l3 > a:hover {
    color: #3B82F6;
    background: #F1F5F9;
    padding-left: 50px;
}

/* Level 3 Items (Areas) */
.submenu.level-3 li a {
    display: block;
    padding: 10px 20px 10px 60px;
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #FAFAFA;
    border-bottom: 1px solid #F1F5F9;
}

.submenu.level-3 li a:hover {
    color: #3B82F6;
    background: #EFF6FF;
    padding-left: 65px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    border-top: 2px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-call-btn,
.mobile-quote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.mobile-call-btn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
}

.mobile-quote-btn {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
}

.mobile-call-btn:hover,
.mobile-quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Prevent body scroll when menu open */
body.menu-open {
    overflow: hidden;
}

/* ========== Desktop Dropdown Alignment Fix ========== */
@media (min-width: 1025px) {
    /* Ensure all dropdown levels align at same top position */
    .dropdown-level2,
    .dropdown-level3 {
        top: 0 !important;
        margin-top: 0 !important;
    }
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }
    
    .header-actions .btn-call,
    .header-actions .btn-quote {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .header-logo {
        height: 80px;
    }
    
    .logo-img {
        max-width: 280px;
    }
    
    .announcement-bar {
        padding: 8px 0;
    }
    
    .marquee span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .header-logo {
        height: 70px;
    }
    
    .logo-img {
        max-width: 240px;
    }
    
    .mobile-logo img {
        max-width: 150px;
    }
}
