/* Shared final adjustments. Keep the approved desktop frames; reflow their
   contents before columns become too narrow for readable copy and photographs. */
:is(.hp-hero,.hp-team,.hp-contact,.summer-hero,.spring-hero,.winter-hero,
    .summer-choice__grid,.spring-choice,.autumn-choice,.summer-finale__grid,
    .spring-finale,.autumn-finale,.trip-columns,.trip-split,.trip-contact-inner)>* {
  min-width:0;
}
:is(.summer-button,.spring-button,.autumn-button,.trip-button) {
  max-width:100%;
  white-space:normal;
}
:is(.summer-form-card,.spring-form-card,.autumn-form-card,.hp-enquiry) {
  min-width:0;
}
:is(.summer-form-card,.spring-form-card,.autumn-form-card,.hp-enquiry) :is(input,textarea,select) {
  min-width:0;
  max-width:100%;
}
.shell-footer-bottom>* { min-width:0; }
.shell-legal-links a { overflow-wrap:anywhere; }

/* These old zooms enlarged raster pixels again after object-fit had already
   filled the frame. The frame and the selected subject position stay intact. */
.winter-hero>figure img,
.winter-care>figure img,
.winter-choice-heading>figure img,
.winter-city__main>.winter-photo>img { transform:none; }

@media (min-width:701px) and (max-width:1000px) {
  .trip-columns--three { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .trip-columns--three>.trip-copy:last-child {
    grid-column:1/-1;
    border-left:0;
    border-top:1px solid var(--trip-line);
    padding:20px 0 0;
  }
  .trip-itinerary { grid-template-columns:repeat(2,minmax(0,1fr));gap:24px; }
  .trip-itinerary li+li { padding-left:0;border-left:0; }
  .trip-itinerary li:nth-child(even) { padding-left:24px;border-left:2px solid #bccb80; }
  .trip-itinerary p,.trip-columns--three p { font-size:17px;line-height:1.45; }
}

@media (min-width:701px) and (max-width:900px) {
  /* A tablet image must not retain the 640–810px desktop portrait height. */
  .summer-hero,.spring-hero,.winter-hero { min-height:0;height:auto;gap:24px; }
  .summer-hero>figure,.spring-hero>figure,.winter-hero>figure {
    height:auto;
    min-height:0;
    aspect-ratio:4/5;
    border-radius:90px 22px 22px 90px;
  }
  .summer-hero__copy>p:not(.summer-meta),.svs-spring .spring-intro,
  .svs-winter .winter-hero__intro { font-size:18px;line-height:1.5; }
  .svs-summer .summer-meta,.svs-winter .winter-meta { margin-top:22px; }
  .summer-hero .summer-note,.spring-hero .spring-note,.winter-hero .spring-note {
    font-size:32px;
    padding-inline:12px;
  }

  /* Natural rows keep the copy from running into summer's collage images. */
  .summer-collage,.summer-creative {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:none;
    gap:26px;
  }
  .summer-collage__intro,.summer-collage__large,.summer-collage__action {
    grid-column:1/-1;
    grid-row:auto;
  }
  .summer-collage__top,.summer-collage__bottom,
  .summer-creative .summer-collage__top,.summer-creative .summer-collage__bottom {
    grid-column:auto;
    grid-row:auto;
  }
  .summer-collage__large>img { height:auto;aspect-ratio:2; }
  .summer-collage__top>img,.summer-collage__bottom>img,
  .summer-creative .summer-collage__bottom>img { height:auto;aspect-ratio:3/2; }
  .summer-pool__bottom { align-items:flex-start;flex-direction:column;gap:22px; }
  .summer-pool__perks { justify-content:space-between;width:100%; }

  .summer-parent-cards,.spring-parent-cards,.autumn-parent-cards {
    grid-template-columns:1fr;
    gap:28px;
  }
  .summer-parent-cards article>img,.spring-parent-cards article img,
  .autumn-parent-cards article>img { height:auto;aspect-ratio:16/9; }
  .summer-parent-cards article>div { padding:26px; }
  .summer-parent-cards h3,.spring-parent-cards h3,.autumn-parent-cards h3 { font-size:25px; }
  .summer-parent-cards p,.spring-parent-cards p,.autumn-parent-cards p { font-size:18px; }
  .summer-parent-cards .summer-button,.spring-parent-cards .spring-button,
  .autumn-parent-cards .autumn-button { font-size:16px;min-height:52px; }

  .summer-choice__grid,.spring-choice,.winter-choice-section .spring-choice,
  .autumn-choice,.summer-finale__grid,.spring-finale,.winter-finale,.autumn-finale {
    grid-template-columns:1fr;
    gap:30px;
  }
  .spring-finale__story h2,.winter-finale .spring-finale__story h2,.autumn-finale h2 {
    font-size:clamp(32px,4.8vw,43px);
  }
  .winter-finale .spring-finale__story .spring-note {
    position:static;
    width:fit-content;
    margin:18px 0;
  }
  .autumn-finale__story { padding-right:0; }
  .summer-finale__story>img,.spring-finale__story>img,
  .winter-finale .spring-finale__story>img,.autumn-finale__story>img {
    height:auto;
    min-height:0;
    aspect-ratio:16/9;
    flex:none;
  }
  .svs-spring .spring-finale__story>.spring-image {
    flex:none;
    min-height:0;
    aspect-ratio:16/9;
  }
  .summer-form-card,.spring-form-card,.winter-finale .spring-form-card,
  .autumn-form-card { padding:30px; }
  .summer-form-card h3,.spring-form-card h3,.winter-finale .spring-form-card h3,
  .autumn-form-card h3 { font-size:28px; }
  .autumn-form-card input,.autumn-form-card textarea { font-size:16px; }
  .winter-day-heading p { display:block; }

  .trip-split,.trip-split--wide,.trip-meeting,.svs-trip--groups #water .trip-split {
    grid-template-columns:1fr;
  }
  .trip-split>figure { min-height:0; }
  .trip-split>figure img { position:static;height:auto;aspect-ratio:16/9; }
  .trip-contact-inner { grid-template-columns:1fr;gap:24px; }
  .trip-contact-actions { align-items:flex-start; }
  .trip-contact h2 { font-size:36px; }
  .trip-modal-grid { grid-template-columns:1fr; }
  .trip-modal-photos { grid-template-columns:repeat(2,minmax(0,1fr));align-items:start; }
  .trip-modal-photos figure img,.trip-modal-photos figure+figure img { aspect-ratio:3/2; }
  .trip-modal-photos--water { grid-template-columns:1fr; }
}

@media (max-width:767px) {
  .shell-farewell { white-space:normal; }
  .shell-footer-column nav>a { min-height:44px;display:flex;align-items:center; }
  .shell-mobile-top { gap:16px; }
  .shell-mobile-menu .shell-mobile-sections a { overflow-wrap:break-word; }
  .hp-heading { flex-wrap:wrap;align-items:flex-start; }
  .hp-heading>a { min-height:44px;display:inline-flex;align-items:center; }
  .hp-social { flex-wrap:wrap;gap:12px; }
  .hp-social a { min-height:44px;display:inline-flex;align-items:center; }
  .hp-hero-copy,.hp-hero-art { min-width:0; }
  .home-care-footer a { white-space:normal; }
  .rt-topline { flex-wrap:wrap; }
  .rt-story h2,.rt-story>p { min-height:0; }
  .rt-dialog-bottom { flex-wrap:wrap; }
  .rt-dialog-bottom .rt-navigation { margin-left:auto; }
  .care-popup-highlight>div:last-child { min-width:0; }
  .care-popup-contact a { white-space:normal; }
}

@media (max-width:519px) {
  /* At 390px two cards leave under 100px for a heading and cut whole words. */
  .home-care-details { grid-template-columns:1fr;gap:20px; }
  .home-care-topic-body {
    padding:22px;
    grid-template-columns:minmax(0,1fr) 44px;
    gap:10px 14px;
  }
  .home-care-topic h3 { font-size:24px;min-height:0; }
  .home-care-topic p { font-size:17px;line-height:1.5; }
  .home-care-topic .home-care-plus { width:44px;height:44px;font-size:30px; }
  .summer-hero>figure,.spring-hero>figure,.winter-hero>figure {
    height:auto;
    min-height:0;
    aspect-ratio:1;
  }
  .trip-hero h1>.trip-title-line { max-width:100%; }
  .trip-hero h1,.trip-hero--group h1 { font-size:clamp(40px,11vw,57px); }
  .svs-spring .spring-program__header .spring-note { white-space:normal; }
  .spring-finale,.winter-finale { padding:24px 14px 14px; }
  .spring-form-card,.winter-finale .spring-form-card { padding:24px 18px; }
  .summer-form-card { padding:24px 18px; }
  .summer-finale__story .summer-note { margin-left:12px; }
  .care-popup-highlight { align-items:flex-start; }
  .care-popup-icon { width:48px;height:48px; }
  .care-popup-icon svg { width:30px;height:30px; }
  .care-popup-highlight strong { font-size:20px; }
}

/* Keep dialog content reachable with a landscape phone and its browser bars. */
@media (max-height:600px) {
  .home-room-header,.home-menu-header { padding-block:10px; }
  .home-room-footer,.home-menu-footer { padding-block:10px; }
  .home-room-footer p,.home-menu-footer p { display:none; }
  .trip-modal-footer { padding-block:10px; }
  .rt-dialog-shell { padding-top:10px;padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .rt-dialog-top { padding-bottom:10px; }
  .rt-dialog-bottom { padding-top:10px; }
}
