/* Oloropa O27 — cross-route container, grid and viewport normalization.
   Scope: contact.php, services.php, about.php and booking.php. */

:root{
  --ol-o27-container-max:80rem;
  --ol-o27-gutter:clamp(1rem,2.4vw,1.5rem);
  --ol-o27-grid-gap:clamp(1rem,2vw,1.5rem);
  --ol-o27-section-space:clamp(4rem,7vw,7rem);
}

body[data-ol-cross-route-layout="normalized"]{
  width:100%;
  min-width:0;
  overflow-x:clip!important;
}

body[data-ol-cross-route-layout="normalized"] #main-content,
body[data-ol-cross-route-layout="normalized"] #main-content > section,
body[data-ol-cross-route-layout="normalized"] #main-content > section > *{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(-n+4){
  width:100%;
  margin-inline:0!important;
  overflow:clip;
}

body[data-ol-cross-route-layout="normalized"] #main-content > .sp-hero,
body[data-ol-cross-route-layout="normalized"] #main-content > .cct-hero{
  padding-inline:0!important;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4){
  padding-inline:0!important;
  padding-block:var(--ol-o27-section-space)!important;
}

body[data-ol-cross-route-layout="normalized"] #main-content > .sp-hero > .sp-hero-grid,
body[data-ol-cross-route-layout="normalized"] #main-content > .cct-hero > .cct-hero-grid,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) > .sp-inner,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) > .cct-inner{
  width:100%!important;
  max-width:var(--ol-o27-container-max)!important;
  margin-inline:auto!important;
  padding-inline:var(--ol-o27-gutter)!important;
  box-sizing:border-box!important;
}

/* Hero: one 12-column desktop system, one-column mobile fold. */
body[data-ol-cross-route-layout="normalized"] #main-content > .sp-hero > .sp-hero-grid,
body[data-ol-cross-route-layout="normalized"] #main-content > .cct-hero > .cct-hero-grid{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  align-items:end!important;
  gap:clamp(1.5rem,3vw,3rem)!important;
}

body[data-ol-cross-route-layout="normalized"] .cct-hero-grid > .cct-hero-copy,
body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .cct-hero-copy,
body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .sp-hero-copy{
  grid-column:span 8!important;
  min-width:0;
  max-width:none!important;
}

body[data-ol-cross-route-layout="normalized"] .cct-hero-grid > .cct-trust-card,
body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .cct-trust-card,
body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .sp-hero-panel{
  grid-column:span 4!important;
  width:100%!important;
  min-width:0;
  max-width:none!important;
  justify-self:stretch!important;
  align-self:end!important;
}

body[data-ol-cross-route-layout="normalized"] .cct-hero-copy h1,
body[data-ol-cross-route-layout="normalized"] .sp-hero-copy h1{
  max-width:14ch!important;
  font-size:clamp(3.15rem,6.4vw,7.2rem)!important;
  line-height:.88!important;
  text-wrap:balance;
  overflow-wrap:normal;
}

body[data-ol-cross-route-layout="normalized"] .cct-hero-copy > p,
body[data-ol-cross-route-layout="normalized"] .sp-hero-copy > p{
  width:100%;
  max-width:44rem!important;
  text-wrap:pretty;
}

body[data-ol-cross-route-layout="normalized"] .sp-actions,
body[data-ol-cross-route-layout="normalized"] .cct-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.75rem!important;
}

body[data-ol-cross-route-layout="normalized"] .sp-btn,
body[data-ol-cross-route-layout="normalized"] .phase7-primary-link,
body[data-ol-cross-route-layout="normalized"] .phase7-ghost-link,
body[data-ol-cross-route-layout="normalized"] .phase7-util-btn{
  min-width:0;
  max-width:100%;
  text-align:center;
  white-space:normal;
}

