/* ==========================================================================
   تجاوب المنصة مع كافة الأجهزة والدقات (Responsive Styles)
   ========================================================================== */

/* شاشات اللابتوب والحواسيب المتوسطة (1161px - 1340px) */
@media (max-width: 1340px) {
  .navbar {
    gap: 0.4rem;
  }

  .nav-menu {
    gap: 0.15rem;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 5px 7px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }

  .brand-logo img {
    height: 42px;
    width: 42px;
  }

  .btn-whatsapp-header {
    padding: 6px 12px;
    font-size: 0.82rem;
    gap: 6px;
  }

  .wa-icon-3d {
    width: 22px;
    height: 22px;
    font-size: 0.76rem;
  }
}

/* الأجهزة اللوحية وحواسيب اللابتوب الصغيرة (أقل من 1160px) */
@media (max-width: 1160px) {
  .navbar {
    height: 72px;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  /* القائمة الجانبية للشاشات الصغيرة */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 5.5rem 1.5rem 2rem;
    gap: 0.6rem;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    overflow-y: auto;
  }

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

  .nav-link {
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: block;
    width: 100%;
    border: 1px solid transparent;
  }

  .nav-link:hover {
    background-color: rgba(13, 71, 161, 0.05);
  }

  .nav-link.active {
    background-color: rgba(13, 71, 161, 0.08);
    border-color: rgba(13, 71, 161, 0.15);
  }

  .nav-link.active::after {
    display: none;
  }

  .mobile-menu-cta {
    display: block;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
  }

  .btn-whatsapp-full {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: var(--transition-fast);
  }

  .btn-whatsapp-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
  }

  /* خلفية معتمة عند فتح القائمة */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1040;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .hero-content-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

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

  .parents-grid {
    grid-template-columns: 1fr;
  }

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

  .review-card-item {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .cert-card-item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* شاشات الهواتف الذكية (أقل من 768px) */
@media (max-width: 768px) {
  .navbar {
    height: 66px;
  }

  .brand-logo img {
    height: 44px;
    width: 44px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }

  .btn-whatsapp-header > span:not(.wa-icon-3d) {
    display: none;
  }

  .btn-whatsapp-header {
    padding: 8px 12px;
    border-radius: var(--radius-full);
  }

  .btn-whatsapp-header .wa-icon-3d {
    display: inline-flex;
    width: 28px;
    height: 28px;
    font-size: 0.92rem;
  }

  .review-card-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .cert-card-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
  }

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

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

  .stages-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .stage-tab-btn {
    justify-content: center;
  }

  .grades-subtabs {
    border-radius: var(--radius-md);
    width: 100%;
  }

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

  .modal-container {
    max-width: 95%;
  }

  /* Special Programs Mobile Styles */
  .programs-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .program-card {
    border-radius: 18px;
  }

  .program-card-content {
    padding: 1.25rem;
  }

  .program-title {
    font-size: 1.15rem;
  }

  /* Quiz Actions Footer Mobile Styles */
  .quiz-actions-footer {
    gap: 8px;
  }

  .quiz-actions-footer .btn-primary,
  .quiz-actions-footer .btn-secondary {
    padding: 9px 10px;
    font-size: 0.84rem;
    gap: 5px;
    white-space: normal;
  }

  /* Zoom Live Banner Mobile Styles */
  .zoom-live-section {
    padding: 0.75rem 0 1.5rem;
  }

  .zoom-live-card {
    flex-direction: column;
    padding: 1.25rem;
    gap: 1.25rem;
    border-radius: 16px;
    text-align: center;
  }

  .zoom-card-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    width: 100%;
  }

  .zoom-header-line {
    justify-content: center;
  }

  .zoom-main-title {
    font-size: 1.15rem;
  }

  .zoom-subtext {
    font-size: 0.86rem;
  }

  .zoom-features-pills {
    justify-content: center;
  }

  .zoom-pill {
    font-size: 0.76rem;
    padding: 3px 10px;
  }

  .btn-zoom-cta {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.92rem;
  }

  .banner-showcase-section {
    padding: 0 0 2.25rem;
  }

  .academy-banner-card {
    border-radius: 14px;
    border-width: 1.5px;
  }

  .academy-banner-img {
    border-radius: 12px;
  }

  .banner-zoom-badge {
    bottom: 8px;
    left: 8px;
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  .form-control {
    font-size: 16px !important;
    padding: 11px 14px;
    box-sizing: border-box;
    width: 100%;
  }

  select.form-control {
    font-size: 16px !important;
    padding-left: 40px;
    padding-right: 14px;
    background-position: left 12px center;
    box-sizing: border-box;
    width: 100%;
  }

  /* Slider Dots Standalone Mobile Styles */
  .slider-controls-standalone {
    position: relative !important;
    margin: 1.25rem auto 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: fit-content !important;
    max-width: 90% !important;
  }

  /* Celebration Video Mobile Styles */
  .celebration-video-card {
    border-radius: 16px;
    padding: 5px;
  }
  .video-wrapper {
    border-radius: 12px;
  }
  .celebration-video-element {
    border-radius: 12px;
    object-fit: contain !important;
  }
  .video-custom-overlay {
    padding: 0.75rem 1rem;
  }
  .video-action-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .btn-play-toggle, .btn-fullscreen {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .video-live-badge {
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    padding: 3px 10px;
  }
}

/* شاشات الهواتف الصغيرة جداً (أقل من 420px) */
@media (max-width: 420px) {
  .brand-tagline {
    display: none;
  }
  
  .brand-name {
    font-size: 1.05rem;
  }
  
  .brand-logo img {
    height: 40px;
    width: 40px;
  }
}

