/* Device-specific refinements layered over the main design. */
@media (max-width: 1100px) {
  .container { width: min(100% - 48px, 1140px); }
  .nav-links { gap: 17px; }
  .booking-grid { grid-template-columns: minmax(0, 1.35fr) minmax(310px, .8fr); }
  .session { padding: 13px 11px; }
  .session small { font-size: 8px; }
  .hero-content { padding-left: 4px; }
}

@media (max-width: 900px) {
  .nav-links { gap: 13px; }
  .nav-links a { font-size: 12px; }
  .booking-grid { grid-template-columns: 1fr; }
  .summary { position: static; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; }
  .summary > .eyebrow, .summary > h3 { grid-column: 1 / -1; }
  .summary .whatsapp, .summary .summary-foot { grid-column: 1 / -1; }
  .summary .total { margin-top: 0; }
  .summary .whatsapp { min-height: 50px; }
  .faq-grid { gap: 48px; }
}

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }
  .container { width: min(100% - 32px, 1140px); }
  .nav { min-height: 66px; height: auto; }
  .brand img { width: 76px; height: 48px; }
  .hero { min-height: 580px; height: auto; padding: 88px 0 70px; }
  .hero-content { padding-left: 0; }
  .hero-content > p:not(.eyebrow) { max-width: 430px; }
  .benefits, .steps { grid-template-columns: 1fr 1fr; }
  .booking-section { padding: 64px 0; }
  .booking-heading { text-align: left; }
  .price-banner { padding: 16px; }
  .month-list, .date-list { padding-bottom: 3px; scroll-snap-type: x proximity; }
  .month, .date { scroll-snap-align: start; }
  .month { min-height: 44px; }
  .date { min-width: 62px; min-height: 66px; }
  .date-pagination button { min-height: 44px; }
  .gender-option { min-height: 48px; }
  .session { min-height: 54px; }
  .quantity button { min-width: 44px; min-height: 44px; }
  .summary { display: block; }
  .summary .total { margin-top: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > p { grid-column: auto; }
  .footer-brand img { width: 100px; height: 70px; }
}

@media (max-width: 430px) {
  h1 { font-size: 40px; line-height: 1.08; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .btn { min-height: 48px; }
  .benefits, .steps { grid-template-columns: 1fr; }
  .steps > div:not(:last-child)::after { display: none; }
  .price-banner strong { font-size: 24px; }
  .payment-info { justify-content: flex-start; }
  .payment-info span { text-align: left; }
  .field-head { align-items: flex-start; }
  .field-head.session-head { align-items: flex-start; flex-direction: column; }
  .date-label-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .date-label-row .label { margin-bottom: 0; }
  .date-label-row span { text-align: left; }
  .date-pagination { align-items: center; flex-direction: column; }
  .date-pagination button { width: 100%; border: 1px solid #3b514a; }
  .light .date-pagination button { border-color: #8ca99d; }
  .session-list { grid-template-columns: 1fr; }
  .quantity-area { align-items: stretch; flex-direction: column; }
  .quantity { justify-content: space-between; }
  .quantity strong { width: auto; flex: 1; }
  .faq-list summary { gap: 15px; }
  .copyright { line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Strict phone layout: keeps the page inside narrow 320–480px viewports. */
@media (max-width: 480px) {
  body { min-width: 0; overflow-x: hidden; }
  .container { width: calc(100% - 28px) !important; }
  .nav { gap: 8px; }
  .nav-actions { gap: 7px; }
  .theme-toggle, .menu-toggle { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; }
  .hero { min-height: 555px; padding: 72px 0 48px; }
  .hero-image { background-position: 61% center; }
  .hero-content > .eyebrow { font-size: 9px; letter-spacing: 1.35px; }
  .hero-content > p:not(.eyebrow) { font-size: 14px; line-height: 1.55; }
  h1 { font-size: clamp(37px, 11vw, 44px); }
  .btn { min-height: 48px; width: 100%; }
  .trust-section, .how, .about, .faq-section, .check { padding-top: 54px; padding-bottom: 54px; }
  .booking-form, .summary { border-radius: 3px; }
  .price-banner, .saudi-clock { padding: 14px; }
  .saudi-clock strong { font-size: 12px; }
  .saudi-clock time { font-size: 20px; }
  .month-list, .date-list { margin-right: -14px; padding-right: 14px; }
  .month { min-width: 122px; }
  .date { min-width: 58px; }
  .summary-lines > div { font-size: 12px; }
  .total strong { font-size: 25px; }

  /* Fixed grids prevent side-scrolling in the schedule picker. */
  .month-list, .date-list {
    display: grid;
    overflow: visible;
    width: 100%;
    margin-right: 0;
    padding-right: 0;
  }
  .month-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .date-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
  .month, .date { min-width: 0; width: 100%; }
  .month { padding: 9px 4px; font-size: 11px; }
  .date { height: 58px; min-height: 58px; }
  .date b { font-size: 16px; }
  .date-pagination { width: 100%; }
}

.faq-whatsapp { margin-top: 20px; }

/* Live Saudi clock: digital time with a compact period label. */
.saudi-clock time { display: inline-flex; align-items: center; gap: 8px; font-family: 'DM Sans', sans-serif; }
.saudi-clock .clock-icon { font-size: 24px; line-height: 1; }
.saudi-clock .day-period { font: 600 25px 'DM Sans', sans-serif; letter-spacing: .3px; }
.saudi-clock .time-value { font: 600 25px 'DS-Digital', 'DM Mono', monospace; letter-spacing: 0; }
@media (max-width: 480px) { .saudi-clock .time-value, .saudi-clock .day-period { font-size: 20px; } }

/* Prevent the clock digits from inheriting the old serif display font. */
.saudi-clock time .time-value { font-family: 'DS-Digital', 'DM Mono', monospace !important; font-style: normal !important; }