/* Shared heading rhythm and boundary alignment. */
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-head,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .cct-head{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  align-items:end!important;
  gap:var(--ol-o27-grid-gap)!important;
  width:100%;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-head > div,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .cct-head > div{
  grid-column:span 8;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-head > p,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .cct-head > p{
  grid-column:span 4;
  width:100%;
  max-width:none!important;
  min-width:0;
  margin:0;
  text-wrap:pretty;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-head h2,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .cct-head h2{
  width:100%;
  max-width:16ch!important;
  text-wrap:balance;
  overflow-wrap:normal;
}

/* Tool/form layouts: explicit 12-column desktop matrix. */
body[data-ol-cross-route-layout="normalized"] .phase7-router-layout,
body[data-ol-cross-route-layout="normalized"] .phase7-service-layout,
body[data-ol-cross-route-layout="normalized"] .phase7-method-layout{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:var(--ol-o27-grid-gap)!important;
  align-items:start!important;
}

body[data-ol-cross-route-layout="normalized"] :is(.phase7-router-layout,.phase7-service-layout,.phase7-method-layout) > .phase7-tool-panel{
  grid-column:span 8!important;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"] .phase7-router-layout > .phase7-channel-stack,
body[data-ol-cross-route-layout="normalized"] .phase7-service-layout > .phase7-service-result,
body[data-ol-cross-route-layout="normalized"] .phase7-method-layout > .phase7-method-note{
  grid-column:span 4!important;
  min-width:0;
  width:100%;
}

body[data-ol-cross-route-layout="normalized"] :is(.phase7-channel-stack,.phase7-service-result,.phase7-method-note,.phase7-tool-panel,.phase7-channel-card,.phase7-result-card){
  min-width:0;
  max-width:100%;
}

body[data-ol-cross-route-layout="normalized"] .phase7-field-row{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:var(--ol-o27-grid-gap)!important;
}

body[data-ol-cross-route-layout="normalized"] .phase7-field-row > label{
  grid-column:span 6;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"] .phase7-field-row > label:last-child,
body[data-ol-cross-route-layout="normalized"] .phase7-field-row > label:has(textarea){
  grid-column:1 / -1;
}

body[data-ol-cross-route-layout="normalized"] :is(input,select,textarea,button){
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

body[data-ol-cross-route-layout="normalized"] .phase7-reason-grid,
body[data-ol-cross-route-layout="normalized"] .phase7-service-grid,
body[data-ol-cross-route-layout="normalized"] .phase7-method-grid,
body[data-ol-cross-route-layout="normalized"] .phase7-proof-grid{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:var(--ol-o27-grid-gap)!important;
}

body[data-ol-cross-route-layout="normalized"] .phase7-reason-grid > *{
  grid-column:span 6;
}

body[data-ol-cross-route-layout="normalized"] .phase7-service-grid > *{
  grid-column:span 4;
}

body[data-ol-cross-route-layout="normalized"] .phase7-method-grid > *{
  grid-column:span 3;
}

body[data-ol-cross-route-layout="normalized"] .phase7-proof-grid > *{
  grid-column:span 4;
}

body[data-ol-cross-route-layout="normalized"] :is(.phase7-reason-card,.phase7-service-card,.phase7-method-card,.phase7-proof-card){
  width:100%;
  min-width:0;
  height:100%;
  overflow-wrap:anywhere;
}

/* Shared lower cards and step rows within the normalized top-four sections. */
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.two,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.four,
body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-step-list{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:var(--ol-o27-grid-gap)!important;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid > *{
  grid-column:span 4;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.two > *{
  grid-column:span 6;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.four > *{
  grid-column:span 3;
}

body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-step-list > *{
  grid-column:span 4;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"] :is(.sp-card,.sp-step,.cct-tool-card,.cct-trust-card,.phase7-channel-card,.phase7-result-card,.phase7-method-note){
  overflow-wrap:anywhere;
}

/* Booking studio: normalize calendar and handoff blocks to the same grid. */
body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-booking-calendar,
body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-phase2-canonical-brief-handoff,
body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-phase2-canonical-brief-card{
  width:100%;
  min-width:0;
  max-width:100%;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-head,
body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-body{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:var(--ol-o27-grid-gap)!important;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-head > div{
  grid-column:span 9;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-head > label{
  grid-column:span 3;
  min-width:0;
  align-self:end;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-body > aside{
  grid-column:span 4;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-body > .ol-cal-panel{
  grid-column:span 8;
  min-width:0;
}

body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] :is(.ol-cal-grid,.ol-cal-week,.ol-cal-toolbar,.ol-cal-foot,.ol-cal-source-card){
  min-width:0;
  max-width:100%;
}

/* Media and copy containment. */
body[data-ol-cross-route-layout="normalized"] #main-content :is(img,video,picture,iframe,svg){
  max-width:100%;
}

body[data-ol-cross-route-layout="normalized"] #main-content :is(h1,h2,h3,h4,p,li,dd,dt,span,strong,a,label){
  min-width:0;
}

@media (max-width:1100px){
  body[data-ol-cross-route-layout="normalized"] .cct-hero-grid > .cct-hero-copy,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .cct-hero-copy,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .sp-hero-copy{
    grid-column:span 7!important;
  }

  body[data-ol-cross-route-layout="normalized"] .cct-hero-grid > .cct-trust-card,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .cct-trust-card,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-grid > .sp-hero-panel{
    grid-column:span 5!important;
  }

  body[data-ol-cross-route-layout="normalized"] .phase7-service-grid > *,
  body[data-ol-cross-route-layout="normalized"] .phase7-method-grid > *{
    grid-column:span 6;
  }
}

@media (max-width:900px){
  body[data-ol-cross-route-layout="normalized"] #main-content > .sp-hero > .sp-hero-grid,
  body[data-ol-cross-route-layout="normalized"] #main-content > .cct-hero > .cct-hero-grid,
  body[data-ol-cross-route-layout="normalized"] .phase7-router-layout,
  body[data-ol-cross-route-layout="normalized"] .phase7-service-layout,
  body[data-ol-cross-route-layout="normalized"] .phase7-method-layout,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-head,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .cct-head{
    grid-template-columns:1fr!important;
  }

  body[data-ol-cross-route-layout="normalized"] :is(
    .cct-hero-grid > .cct-hero-copy,
    .sp-hero-grid > .cct-hero-copy,
    .sp-hero-grid > .sp-hero-copy,
    .cct-hero-grid > .cct-trust-card,
    .sp-hero-grid > .cct-trust-card,
    .sp-hero-grid > .sp-hero-panel,
    .phase7-router-layout > .phase7-tool-panel,
    .phase7-service-layout > .phase7-tool-panel,
    .phase7-method-layout > .phase7-tool-panel,
    .phase7-router-layout > .phase7-channel-stack,
    .phase7-service-layout > .phase7-service-result,
    .phase7-method-layout > .phase7-method-note
  ){
    grid-column:1 / -1!important;
  }

  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) :is(.sp-head,.cct-head) > *{
    grid-column:1 / -1!important;
  }

  body[data-ol-cross-route-layout="normalized"] .phase7-result-card,
  body[data-ol-cross-route-layout="normalized"] .phase7-method-note,
  body[data-ol-cross-route-layout="normalized"] .phase7-sticky-summary{
    position:relative!important;
    top:auto!important;
  }

  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-head > *,
  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-body > *{
    grid-column:1 / -1!important;
  }
}

@media (max-width:760px){
  :root{
    --ol-o27-gutter:1rem;
    --ol-o27-grid-gap:1rem;
    --ol-o27-section-space:clamp(3.25rem,12vw,5rem);
  }

  body[data-ol-cross-route-layout="normalized"] #main-content > .sp-hero > .sp-hero-grid,
  body[data-ol-cross-route-layout="normalized"] #main-content > .cct-hero > .cct-hero-grid{
    width:100%!important;
    padding-top:clamp(6.5rem,24vw,8.5rem)!important;
    padding-bottom:clamp(2.75rem,10vw,4rem)!important;
    gap:1.25rem!important;
  }

  body[data-ol-cross-route-layout="normalized"] .cct-hero-copy h1,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-copy h1{
    max-width:100%!important;
    font-size:clamp(2.65rem,13vw,4.6rem)!important;
    line-height:.92!important;
  }

  body[data-ol-cross-route-layout="normalized"] .sp-actions,
  body[data-ol-cross-route-layout="normalized"] .cct-actions,
  body[data-ol-cross-route-layout="normalized"] .phase7-utility-row{
    align-items:stretch!important;
  }

  body[data-ol-cross-route-layout="normalized"] .sp-actions > *,
  body[data-ol-cross-route-layout="normalized"] .cct-actions > *{
    flex:1 1 100%;
    width:100%;
  }

  body[data-ol-cross-route-layout="normalized"] .phase7-field-row,
  body[data-ol-cross-route-layout="normalized"] .phase7-reason-grid,
  body[data-ol-cross-route-layout="normalized"] .phase7-service-grid,
  body[data-ol-cross-route-layout="normalized"] .phase7-method-grid,
  body[data-ol-cross-route-layout="normalized"] .phase7-proof-grid,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.two,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.four,
  body[data-ol-cross-route-layout="normalized"] #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-step-list,
  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-head,
  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-body{
    grid-template-columns:1fr!important;
  }

  body[data-ol-cross-route-layout="normalized"] :is(
    .phase7-field-row > label,
    .phase7-reason-grid > *,
    .phase7-service-grid > *,
    .phase7-method-grid > *,
    .phase7-proof-grid > *,
    #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid > *,
    #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.two > *,
    #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-grid.four > *,
    #main-content > section:nth-of-type(n+2):nth-of-type(-n+4) .sp-step-list > *,
    .ol-cal-head > *,
    .ol-cal-body > *
  ){
    grid-column:1 / -1!important;
  }

  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-week,
  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-grid{
    gap:.25rem!important;
  }

  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-day{
    min-height:3.2rem!important;
    padding:.25rem!important;
    border-radius:.7rem!important;
  }

  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-cal-foot{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-items:stretch!important;
  }
}

@media (max-width:420px){
  body[data-ol-cross-route-layout="normalized"] .cct-hero-copy h1,
  body[data-ol-cross-route-layout="normalized"] .sp-hero-copy h1{
    font-size:clamp(2.4rem,12.5vw,3.35rem)!important;
  }

  body[data-ol-cross-route-layout="normalized"] .cct-trust-card,
  body[data-ol-cross-route-layout="normalized"] .phase7-channel-card,
  body[data-ol-cross-route-layout="normalized"] .phase7-result-card,
  body[data-ol-cross-route-layout="normalized"] .phase7-method-note,
  body[data-ol-cross-route-layout="normalized"][data-oloropa-page="booking.php"] .ol-booking-calendar{
    border-radius:1.25rem!important;
    padding:1rem!important;
  }
}
