/* =============================================
   وسائط الاستجابة - الإصدار الموحد
   ============================================= */

/* شاشات كبيرة (1200px فما فوق) */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content h2 {
        font-size: 2.8rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 35px;
    }
    
    .footer-newsletter {
        grid-column: 1 / -1;
        margin-top: 30px;
    }
}

/* أجهزة اللاب توب (992px - 1199px) */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-newsletter {
        grid-column: 1 / -1;
    }
}

/* الأجهزة اللوحية (768px - 991px) */
@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* الهيدر */
    .header-container {
        padding: 12px 0;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    /* القسم البطولي */
    .hero {
        min-height: 70vh;
        padding: 100px 0 60px;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* الأقسام */
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    /* الشبكات */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* نموذج الاتصال */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    /* النماذج */
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    /* الفوتر */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    /* الأزرار العائمة */
    .floating-buttons {
        left: 15px;
        bottom: 15px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .floating-label {
        display: none; /* إخفاء التسميات على الجوال */
    }
    
    /* التنقل العام */
    .global-navigation {
        right: 15px;
        bottom: 15px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    /* مشغل الفيديو */
    .video-player {
        height: 300px;
    }
}

/* الهواتف الكبيرة (576px - 767px) */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    /* الهيدر */
    .header-container {
        padding: 10px 0;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* القسم البطولي */
    .hero {
        padding: 90px 0 40px;
        min-height: 60vh;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* الأقسام */
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    /* البطاقات */
    .feature-card {
        padding: 25px 20px;
    }
    
    .service-content {
        padding: 20px;
    }
    
    /* المعرض */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    /* الإحصائيات */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* الأزرار العائمة */
    .floating-buttons {
        left: 10px;
        bottom: 10px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* التنقل العام */
    .global-navigation {
        right: 10px;
        bottom: 10px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* مشغل الفيديو */
    .video-player {
        height: 250px;
    }
    
    /* اللايت بوكس */
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-caption {
        padding: 15px;
    }
}

/* الهواتف الصغيرة (480px فما دون) */
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .mobile-nav a {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* الهواتف الصغيرة جداً (360px فما دون) */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title h2 {
        font-size: 1.4rem;
    }
    
    .feature-card,
    .service-content {
        padding: 20px 15px;
    }
    
    .floating-buttons {
        left: 8px;
        bottom: 8px;
    }
    
    .global-navigation {
        right: 8px;
        bottom: 8px;
    }
}

/* =============================================
   تحسينات خاصة للأجهزة
   ============================================= */

/* تحسينات للأجهزة التي تدعم اللمس */
@media (hover: none) and (pointer: coarse) {
    .floating-label {
        display: none !important;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .gallery-item:hover {
        transform: none;
    }
    
    /* تحسينات للأزرار على الشاشات التي تعمل باللمس */
    .btn,
    .nav-btn,
    .floating-btn {
        min-height: 44px; /* الحجم الأدنى الموصى به للأزرار التي تعمل باللمس */
    }
    
    .nav-menu a,
    .mobile-nav a {
        padding: 12px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* تقليل الحركة للمستخدمين الذين يفضلون ذلك */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* وضع التباين العالي */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --primary-dark: #000000;
        --secondary-color: #ffffff;
        --text-color: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }
    
    .hero {
        background: linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.9)), var(--hero-image) center/cover !important;
    }
    
    .btn-service {
        background: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }
    
    .btn-outline {
        border: 2px solid #000000;
        color: #000000;
    }
}

/* الوضع الداكن */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a1a;
        --dark-color: #ffffff;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
    }
    
    body {
        background: #121212;
        color: var(--text-color);
    }
    
    .header {
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }
    
    .feature-card,
    .service-card,
    .video-item {
        background: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #404040;
        color: var(--text-color);
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
        background: #333333;
    }
    
    .mobile-menu {
        background: #1a1a1a;
    }
    
    .footer {
        background: #1a1a1a;
    }
    
    .footer-services a,
    .footer-links a {
        color: #b0b0b0;
    }
    
    .footer-services a:hover,
    .footer-links a:hover {
        color: var(--secondary-color);
    }
}

/* أنماط الطباعة */
@media print {
    .header,
    .floating-buttons,
    .global-navigation,
    .footer,
    .hero-buttons,
    .btn {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
        min-height: auto !important;
        padding: 20px 0 !important;
    }
    
    .hero-content h2 {
        color: #000 !important;
        font-size: 24pt !important;
    }
    
    .hero-content p {
        color: #333 !important;
        font-size: 12pt !important;
    }
    
    .section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    .feature-card,
    .service-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .feature-card h3,
    .service-content h3 {
        color: #000 !important;
    }
    
    .feature-card p,
    .service-content p {
        color: #333 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* شاشات عالية الدقة */
@media (min-resolution: 192dpi) {
    .logo-icon,
    .feature-icon,
    .service-img img,
    .gallery-item img,
    .video-thumbnail img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* الشاشات العريضة */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h2 {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* التوجيه الأفقي على الهواتف */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .mobile-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .video-player {
        height: 70vh;
    }
}