/**
 * التجاوب الكامل لكافة الشاشات (320px إلى الشاشات الكبيرة)
 * تحسين تجربة الهاتف المحمول واللمس لمستخدمي الرياض
 */

/* ==========================================================================
   1. شاشات الحواسب المحمولة والشاشات المتوسطة (أقل من 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-buttons {
    justify-content: center;
  }

  .hero-trust-list {
    justify-content: center;
  }

  .hero-img {
    height: 380px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .dina-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* ==========================================================================
   2. الأجهزة اللوحية والهواتف الذكية (أقل من 860px)
   ========================================================================== */
@media (max-width: 860px) {
  .top-bar-content {
    justify-content: center;
    text-align: center;
  }

  .top-bar-info {
    display: none; /* إبقاء معلومات الاتصال وساعات العمل للتركيز */
  }

  /* القائمة المتنقلة للجوال */
  .mobile-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 78px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 78px);
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 999;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 8px 0;
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--color-slate-100);
  }

  .header-actions .btn-whatsapp-header,
  .header-actions .btn-primary-header {
    padding: 8px 14px;
    font-size: 0.92rem;
  }

  .header-actions .btn-text {
    display: none; /* إظهار الأيقونة فقط لتوفير المساحة */
  }

  .section-title {
    font-size: 1.95rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .cta-heading {
    font-size: 2rem;
  }

  .qc-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .qc-text-group {
    flex-direction: column;
  }

  .qc-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   3. الهواتف الذكية القياسية (أقل من 640px)
   ========================================================================== */
@media (max-width: 640px) {
  body {
    padding-bottom: 68px; /* مسافة لشريط الاتصال السفلي الثابت */
  }

  .floating-contact-bar {
    display: none; /* إخفاء الأزرار العائمة على الجوال وتفعيل شريط القاع الأكثر راحة */
  }

  .mobile-sticky-bar {
    display: flex;
  }

  .header-container {
    height: 68px;
  }

  .brand-logo .logo-img {
    height: 40px;
  }

  .hero-section {
    padding: 36px 0 44px;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .hero-cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-buttons .btn {
    width: 100%;
  }

  .hero-img {
    height: 280px;
  }

  .hero-card-badge {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .about-img-grid {
    grid-template-columns: 1fr;
  }

  .about-pillars {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .dina-specs-grid {
    grid-template-columns: 1fr;
  }

  .dina-media-box img {
    height: 280px;
  }

  .cta-banner-card {
    padding: 36px 20px;
  }

  .cta-heading {
    font-size: 1.6rem;
  }

  .cta-button-group {
    flex-direction: column;
    width: 100%;
  }

  .cta-button-group .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   4. الهواتف الصغيرة جداً (أقل من 380px)
   ========================================================================== */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.65rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .header-actions {
    gap: 6px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
}
