/* Header and Footer Styles - Independent CSS for all pages */

/* CSS Variables - Ensure consistency across all pages */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.logo:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.logo:hover::after {
    width: 100%;
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.4));
}

.nav {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.phone-main {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.phone-main:hover {
    color: var(--primary-dark);
    transform: scale(1.05);
}

.phone-secondary {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
}

.phone-secondary:hover {
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none; /* Hidden on desktop */
    will-change: opacity, visibility;
}

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

/* Show mobile nav only on mobile devices */
@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
    
    /* Mobile performance optimizations */
    .mobile-nav-content {
        will-change: transform;
    }
    
    /* Optimize scroll performance on mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce repaints on mobile */
    .header {
        transform: translateZ(0);
    }
}

.mobile-nav-content {
    background: var(--bg-white);
    width: 280px;
    height: 100%;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
}

.mobile-nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    display: block;
    transition: color 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    color: var(--primary-color);
}

.mobile-contact {
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
}

.mobile-contact h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 16px;
}

.mobile-contact a {
    display: block;
    padding: 8px 0;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 8px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-nav {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.footer-nav a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    text-align: center;
    color: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-contact {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .phone-secondary {
        display: none;
    }

    .phone-main {
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color);
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
        min-height: auto;
        height: auto;
        line-height: 1.2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .phone-main:hover {
        color: var(--primary-dark);
        transform: scale(1.05);
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile nav visibility controlled by .active class, not display property */
    
    .footer {
        padding: 50px 0 24px;
    }
    
    .footer-content {
        gap: 32px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p {
        font-size: 14px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px 0;
    }

    .mobile-nav-content {
        width: 280px;
    }

    .logo {
        font-size: 24px;
    }

    .logo-icon {
        font-size: 28px;
    }

    .phone-main {
        font-size: 18px;
    }

    .header-contact {
        gap: 8px;
    }

    .mobile-nav-links a {
        font-size: 16px;
    }

    .mobile-nav-phone {
        font-size: 18px;
    }

    .page-header {
        padding: 40px 20px;
    }

    .page-title {
        font-size: 2rem;
    }

    .services-intro {
        padding: 40px 20px;
    }

    .services-intro h2 {
        font-size: 1.8rem;
    }

    .service-icon {
        font-size: 48px;
    }

    .service-title {
        font-size: 1.4rem;
    }

    .price {
        font-size: 1.8rem;
    }

    .cta-section {
        padding: 50px 24px;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .header-content {
        padding: 10px 0;
        gap: 8px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .phone-main {
        font-size: 18px;
        white-space: nowrap;
    }

    .mobile-menu-btn {
        font-size: 20px;
        padding: 4px;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --text-light: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
