:root { --mobile-nav-height: 240px; }

/* تحسينات الشاشات الكبيرة */
@media (min-width: 1200px) {
  .container { width: min(1320px, calc(100% - 48px)); }
  .hero { padding: 96px 0 120px; }
  .section { padding: 90px 0; }
  .card-grid { grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 28px; }
  .barbers-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 28px; }
}

/* تحسينات الهاتف العام */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-highlights { justify-content: center; }
  .card-grid, .barbers-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
  .contact-page, .booking-shell { grid-template-columns: 1fr; }
  .hero-card img, .hero-image { min-height: 220px; }
  .profile-card img { width: 110px; height: 110px; }
}

@media (max-width: 700px) {
  .navbar { flex-wrap: wrap; gap: 8px; }
  .nav-toggle { display: block; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 12px 0 8px; gap: 12px; position: relative; z-index: 200; background: #060606; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 8px 0; border-bottom: 1px solid rgba(212, 175, 55, 0.1); font-size: 1.05rem; }
  .site-header { position: relative; } /* إزالة sticky على الجوال لتحسين الأداء */
  .hero-highlights { position: relative; z-index: 1; }
  .hero-card { position: relative; z-index: 1; }
  .hero-content { position: relative; z-index: 1; }
  .card-grid, .barbers-grid, .stats-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 30px; min-height: auto; padding-bottom: 50px; }
  .hero h1 { font-size: 2rem; }
  .hero h2 { font-size: 1.2rem; }
  .hero-copy { font-size: 0.95rem; }
  .hero-highlights span { font-size: 0.85rem; padding: 6px 10px; }
  .btn { padding: 10px 18px; font-size: 0.9rem; }
  .section { padding: 40px 0; }
  .section-heading h3 { font-size: 1.3rem; }
  .footer-content { flex-direction: column; gap: 8px; text-align: center; }
  .step-actions { flex-direction: column-reverse; gap: 8px; }
  .step-actions .btn { width: 100%; }
  #next-step { min-width: 100%; }
  .profile-card img { width: 100px; height: 100px; }
  .service-card { padding: 16px; }
  .service-card h4 { font-size: 0.95rem; }
  .service-card p { font-size: 1rem; }
  .contact-card { padding: 20px; }
  .auth-card { padding: 24px; }
  .booking-form-card { padding: 16px; }
  .booking-progress { padding: 16px; }
  .booking-progress li { font-size: 0.85rem; padding: 8px 10px; }
  .date-list button, .time-list button { padding: 8px 12px; font-size: 0.85rem; }
  .customer-form input, .customer-form textarea { font-size: 16px; } /* منع الزوم على iOS */
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-table { font-size: 0.85rem; }
  .admin-table th, .admin-table td { padding: 8px; }
  .map-card iframe { min-height: 240px; }
  .compact-header .navbar { padding: 12px 0; }
  .brand { font-size: 1.15rem; }
  
  /* تحسينات إضافية للشاشات الصغيرة */
  .booking-shell { gap: 16px; }
  .booking-progress { padding: 14px; }
  .booking-progress h4 { font-size: 1rem; }
  .booking-progress li { font-size: 0.8rem; padding: 6px 8px; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h3 { font-size: 1.2rem; }
  .about-card { padding: 24px; }
  .stats-grid { gap: 10px; }
  .stats-grid div { padding: 12px; }
  .stats-grid strong { font-size: 1.1rem; }
  .contact-page { gap: 16px; }
  .contact-list { gap: 8px; }
  .calendar-cell { padding: 8px 0; font-size: 0.9rem; }
  .calendar-nav { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .hero-card img, .hero-image { min-height: 180px; }
  .profile-card img { width: 90px; height: 90px; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  
  /* تحسينات إضافية للشاشات الصغيرة جداً */
  .hero { padding: 24px 0 40px; }
  .hero h1 { font-size: 1.6rem; }
  .hero h2 { font-size: 1.1rem; }
  .hero-copy { font-size: 0.9rem; }
  .btn { padding: 10px 16px; font-size: 0.85rem; }
  .section { padding: 32px 0; }
  .section-heading h3 { font-size: 1.15rem; }
  .service-card { padding: 14px; }
  .service-card h4 { font-size: 0.9rem; }
  .booking-form-card { padding: 14px; }
  .booking-progress { padding: 12px; }
  .booking-progress li { font-size: 0.75rem; padding: 6px 8px; }
  .date-list button, .time-list button { padding: 6px 10px; font-size: 0.8rem; }
  .customer-form input, .customer-form textarea { padding: 10px 12px; font-size: 16px; }
  .contact-card { padding: 16px; }
  .auth-card { padding: 20px; }
  .admin-table { font-size: 0.75rem; }
  .admin-table th, .admin-table td { padding: 6px; }
  .map-card iframe { min-height: 200px; }
  .brand { font-size: 1.05rem; }
  .nav-toggle { font-size: 1.4rem; }
}
