/* ===== Responsive polish — mobile + tablet only ========================
   Layered on top of clone-overrides.css, phase2.css, phase3.css.
   Desktop styles untouched. Revertable: delete this file + its <link>.
   ====================================================================== */

/* ---------- 1. Hero height + padding on small phones ----------------- */
@media (max-width: 767px) {
  .pism-static-hero {
    min-height: 460px !important;
  }
  .pism-static-hero .pism-static-hero__inner {
    padding: 0 1.25rem 3rem 1.25rem !important;
  }
  .pism-static-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.1;
  }
  .pism-static-hero .cta {
    padding: 11px 22px !important;
    font-size: 0.92rem;
  }
  .pism-static-hero__dots {
    bottom: 18px !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .pism-static-hero {
    min-height: 520px !important;
  }
  .pism-static-hero .pism-static-hero__inner {
    padding: 0 2rem 4rem 2rem !important;
  }
}

/* ---------- 2. Stats strip — earlier breakpoint, then stack --------- */
@media (max-width: 1024px) {
  .pism-stats-strip__inner {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px 18px !important;
    padding: 24px 18px !important;
  }
  .pism-stats-strip__item::after { display: none !important; }
}

@media (max-width: 480px) {
  .pism-stats-strip__inner {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .pism-stats-strip__item {
    justify-content: flex-start !important;
    padding: 4px 8px;
  }
  .pism-stats-strip__icon {
    width: 46px !important;
    height: 46px !important;
  }
  .pism-stats-strip__icon svg {
    width: 26px !important;
    height: 26px !important;
  }
  .pism-stats-strip__value {
    font-size: 1.35rem !important;
  }
  .pism-stats-strip__label {
    font-size: 0.65rem !important;
    letter-spacing: 0.16em !important;
  }
}

/* ---------- 3. Why PISM tile pair: stack on mobile ------------------ */
@media (max-width: 767px) {
  /* The two campus_single--item tiles sit in an Elementor flex row.
     Force stack and full width. */
  [class*="elementor-element"] [class*="campus__single--item"] {
    margin-bottom: 20px;
  }
  .campus__single--item--thumb {
    aspect-ratio: 16 / 10 !important;
  }
  .campus__single--item--title.title a {
    font-size: 1.15rem !important;
  }
}

/* ---------- 4. Newsletter iframe — shorter + CTA on mobile --------- */
@media (max-width: 767px) {
  .pism-newsletter-viewer iframe {
    height: 70vh !important;
    min-height: 480px !important;
  }
}

/* ---------- 5. Popup banner — keep X button inside viewport -------- */
@media (max-width: 540px) {
  .pism-popup {
    padding: 16px !important;
  }
  .pism-popup__close {
    top: 6px !important;
    right: 6px !important;
    width: 36px !important;
    height: 36px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }
  .pism-popup__close svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* ---------- 6. Card grids — tighter spacing on mobile -------------- */
@media (max-width: 600px) {
  .single-blog,
  .blog-item {
    margin-bottom: 16px;
  }
  .blog__title,
  .blog-title {
    font-size: 1.05rem !important;
    line-height: 1.3;
  }
  .blog__meta {
    padding: 16px !important;
  }
}

/* ---------- 7. Testimonial card padding on mobile ----------------- */
@media (max-width: 767px) {
  .rts__single--testimonial {
    padding: 22px 20px !important;
  }
  .rts__single--testimonial--text.des {
    font-size: 0.95rem !important;
    line-height: 1.6;
  }
}

/* ---------- 8. Header tighter on mobile --------------------------- */
@media (max-width: 767px) {
  .hfe-site-header,
  header#masthead {
    padding-block: 8px !important;
  }
  .hfe-site-logo-img {
    max-height: 40px !important;
  }
}

/* ---------- 9. Footer columns: stack cleanly --------------------- */
@media (max-width: 767px) {
  footer .e-con-inner > .e-con,
  footer .e-flex {
    width: 100% !important;
  }
  footer .elementor-element {
    text-align: left !important;
  }
}

/* ---------- 10. Prevent horizontal scroll site-wide -------------- */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
  }
  /* The static hero uses negative margins to break out — clamp it */
  .pism-static-hero {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
}
