/* ============================================================
   SKI NEW ENGLAND — responsive layer
   Desktop styles live in styles.css and the components' inline
   styles; this file only overrides at tablet and phone widths.
   Breakpoints: tablet <= 1024 (narrower desktop), phone <= 700.
   Inline styles win over classes, so overrides here use !important.
   ============================================================ */

/* ---- grid utilities: tag any inline grid with these ---- */
@media (max-width: 1024px) {
  .r-6up { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
  .r-4up { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .r-3up { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .r-side { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 700px) {
  .r-6up, .r-4up, .r-3up, .r-2up { grid-template-columns: minmax(0,1fr) !important; }
  .r-keep2 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .r-keep3 { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}

/* ---- page gutters ---- */
@media (max-width: 1024px) { :root { --gut: 20px; } }
@media (max-width: 700px) {
  :root { --gut: 16px; }
  .wrap { padding-left: var(--gut) !important; padding-right: var(--gut) !important; }
}

/* ---- hero: ~60% of the desktop block on phones ---- */
@media (max-width: 700px) {
  .hero-body { padding-top: 40px !important; padding-bottom: 26px !important; }
  .hero-body h1 { font-size: clamp(34px, 11vw, 52px) !important; max-width: none !important; }
  .hero-body p { font-size: 15.5px !important; margin-top: 16px !important; }
  .hero-actions { flex-direction: column !important; align-items: stretch !important; gap: 16px !important; }
  .hero-actions .btn { justify-content: center; width: 100%; }
}

/* ---- state band ---- */
@media (max-width: 1024px) { .state-band { height: auto !important; padding: 22px 0 !important; } }

/* ---- resort detail: sidebar drops below the write-up ---- */
@media (max-width: 1024px) {
  .resort-body { padding-left: var(--gut) !important; padding-right: var(--gut) !important; gap: 30px !important; }
}
@media (max-width: 700px) {
  .r-rate { grid-template-columns: minmax(0,1fr) !important; }
  .r-rate > span[style*="width: 1px"], .r-rate > span[style*="width:1px"] { display: none !important; }
  .r-split > span[style*="width: 1px"], .r-split > span[style*="width:1px"] { display: none !important; }
  .r-split { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

/* ---- article body ---- */
@media (max-width: 700px) {
  .article-body { font-size: 16.5px; }
  .article-body h2 { font-size: 23px; }
  .article-body h3 { font-size: 19px; }
}

/* ---- filter bars scroll sideways instead of wrapping into a wall ---- */
@media (max-width: 700px) {
  .filter-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap !important; }
  .filter-scroll::-webkit-scrollbar { display: none; }
  .filter-scroll > * { flex: 0 0 auto; }
}

/* ---- footer ---- */
@media (max-width: 700px) {
  /* the chairlift panel is a wide two-up illustration; hold it still on phones */
  .lift-a, .lift-b, .snow-plume, .chairlift-chairs--cycle { animation: none !important; }
}

/* ---- touch targets ---- */
@media (max-width: 700px) {
  .btn { padding: 14px 20px; font-size: 14.5px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
}

/* mobile drawer */
@keyframes sneDrawerIn { from { transform: translateX(14px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* sticky filter bars clear the short mobile header */
@media (max-width: 700px) {
  .filter-bar { top: 62px !important; }
  .filter-bar > .wrap { padding: 11px var(--gut) !important; }
  /* the resort rail stops sticking once it sits below the write-up */
  .resort-rail { position: static !important; }
  /* news list rows keep their thumbnail but shrink it */
  .news-row { grid-template-columns: 92px minmax(0,1fr) !important; }
}
@media (max-width: 1024px) { .resort-rail { position: static !important; } }

/* resort hero: a full desktop screen is far too tall on a phone */
@media (max-width: 1024px) { .resort-hero { min-height: 520px !important; height: 640px !important; } }
@media (max-width: 700px)  { .resort-hero { min-height: 400px !important; height: 460px !important; } }

/* the hero carousel arrows sit inside the narrower frame */
@media (max-width: 700px) { .resort-hero button[aria-label$="photo"] { width: 36px !important; height: 36px !important; } }
