/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .tagline {
        font-size: 1.4rem;
    }
    
    .free-quote-section .container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .form-container {
        order: 2;
    }
    
    .contact-info {
        order: 1;
    }
    
    .services-grid,
    .video-gallery {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 40px;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .main-header .container {
        gap: 30px;
    }
    
    .main-nav ul {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-header .container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        max-width: 1200px;
        width: 100%;
        height: 100px;
        margin: 0 auto;
    }

    .main-header .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        padding: 0;
    }

    .main-header .logo img {
        max-height: 70px;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .menu-toggle {
        order: 1;
        background: none;
        border: none;
        padding: 12px;
        cursor: pointer;
        z-index: 1002;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    .main-nav {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        margin-top: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        max-height: 500px;
        padding: 15px 0;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .main-nav li {
        margin: 10px 0;
        text-align: center;
    }

    .main-nav a {
        color: var(--dark-color);
        font-size: 1.1rem;
        padding: 10px 20px;
        display: block;
        transition: all 0.3s ease;
    }

    .main-nav a:hover {
        color: var(--primary-color);
        transform: translateX(5px);
    }

    .mobile-phone {
        display: block;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }

    .header-cta {
        order: 2;
        width: auto;
        margin: 0;
    }

    .header-cta .phone {
        font-size: 1rem;
        padding: 8px 15px;
        background: var(--primary-color);
        color: white;
        border-radius: 50px;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s ease;
    }

    /* Animation for menu toggle */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin-top: 100px; /* تقليل الـ margin ليتناسب مع ارتفاع الهيدر الجديد */
        padding-top: 75px; /* إضافة padding يساوي ارتفاع الهيدر */
        height: auto;
        padding: 100px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .tagline {
        font-size: 1.2rem;
    }
    
    .services-section,
    .video-gallery-section,
    .why-choose-section,
    .testimonials-section,
    .service-area-section,
    .gallery-section,
    .free-quote-section {
        padding: 80px 0;
    }
    
    .service-card,
    .video-item {
        padding: 20px;
    }
    
    .service-card img,
    .video-item img {
        height: 180px;
    }
    
    .testimonial-card {
        min-width: 300px;
        padding: 25px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .form-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-footer .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-logo {
        height: 100px; /* Adjusted logo size for smaller screens */
        margin-left: auto;
        margin-right: auto;
        box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.4); /* Reduced glow effect */
    }
    
    .footer-logo:hover {
        animation: none; /* Disable pulse animation on smaller screens */
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 12px 0;
    }
    
    .main-header .logo img {
        max-width: 180px;  /* تصغير اللوجو أكثر في الشاشات الصغيرة */
    }
    
    .header-cta .phone {
        font-size: 1rem;
        padding: 8px 18px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .service-button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .testimonials-carousel {
        gap: 20px;
    }
    
    .main-nav ul {
        gap: 15px;
    }
    
    .header-cta .phone {
        padding: 8px 20px;
        font-size: 0.9rem;
        max-width: 160px;
    }
    
    .logo img {
        height: 60px; /* Further reduced logo size */
    }
    
    .footer-logo {
        height: 80px; /* Further reduced logo size */
        box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.3); /* Further reduced glow */
    }
    
    .video-item img {
        height: 160px;
    }
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
    }

    .main-nav ul li a {
        padding: 10px 0;
        display: block;
    }
}

/* JavaScript will toggle this class */
.main-nav.active {
    display: block !important;
}

/* Animation for menu toggle */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Adjust the main content to account for fixed header */
.hero-section {
    margin-top: 100px;
}

@media (max-width: 480px) {
    .main-header .logo img {
        max-width: 130px;
    }
    
    .header-cta .phone {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}