/* Youth’s Online Child v0.13.2 — homepage layout, additive only.
   The v0.13.1 sheet was not enqueued for is_front_page().
   This file intentionally does NOT change portal authentication, dropdown JS,
   homepage sections/content, or customer/operator backend logic. */

/* Parent's body .container is 1760px wide: keep content readable while leaving
   full-bleed section backgrounds alone. Scope to front page only. */
body.yo-homepage-ready main .container,
body.home main .container {
  width: min(calc(100% - 48px), 1360px);
  max-width: 1360px;
  margin-inline: auto;
}
body.yo-homepage-ready .site-header .navrow,
body.home .site-header .navrow,
body.yo-homepage-ready .footer .container,
body.home .footer .container {
  width: min(calc(100% - 48px), 1440px);
  max-width: 1440px;
  margin-inline: auto;
}
body.yo-homepage-ready main section,
body.home main section {max-width:100%;}
body.yo-homepage-ready main :is(.hero-grid,.section-head,.contact-grid,.about-grid,.yo-print-layout,.yo-home-jobs,.yo-updates-grid,.yo-blog-grid),
body.home main :is(.hero-grid,.section-head,.contact-grid,.about-grid,.yo-print-layout,.yo-home-jobs,.yo-updates-grid,.yo-blog-grid) {
  min-width:0;
}
body.yo-homepage-ready .hero .hero-grid,
body.home .hero .hero-grid {align-items:center;gap:clamp(18px,3vw,48px);}
body.yo-homepage-ready .hero .hero-copy,
body.home .hero .hero-copy {min-width:0;max-width:720px;}
body.yo-homepage-ready .hero .hero-copy :is(h1,p),
body.home .hero .hero-copy :is(h1,p) {overflow-wrap:anywhere;}
body.yo-homepage-ready main :is(.yo-home-jobs,.yo-home-job-card,.yo-slider-card,.yo-update-card,.service-card),
body.home main :is(.yo-home-jobs,.yo-home-job-card,.yo-slider-card,.yo-update-card,.service-card) {max-width:100%;min-width:0;}
body.yo-homepage-ready main :is(.yo-home-job-card,.yo-update-card,.service-card) a,
body.home main :is(.yo-home-job-card,.yo-update-card,.service-card) a {overflow-wrap:anywhere;}
body.yo-homepage-ready main .section .section-head,
body.home main .section .section-head {max-width:100%;}
body.yo-homepage-ready main :is(img,video,iframe),
body.home main :is(img,video,iframe) {max-width:100%;height:auto;}
body.yo-homepage-ready main :is(table,.wp-block-table),
body.home main :is(table,.wp-block-table){max-width:100%;}
body.yo-homepage-ready main :is(.wp-block-table,.yon-job-scroll),
body.home main :is(.wp-block-table,.yon-job-scroll){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}

/* Jobs cards should not stretch into unreadable single columns on ultra-wide
   monitors. Do not replace the existing carousel or its JS. */
@media (min-width:1500px) {
  body.yo-homepage-ready .yo-home-jobs .yo-updates-grid,
  body.home .yo-home-jobs .yo-updates-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:1050px) {
  body.yo-homepage-ready .hero .hero-grid,
  body.home .hero .hero-grid {grid-template-columns:minmax(0,1fr);}
  body.yo-homepage-ready .hero .hero-copy,
  body.home .hero .hero-copy {max-width:100%;}
  body.yo-homepage-ready .hero .hero-visual,
  body.home .hero .hero-visual {min-width:0;max-width:100%;}
}
@media (max-width:720px) {
  body.yo-homepage-ready main .container,
  body.home main .container,
  body.yo-homepage-ready .site-header .navrow,
  body.home .site-header .navrow,
  body.yo-homepage-ready .footer .container,
  body.home .footer .container {
    width:calc(100% - 28px);
    max-width:none;
    margin-inline:auto;
  }
  body.yo-homepage-ready main :is(.hero,.section),
  body.home main :is(.hero,.section) {max-width:100%;}
  body.yo-homepage-ready main .section .section-head,
  body.home main .section .section-head {flex-wrap:wrap;align-items:flex-start;gap:12px;}
  body.yo-homepage-ready main :is(.yo-home-job-card,.yo-update-card,.service-card),
  body.home main :is(.yo-home-job-card,.yo-update-card,.service-card) {overflow-wrap:anywhere;}
  body.yo-homepage-ready main :is(.btn,.yo-home-entry a),
  body.home main :is(.btn,.yo-home-entry a) {white-space:normal;max-width:100%;text-align:center;}
  body.yo-homepage-ready main .hero .hero-copy,
  body.home main .hero .hero-copy {padding-inline:0;}
}
@media (max-width:370px) {
  body.yo-homepage-ready main .container,
  body.home main .container {width:calc(100% - 22px);}
}
