/* ===== RESPONSIVE STYLES ===== */

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content {
        max-width: 600px;
    }
}

/* Medium Screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        max-width: 550px;
    }
    
    .services-grid,
    .features-grid,
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .hero-content {
        max-width: 500px;
    }
    
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-logo,
    .footer-contact {
        grid-column: span 2;
        text-align: center;
    }
    
    .footer-contact ul {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Extra Small Screens (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .services-grid,
    .features-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-contact ul {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .testimonial-slider {
        padding: 0 var(--spacing-md);
    }
    
    .testimonial {
        padding: var(--spacing-md);
    }
}

/* Mobile Screens (575px and below) */
@media (max-width: 575px) {
    .container {
        width: 100%;
        padding: 0 var(--spacing-md);
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .services-grid,
    .features-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-contact ul {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .testimonial-slider {
        padding: 0;
    }
    
    .testimonial {
        padding: var(--spacing-sm);
    }
    
    .testimonial-author {
        flex-direction: column;
        align-items: center;
    }
    
    .author-rating {
        margin-top: var(--spacing-sm);
        margin-left: 0;
    }
    
    /* Form improvements for mobile */
    .form-group {
        margin-bottom: var(--spacing-md);
    }
    
    input, select, textarea {
        padding: 10px;
    }
    
    .contact-form-container {
        padding: var(--spacing-md);
    }
    
    /* Fix map container on mobile */
    .map-container iframe {
        height: 300px;
    }
    
    /* Improve FAQ readability on mobile */
    .faq-question h3 {
        font-size: 1rem;
    }
    
    /* Fix service areas list on mobile */
    .service-areas {
        columns: 1;
    }
    
    /* Improve CTA section on mobile */
    .cta-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .cta h2 {
        font-size: 1.5rem;
    }
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }
    
    .hamburger {
        display: flex;
        z-index: 1002;
        position: relative;
    }
    
    /* Hero technician image responsive styles */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .hero-technician {
        order: -1;
    }
 @media (max-width: 768px) {
    .technician-image {
        width: 280px;
        max-width: 85%;
        margin: 0 auto;
        display: block;
    }
    
    .main-service-image {
        border-radius: 10px;
        border: 2px solid #3498db;
    }
    
    .main-service-image:hover {
        transform: translateY(-4px) scale(1.01);
    }
}    
    /* Close button for mobile menu */
    .nav-links::before {
        content: '×';
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 30px;
        color: var(--light-color);
        cursor: pointer;
        z-index: 1003;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 60px 20px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1001;
        margin: 0;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 15px 0;
        color: var(--light-color);
        text-align: center;
        font-size: 18px;
        font-weight: 500;
        transition: color 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--secondary-color);
    }
    
    .nav-links a:after {
        display: none;
    }
    
    .nav-links .btn-contact {
        margin: 20px 0;
        display: inline-block;
        text-align: center;
        padding: 12px 30px;
        background-color: var(--secondary-color);
        color: #fff !important;
        border-radius: 30px;
        border: none;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 1px;
    }
    
    /* RTL Specific Responsive Fixes */
    [dir="rtl"] .nav-links::before {
        right: auto;
        left: 20px;
    }
    
    [dir="rtl"] .nav-links a {
        font-family: var(--heading-font);
    }
    
    [dir="rtl"] .nav-links {
        padding-right: 0;
    }
    
    [dir="rtl"] .hamburger {
        margin-right: 0;
        margin-left: var(--spacing-md);
    }
    
    [dir="rtl"] .service-content.reverse {
        direction: rtl;
    }
    
    [dir="rtl"] .testimonial-author {
        flex-direction: column;
        align-items: center;
    }
    
    [dir="rtl"] .author-rating {
        margin-right: 0;
    }
}

/* Print Styles */
@media print {
    header, 
    footer, 
    .cta,
    .hero,
    .map-section,
    .page-banner {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .contact-info,
    .contact-form-section {
        page-break-inside: avoid;
    }
    
    .contact-grid {
        display: block;
    }
    
    .contact-card {
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .form-image {
        display: none;
    }
    
    .contact-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    input, select, textarea {
        border: 1px solid #ccc;
    }
    
    .btn {
        border: 1px solid #000;
        padding: 5pt 10pt;
    }
}