/* =========================================================================
   home-mobile.css
   Scope: index.html — mobile-only (max-width: 640px) enhancements
   ========================================================================= */

/* Hidden on tablet & desktop */
body[data-page="home"] .hero-mobile-banner {
  display: none;
}

/* Footer quick strip — hidden on desktop */
.footer-contact__quick {
  display: none;
}

@media (max-width: 640px) {
  /* ---- Hero photo slider --------------------------------------------- */
  body[data-page="home"] .hero-mobile-banner {
    display: block;
    margin: 0 auto clamp(1.25rem, 4vw, 1.75rem);
    max-width: min(100%, 420px);
    padding-inline: clamp(1rem, 4vw, 1.25rem);
    animation: heroBannerIn 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  @keyframes heroBannerIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
  }

  body[data-page="home"] .hero {
    padding-top: clamp(1.25rem, 4vw, 2rem);
    overflow: visible;
  }

  body[data-page="home"] .hero__visual {
    display: none;
  }

  body[data-page="home"] .hero__grid {
    order: 0;
  }

  body[data-page="home"] .hero__title {
    font-size: clamp(2rem, 9vw, 2.65rem);
    margin-top: 0;
  }

  /* Hero stats — match “3 Schools” centering; stop label clipping */
  body[data-page="home"] .hero__meta {
    gap: 0.5rem;
    margin-top: 1.75rem;
  }

  body[data-page="home"] .hero__meta .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.95rem 0.35rem 0.85rem;
    overflow: visible;
    min-width: 0;
  }

  body[data-page="home"] .hero__meta .stat__num {
    font-size: clamp(1.55rem, 6.5vw, 1.9rem);
    line-height: 1.05;
    width: 100%;
    text-align: center;
  }

  body[data-page="home"] .hero__meta .stat__label {
    width: 100%;
    margin-top: 0.45rem;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  html[dir="rtl"] body[data-page="home"] .hero__meta .stat__label {
    letter-spacing: 0;
    font-size: 0.62rem;
  }

  .hero-mobile-banner__slider {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: var(--brand-navy-deep);
    border: 1px solid rgba(201, 169, 97, 0.35);
    box-shadow:
      0 22px 48px rgba(11, 23, 48, 0.22),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  .hero-mobile-banner__slides {
    position: absolute;
    inset: 0;
  }

  .hero-mobile-banner__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.65s ease;
  }

  .hero-mobile-banner__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
  }

  .hero-mobile-banner__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 6s ease;
  }

  .hero-mobile-banner__slide.is-active img {
    transform: scale(1);
  }

  .hero-mobile-banner__slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 2.25rem 1rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 23, 48, 0.82) 100%);
  }

  html[dir="rtl"] .hero-mobile-banner__slide figcaption {
    letter-spacing: 0.06em;
    text-transform: none;
    font-size: 0.8rem;
  }

  .hero-mobile-banner__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      radial-gradient(70% 50% at 50% 0%, rgba(201, 169, 97, 0.18), transparent 60%),
      linear-gradient(180deg, rgba(11, 23, 48, 0.08) 0%, transparent 35%);
  }

  .hero-mobile-banner__dots {
    display: none !important;
  }

  /* ---- School cards with photos ---------------------------------------- */
  body[data-page="home"] .school-card__img {
    display: block !important;
    order: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3.2;
    object-fit: cover;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
  }

  body[data-page="home"] .school-card::after {
    content: none !important;
    display: none !important;
  }

  body[data-page="home"] .school-card--kg .school-card__img {
    object-position: center 35%;
  }

  body[data-page="home"] .school-card--pr .school-card__img {
    object-position: center 40%;
  }

  body[data-page="home"] .school-card--sc .school-card__img,
  body[data-page="home"] .school-card--soon .school-card__img {
    object-position: center 30%;
    opacity: 1 !important;
  }

  body[data-page="home"] .school-card--soon {
    opacity: 1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mobile-banner__slide,
  .hero-mobile-banner__slide img {
    transition: none !important;
  }
}
