/* ============================================
   أسطول الخبراء لخدمات التكييف
   ملف التصميم المتجاوب (Responsive Design)
   ============================================ */

/* شاشات كبيرة جداً (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* شاشات كبيرة (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* شاشات متوسطة (768px - 991px) - التابلت */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* منع أي عنصر عائم (زي شارات وصور "عن الشركة") من التسبب في تمرير أفقي للصفحة */
    .about-section,
    .about-grid,
    .about-images {
        overflow-x: hidden;
    }

    /* القائمة */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 20px 30px;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        transition: var(--transition);
        z-index: 999;
        gap: 0;
        overflow-y: auto;
    }

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

    .nav-menu > li > a {
        padding: 14px 15px;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }

    .nav-menu > li:last-child > a {
        border-bottom: none;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        min-width: auto;
        padding: 0;
        display: none;
        background: var(--light-bg);
        border-radius: 0;
        margin: 0 -20px;
    }

    .dropdown.show {
        display: block;
    }

    .dropdown li a {
        padding: 12px 35px;
        border-right: none;
    }

    .dropdown li a:hover {
        padding-right: 40px;
    }

    .header-cta {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: 550px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* الأقسام */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* الخدمات */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* تذييل */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    /* صفحة المحتوى */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* features bar */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* page header */
    .page-header h1 {
        font-size: 2rem;
    }

    /* stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* service mini list */
    .service-mini-list {
        grid-template-columns: 1fr;
    }

    /* sitemap */
    .sitemap-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* contact bar */
    .contact-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-bar-buttons {
        justify-content: center;
    }

    /* top bar */
    .top-bar .container {
        justify-content: center;
    }

    .top-bar-info {
        justify-content: center;
    }

    .top-bar-social {
        display: none;
    }

    /* error 404 */
    .error-404 h1 {
        font-size: 6rem;
    }
}

/* شاشات صغيرة (576px - 767px) - الهواتف الكبيرة */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }

    /* الهيدر */
    .header .container {
        height: 70px;
    }

    .logo img {
        height: 45px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .logo-text span {
        font-size: 0.65rem;
    }

    /* Hero */
    .hero {
        min-height: 480px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-features {
        flex-direction: column;
        gap: 15px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    /* الأقسام */
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    /* الخدمات */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-image {
        height: 200px;
    }

    /* المميزات */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .features-bar {
        margin-top: -40px;
        padding: 30px 0;
    }

    /* تذييل */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* معرض */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 220px;
    }

    /* المحتوى */
    .content-wrapper h2 {
        font-size: 1.5rem;
    }

    .content-wrapper h3 {
        font-size: 1.2rem;
    }

    /* صفحة الهيدر */
    .page-header {
        padding: 70px 0 60px;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    /* الإحصائيات */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* أزرار عائمة */
    .float-buttons {
        bottom: 15px;
        left: 15px;
    }

    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    /* خطأ 404 */
    .error-404 h1 {
        font-size: 5rem;
    }

    .error-404 h2 {
        font-size: 1.5rem;
    }

    /* خريطة الموقع */
    .sitemap-grid {
        grid-template-columns: 1fr;
    }

    /* شريط التواصل */
    .contact-bar {
        padding: 30px 0;
    }

    .contact-bar-text h2 {
        font-size: 1.4rem;
    }

    .contact-bar-buttons {
        flex-direction: column;
        width: 100%;
    }

    .contact-bar-buttons .btn {
        width: 100%;
    }

    /* أزرار */
    .btn {
        padding: 12px 22px;
        font-size: 0.9rem;
    }

    /* الأسئلة الشائعة */
    .faq-question {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 15px;
    }

    /* TOC */
    .toc {
        padding: 20px;
    }

    /* القائمة المنسدلة */
    .nav-menu {
        width: 280px;
        right: -280px;
    }

    /* شريط علوي */
    .top-bar {
        font-size: 0.75rem;
    }

    .top-bar-info {
        gap: 12px;
    }

    /* معلومات التواصل */
    .contact-method {
        padding: 15px;
    }

    .contact-method-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* شاشات صغيرة جداً (أقل من 576px) - الهواتف الصغيرة */
@media (max-width: 575px) {
    /* Hero */
    .hero {
        min-height: 420px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* أزرار */
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    /* الأقسام */
    .section {
        padding: 40px 0;
    }

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

    .section-header {
        margin-bottom: 35px;
    }

    /* بطاقات المميزات */
    .feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    /* خدمة بطاقة */
    .service-content {
        padding: 20px;
    }

    /* إحصائيات */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-number {
        font-size: 1.7rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* معرض */
    .gallery-item {
        height: 180px;
    }

    /* الهيدر */
    .page-header h1 {
        font-size: 1.5rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    /* محتوى */
    .content-wrapper h2 {
        font-size: 1.3rem;
    }

    .content-wrapper p {
        font-size: 0.9rem;
    }

    /* 404 */
    .error-404 {
        padding: 50px 20px;
    }

    .error-404 h1 {
        font-size: 4rem;
    }

    .error-404 h2 {
        font-size: 1.3rem;
    }

    /* أزرار عائمة */
    .float-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .float-btn::after {
        display: none;
    }

    /* العودة للأعلى */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* نموذج */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    /* شريط التواصل */
    .contact-bar-text h2 {
        font-size: 1.2rem;
    }

    .contact-bar-text p {
        font-size: 0.9rem;
    }

    /* الشريط العلوي */
    .top-bar {
        display: none;
    }
}

/* Landscape للهواتف */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 350px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .nav-menu {
        padding-top: 60px;
    }
}

/* تحسينات الطباعة */
@media print {
    .header,
    .footer,
    .top-bar,
    .float-buttons,
    .back-to-top,
    .hero-buttons,
    .contact-bar {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    .section {
        padding: 30px 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }

    .content-wrapper {
        max-width: 100%;
    }
}

/* دعم الشاشات العريضة جداً */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* الموقع مصمم بألوان فاتحة ثابتة - يتم تعطيل الوضع المظلم التلقائي
   لضمان ظهور النصوص بشكل صحيح في كل أجزاء الموقع بما فيها الفوتر */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
}

/* تقليل الحركة للمستخدمين الذين يفضلون ذلك */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
