/* Modern Header Styles */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    box-shadow: 0 2px 30px rgba(0,0,0,0.15);
}

/* Top Contact Bar */
.top-contact-bar {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.contact-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-left {
    display: flex;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-item i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-item a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.contact-item a:hover {
    opacity: 0.8;
    color: white;
    text-decoration: none;
}

.service-area {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Main Navigation */
.main-navigation {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #2d3748;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link.dropdown-toggle .icon-angle-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-toggle .icon-angle-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
}

.dropdown-item.emergency {
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    color: #e53e3e;
    font-weight: 600;
}

.dropdown-item.emergency:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

/* All Services Link */
.dropdown-item.all-services {
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
    border-radius: 6px;
    margin: 0.25rem;
}

.dropdown-item.all-services:hover {
    background: #667eea;
    color: white;
}

.dropdown-item i {
    font-size: 1rem;
    width: 16px;
}

/* Action Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.call-btn {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    color: white;
    text-decoration: none;
}

.call-btn i {
    font-size: 1rem;
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #4a5568;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.mobile-logo .brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    display: block;
}

.mobile-logo .brand-tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    color: white;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links > li {
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-links > li:last-child {
    border-bottom: none;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: #667eea;
    text-decoration: none;
}

.mobile-nav-links i {
    font-size: 1.1rem;
    width: 20px;
}

/* Mobile Submenu */
.has-submenu > a .icon-angle-down {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.has-submenu.active > a .icon-angle-down {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 10px;
}

.has-submenu.active .submenu {
    max-height: 300px;
    padding: 10px 0;
}

.submenu a {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #718096;
}

.submenu a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Mobile Contact Info */
.mobile-contact-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.mobile-contact-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #4a5568;
}

.mobile-contact-item i {
    font-size: 1rem;
    width: 16px;
    color: #667eea;
}

.mobile-contact-item a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
}

.mobile-contact-item a:hover {
    color: #667eea;
    text-decoration: none;
}

/* Mobile Emergency Button */
.mobile-emergency-btn {
    margin-top: 20px;
}

.emergency-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #e53e3e, #dc2626);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.emergency-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
    color: white;
    text-decoration: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Body padding for fixed header (only for modern design) */
body.use-modern-design {
    padding-top: 120px !important;
}

/* Reset padding for classic design */
body.use-classic-design {
    padding-top: 0 !important;
}

/* Ensure modern header doesn't conflict with existing styles */
.modern-header + * {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    body.use-modern-design {
        padding-top: 100px !important;
    }
    
    .top-contact-bar {
        padding: 6px 0;
        font-size: 0.8rem;
    }
    
    .contact-left {
        gap: 15px;
    }
    
    .contact-right {
        display: none;
    }
    
    .main-navigation {
        padding: 12px 0;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-tagline {
        font-size: 0.75rem;
    }
    
    .action-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .nav-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body.use-modern-design {
        padding-top: 90px !important;
    }
    
    .contact-left {
        gap: 10px;
    }
    
    .contact-item span,
    .contact-item a {
        font-size: 0.75rem;
    }
    
    .nav-logo a {
        gap: 8px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn {
        padding: 12px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
        min-width: 48px;
        gap: 0;
    }
    
    .action-btn i {
        font-size: 1.1rem;
    }
    
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
}

/* Scroll behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .modern-header {
        border-bottom: 2px solid #000;
    }
    
    .top-contact-bar {
        background: #000;
    }
    
    .nav-link:hover {
        background: #000;
        color: #fff;
    }
}

/* Fix hero section overlap */
body.use-modern-design .hero-section {
    margin-top: 0;
    padding-top: 100px;
}

body.use-modern-design .hero-container {
    position: relative;
    z-index: 1;
}

/* Ensure proper spacing for all sections */
body.use-modern-design .services-section,
body.use-modern-design .categories-section,
body.use-modern-design .offers-section,
body.use-modern-design .products-section,
body.use-modern-design .why-choose-section,
body.use-modern-design .contact-section,
body.use-modern-design .newsletter-section {
    position: relative;
    z-index: 1;
}

/* Fix any wrapper conflicts */
body.use-modern-design #wrapper {
    margin-top: 0;
    padding-top: 0;
}

body.use-modern-design .index-wrapper {
    margin-top: 0;
    padding-top: 0;
}

/* Fix nav-actions button conflicts */
.modern-header .nav-actions .action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.modern-header .nav-actions .call-btn {
    background: linear-gradient(45deg, #48bb78, #38a169) !important;
    color: white !important;
}

.modern-header .nav-actions .call-btn:hover {
    color: white !important;
    text-decoration: none !important;
}

.modern-header .nav-actions .mobile-menu-toggle {
    background: none !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
}

/* Ensure proper icon display in nav actions */
.modern-header .nav-actions .action-btn i {
    display: inline-block !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* Fix hamburger lines */
.modern-header .hamburger-line {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    background: #4a5568 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
}

/* Responsive hero section fixes */
@media (max-width: 768px) {
    body.use-modern-design .hero-section {
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    body.use-modern-design .hero-section {
        padding-top: 60px;
    }
}