/* Viajar a Laponia · LAP2.9
   Production fixes after live audit;
   Scope: trip contact/info forms, Marga reservation forms, privacy/RGPD and
   /cuando-viajar/ legacy-tail media. No global lazyload/Marga-image patch. */

/* -------------------------------------------------------------------------
   1. Trip contact / information forms.
   General /contacto/ keeps its existing layout: these rules require a Marga
   page and explicitly exclude the normal WordPress contact route. */
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form,
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) .cth-lap-trip-form-host,
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) .cth-lap-trip-form-boundary{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  float:none!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form{
  max-width:1040px!important;
  margin-inline:auto!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.h-row,.row){
  display:flex!important;
  flex-wrap:wrap!important;
  gap:16px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0 0 8px!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.h-row,.row) > :where(.h-column,[class*="col-"]){
  flex:1 1 280px!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.h-row,.row) > :only-child{
  flex-basis:100%!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.control-group,.form-group,.form-row){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea,.select2-container){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select){min-height:48px!important}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form textarea{min-height:160px!important;resize:vertical!important}

/* -------------------------------------------------------------------------
   2. Reservation forms. We change geometry only: no fields, values, events,
   calculations, availability, validation, payment or submit semantics. */
body.cth-brand--viajaralaponia.cth-marga-reservation .cth-lap-reservation-host,
body.cth-brand--viajaralaponia.cth-marga-reservation .cth-lap-reservation-boundary,
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  float:none!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form{
  padding:clamp(22px,3vw,36px)!important;
  border:1px solid rgba(9,35,59,.13)!important;
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 18px 52px rgba(9,35,59,.06)!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row){
  display:flex!important;
  flex-wrap:wrap!important;
  gap:16px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0 0 10px!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > :where(.h-column,[class*="col-"]){
  flex:1 1 260px!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > :only-child{flex-basis:100%!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.control-group,.form-group,.form-row){
  width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea,.select2-container){
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select){min-height:46px!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form textarea{width:100%!important;min-height:150px!important;resize:vertical!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(input[type="checkbox"],input[type="radio"]){width:auto!important;min-width:0!important;min-height:0!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.input-group,.md-counter,.counter,.quantity){
  display:inline-flex!important;align-items:center!important;gap:6px!important;width:auto!important;max-width:100%!important;
}

/* -------------------------------------------------------------------------
   3. Privacy / RGPD. JS marks the smallest real legal box by its own visible
   title. This is safe on general Contact as well as trip contact/reservation. */
body.cth-brand--viajaralaponia .cth-lap-privacy-box{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  margin:14px 0 18px!important;
  padding:18px 20px!important;
  overflow:visible!important;
  border:1px solid rgba(9,35,59,.16)!important;
  border-radius:16px!important;
  background:#f8fbfc!important;
  color:#294152!important;
  font-size:.9rem!important;
  line-height:1.55!important;
  box-sizing:border-box!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
}
body.cth-brand--viajaralaponia .cth-lap-privacy-box :where(p,li,span,strong,b,em,a){
  max-width:100%!important;color:#294152!important;overflow-wrap:anywhere!important;white-space:normal!important;
}
body.cth-brand--viajaralaponia .cth-lap-privacy-box a{color:#087d86!important}
body.cth-brand--viajaralaponia .cth-lap-privacy-box :where(ul,ol){max-width:100%!important;margin:.7rem 0!important;padding-left:1.25rem!important}
body.cth-brand--viajaralaponia .cth-lap-privacy-heading{color:#09233b!important;overflow-wrap:anywhere!important}
body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form) :where(.g-recaptcha,iframe,table,img){max-width:100%!important}

/* -------------------------------------------------------------------------
   4. /cuando-viajar/: period cards and legacy editorial-tail images.
   The PHP parser now stops the REYES card before the first non-period figure.
   Keep true editorial photos fluid, but never stretch the old price banner. */
body.cth-brand--viajaralaponia .lap-reading--cuando .lap-reading__prose > figure{
  width:100%!important;
  max-width:100%!important;
  margin:clamp(24px,4vw,46px) auto!important;
}
body.cth-brand--viajaralaponia .lap-reading--cuando .lap-reading__prose > figure > img{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}
body.cth-brand--viajaralaponia .lap-reading--cuando .lap-reading__prose img[data-src*="minimo-precio-viajes-laponia"],
body.cth-brand--viajaralaponia .lap-reading--cuando .lap-reading__prose img[src*="minimo-precio-viajes-laponia"]{
  width:min(100%,760px)!important;
  max-width:760px!important;
  height:auto!important;
  margin-inline:auto!important;
  border-radius:12px!important;
  box-shadow:none!important;
  object-fit:contain!important;
}

/* Mobile: form geometry becomes one clean column and privacy never widens the
   document. We fix the cause; we do NOT hide horizontal overflow globally. */
@media(max-width:767px){
  body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form,
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form{width:100%!important;max-width:100%!important}
  body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.h-row,.row),
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row){display:block!important;margin:0!important}
  body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form :where(.h-row,.row) > *,
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > *{
    display:block!important;float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;flex:0 0 100%!important;margin:0 0 13px!important;
  }
  body.cth-brand--viajaralaponia .cth-lap-privacy-box{padding:14px 14px!important;font-size:.88rem!important;border-radius:13px!important}
  body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea){font-size:16px!important}
}

/* ==========================================================================
   LAP2.9 · production geometry + forms + mobile legal + search hardening
   Loaded last inside the Laponia Brand Pack. Marga remains the functional
   owner; these rules affect only geometry/presentation.                       */

/* 1) Route cards are independent. A malformed/tall card may never stretch its
   row companions, and destination titles keep natural height. */
body.cth-brand--viajaralaponia .lap-visual-grid{align-items:start!important}
body.cth-brand--viajaralaponia .lap-visual-card{align-self:start!important;height:auto!important;min-height:0!important}
body.cth-brand--viajaralaponia .lap-visual-grid--destinations .lap-visual-card__copy{min-height:0!important}

/* 2) Editorial tails: photos retain their aspect ratio. Small legacy banners
   are never blown up as photography. */
body.cth-brand--viajaralaponia .lap-editorial-tail{width:min(100%,1080px);margin-inline:auto!important;min-width:0;color:#334c5d}
body.cth-brand--viajaralaponia .lap-editorial-tail :where(figure,img){max-width:100%!important;box-sizing:border-box!important}
body.cth-brand--viajaralaponia .lap-editorial-tail figure{width:100%!important;margin:clamp(22px,4vw,44px) auto!important}
body.cth-brand--viajaralaponia .lap-editorial-tail figure img{display:block!important;width:100%!important;height:auto!important;object-fit:contain!important;margin-inline:auto!important}
body.cth-brand--viajaralaponia .lap-editorial-tail img[src*="minimo-precio-viajes-laponia"],
body.cth-brand--viajaralaponia .lap-editorial-tail img[data-src*="minimo-precio-viajes-laponia"]{width:min(100%,760px)!important;max-width:760px!important;box-shadow:none!important;border-radius:12px!important}

/* 3) Expert contact, when a real Marga contact island follows the five people,
   is clearly separate from the final person card. */
body.cth-brand--viajaralaponia .lap-experts__contact{min-width:0!important;max-width:1080px!important;overflow:visible!important}
body.cth-brand--viajaralaponia .lap-experts__contact .lap-reading__form{width:100%!important;max-width:100%!important;margin:0!important}

/* 4) Unified functional-form grid. JS uses display:contents only on legacy
   layout wrappers, so inputs remain in their original DOM/Vue ownership. */
body.cth-brand--viajaralaponia .cth-lap-form-grid{
  display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:16px 18px!important;
  width:100%!important;max-width:1060px!important;min-width:0!important;margin-inline:auto!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-grid-pass{display:contents!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell{
  grid-column:span 6!important;display:block!important;float:none!important;width:auto!important;max-width:none!important;min-width:0!important;
  flex:none!important;margin:0!important;padding:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell--compact{grid-column:span 4!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell--wide{grid-column:1/-1!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(.cth-lap-field-cell,.cth-lap-field-cell *){min-width:0!important;box-sizing:border-box!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea,.select2-container){
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,.select2-selection){min-height:48px!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid textarea{min-height:160px!important;resize:vertical!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(input[type="checkbox"],input[type="radio"]){display:inline-block!important;width:auto!important;min-width:0!important;min-height:0!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(.input-group,.md-counter,.counter,.quantity){display:inline-flex!important;align-items:center!important;gap:7px!important;width:auto!important;max-width:100%!important}
body.cth-brand--viajaralaponia .cth-lap-form-grid :where(h2,h3,h4,h5,h6,.formError,.cth-lap-privacy-toggle,.cth-lap-legal-tail-toggle,.cth-lap-privacy-box){grid-column:1/-1!important}

/* Undo legacy narrow wrappers specifically inside the two functional shells. */
body.cth-brand--viajaralaponia :where(.cth-lap-trip-form-host,.cth-lap-trip-form-boundary,.cth-lap-reservation-host,.cth-lap-reservation-boundary){
  width:100%!important;max-width:none!important;min-width:0!important;float:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation .md-template,
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) .md-template{max-width:1240px!important}

/* 5) Legal/privacy blocks. This fixes the cause of horizontal overflow; no
   global overflow-x:hidden is used. Consent, captcha and submit remain outside
   the collapsible text. */
body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form,form.cth-lap-trip-form),
body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form,form.cth-lap-trip-form) *{
  min-width:0;box-sizing:border-box;
}
body.cth-brand--viajaralaponia .cth-lap-privacy-box{
  grid-column:1/-1!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;
  overflow:visible!important;overflow-wrap:anywhere!important;word-break:normal!important;white-space:normal!important;
}
body.cth-brand--viajaralaponia .cth-lap-privacy-box :where(p,li,span,strong,b,em,a),
body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form,form.cth-lap-trip-form) :where(p,li,a,label,strong,span){
  max-width:100%!important;overflow-wrap:anywhere!important;white-space:normal!important;
}
body.cth-brand--viajaralaponia :where(#contacto-form,form.cth-lap-reservation-form,form.cth-lap-trip-form) :where(img,iframe,table,.g-recaptcha){max-width:100%!important}
body.cth-brand--viajaralaponia .cth-lap-privacy-toggle,
body.cth-brand--viajaralaponia .cth-lap-legal-tail-toggle{
  grid-column:1/-1!important;display:none;width:100%;min-height:46px;padding:11px 14px;border:1px solid rgba(9,35,59,.16);border-radius:12px;
  background:#f8fbfc;color:#09233b;font:inherit;font-weight:850;text-align:left;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;
}
body.cth-brand--viajaralaponia :where(.cth-lap-privacy-toggle,.cth-lap-legal-tail-toggle) b{font-size:1.35rem;line-height:1;color:#087d86;transition:transform .18s ease}
body.cth-brand--viajaralaponia :where(.cth-lap-privacy-toggle,.cth-lap-legal-tail-toggle).is-open b{transform:rotate(45deg)}

/* Template expressions are not customer-facing copy. Vue can still mutate the
   exact node; MutationObserver removes this class as soon as real text exists. */
body.cth-brand--viajaralaponia .cth-marga-template-token{display:none!important}

/* 6) Search: polished control geometry plus a body-appended Select2 dropdown
   that is measured by JS against the field that opened it. */
body.cth-brand--viajaralaponia.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
  grid-template-columns:repeat(5,minmax(0,1fr)) minmax(150px,.8fr)!important;gap:14px!important;padding:22px!important;border-radius:24px!important;
}
body.cth-brand--viajaralaponia.vmon-search-route #buscador .md-control{min-width:0!important}
body.cth-brand--viajaralaponia.vmon-search-route #buscador .md-label{margin-bottom:8px!important;color:#344b5e!important;font-size:.74rem!important;font-weight:900!important;letter-spacing:.04em!important}
body.cth-brand--viajaralaponia.vmon-search-route #buscador :where(.select2-selection--multiple,.select2-selection--single,.md-search-field){min-height:50px!important;border-radius:14px!important;background:#f8fbfc!important;border-color:rgba(9,35,59,.14)!important}
body.cth-brand--viajaralaponia .select2-dropdown.cth-lap-search-dropdown{
  min-width:0!important;max-width:calc(100vw - 24px)!important;border:1px solid rgba(9,35,59,.14)!important;border-radius:14px!important;
  background:#fff!important;box-shadow:0 18px 48px rgba(9,35,59,.18)!important;overflow:hidden!important;
}
body.cth-brand--viajaralaponia .cth-lap-search-open{max-width:calc(100vw - 24px)!important;z-index:10080!important}
body.cth-brand--viajaralaponia .cth-lap-search-dropdown .select2-results__options{max-height:320px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:6px!important}
body.cth-brand--viajaralaponia .cth-lap-search-dropdown .select2-results__option{width:100%!important;max-width:100%!important;padding:9px 11px!important;border-radius:9px!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box!important}

@media(max-width:1120px) and (min-width:768px){
  body.cth-brand--viajaralaponia.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell--compact{grid-column:span 6!important}
}

@media(max-width:767px){
  body.cth-brand--viajaralaponia .cth-lap-form-grid{grid-template-columns:1fr!important;gap:13px!important;width:100%!important;max-width:100%!important}
  body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell,
  body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell--compact,
  body.cth-brand--viajaralaponia .cth-lap-form-grid .cth-lap-field-cell--wide{grid-column:1/-1!important;width:100%!important;max-width:100%!important;margin:0!important}
  body.cth-brand--viajaralaponia .cth-lap-form-grid :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea){font-size:16px!important}
  body.cth-brand--viajaralaponia .cth-lap-privacy-toggle,
  body.cth-brand--viajaralaponia .cth-lap-legal-tail-toggle{display:flex!important}
  body.cth-brand--viajaralaponia .cth-lap-privacy-box{padding:14px!important;margin:8px 0 10px!important;font-size:.89rem!important;line-height:1.5!important}
  body.cth-brand--viajaralaponia .lap-editorial-tail{width:100%!important;max-width:100%!important}
  body.cth-brand--viajaralaponia.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{grid-template-columns:1fr!important;padding:16px!important;gap:12px!important}
}

/* LAP2.9 final precedence: LAP2.5 used !important flex rows. The new grid must
   explicitly outrank those legacy-safe rules or desktop fields stay narrow. */
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form.cth-lap-form-grid .cth-lap-grid-pass,
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form.cth-lap-form-grid .cth-lap-grid-pass,
body.cth-brand--viajaralaponia .lap-experts__contact .cth-lap-form-grid .cth-lap-grid-pass{
  display:contents!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form.cth-lap-form-grid{
  width:100%!important;max-width:1060px!important;margin-inline:auto!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form.cth-lap-form-grid{
  width:100%!important;max-width:1040px!important;margin-inline:auto!important;
}
@media(max-width:767px){
  body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-contact-route) #contacto-form.cth-lap-trip-form.cth-lap-form-grid .cth-lap-grid-pass,
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form.cth-lap-form-grid .cth-lap-grid-pass,
  body.cth-brand--viajaralaponia .lap-experts__contact .cth-lap-form-grid .cth-lap-grid-pass{display:contents!important}
}


/* LAP2.9 final system rules ------------------------------------------------- */
body.cth-brand--viajaralaponia .lap-route-composition{width:100%;max-width:var(--cth-container,1240px);margin-inline:auto;min-width:0}
body.cth-brand--viajaralaponia .lap-route-composition>*{min-width:0}
body.cth-brand--viajaralaponia .lap-route-composition>*+*{margin-top:var(--cth-space-group,52px)!important}
body.cth-brand--viajaralaponia .lap-route-composition>.lap-section-heading + :where(.lap-visual-grid,.lap-reading__island,.lap-destination-details){margin-top:var(--cth-space-content,36px)!important}
body.cth-brand--viajaralaponia .lap-route-composition :where(.lap-reading__prose,.lap-section-heading){max-width:var(--cth-reading,1080px);margin-inline:auto}
body.cth-brand--viajaralaponia .lap-reading__prose :where(figure,.lap-inline-image){height:auto!important;min-height:0!important;aspect-ratio:auto!important}
body.cth-brand--viajaralaponia .lap-reading__prose :where(figure,.lap-inline-image) img{display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important}
body.cth-brand--viajaralaponia .lap-visual-grid{align-items:start!important}
body.cth-brand--viajaralaponia .lap-visual-card{position:relative;height:auto!important;align-self:start}
body.cth-brand--viajaralaponia .lap-visual-card__full-link{position:absolute;inset:0;z-index:4;border-radius:inherit;outline:0}
body.cth-brand--viajaralaponia .lap-visual-card.is-linked{cursor:pointer}
body.cth-brand--viajaralaponia .lap-visual-card.is-linked:hover{transform:translateY(-2px)}
body.cth-brand--viajaralaponia .lap-visual-card:has(.lap-visual-card__full-link:focus-visible){outline:3px solid rgba(8,125,134,.36);outline-offset:4px}
body.cth-brand--viajaralaponia .lap-visual-grid--periods .lap-visual-card__copy{min-height:0!important}
body.cth-brand--viajaralaponia .lap-experts__grid{align-items:start!important}
body.cth-brand--viajaralaponia .lap-expert-card{height:auto!important;align-items:start!important}
body.cth-brand--viajaralaponia .lap-expert-card__media{height:auto!important;min-height:0!important;align-self:start!important}
body.cth-brand--viajaralaponia .lap-expert-card__media figure{height:auto!important;aspect-ratio:4/5!important;overflow:hidden!important}
body.cth-brand--viajaralaponia .lap-expert-card__media img{height:100%!important;min-height:0!important;max-height:none!important;object-fit:cover!important}

/* The same search component is rendered on Home and /buscador/. These rules
   intentionally target the shared component instead of route-specific DOM. */
body.cth-brand--viajaralaponia .cth-lap-search-component{width:100%;max-width:100%;min-width:0}
body.cth-brand--viajaralaponia .cth-lap-search-component form.md-template>.d-flex.gutters-col-1,
body.cth-brand--viajaralaponia .cth-lap-search-component form.h-px-2>.h-row>.h-column>.d-flex.flex-column{
  width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia .cth-lap-search-component .md-control{min-width:0!important}
body.cth-brand--viajaralaponia .cth-lap-search-component :where(.select2-container,.md-search-field){max-width:100%!important;min-width:0!important}

/* FAQ text remains literal semantic HTML; no disclosure JS is required to make
   questions/answers retrievable. */
body.cth-brand--viajaralaponia .cth-lap-faq-list{display:grid;gap:12px}
body.cth-brand--viajaralaponia .cth-lap-faq-item{padding:18px 20px;border:1px solid rgba(9,35,59,.10);border-radius:16px;background:#fff}
body.cth-brand--viajaralaponia .cth-lap-faq-item h3{margin:0 0 8px;color:#09233b;font-size:clamp(1rem,1.3vw,1.15rem);line-height:1.25}
body.cth-brand--viajaralaponia .cth-lap-faq-item>div{color:#40576a;line-height:1.6}

@media(max-width:767px){
  body.cth-brand--viajaralaponia .lap-route-composition>*+*{margin-top:var(--cth-space-group,40px)!important}
  body.cth-brand--viajaralaponia .lap-route-composition>.lap-section-heading + :where(.lap-visual-grid,.lap-reading__island,.lap-destination-details){margin-top:var(--cth-space-content,30px)!important}
  body.cth-brand--viajaralaponia .lap-expert-card__media figure{aspect-ratio:4/5!important}
}


/* LAP2.9 · REAL MARGA GEOMETRY FIX ----------------------------------------
   Production showed the remaining defect was one level ABOVE .md-template:
   a legacy Colibri column can keep the whole trip island at ~50/66% width.
   Reset only the ancestor chain that actually contains a trip Marga template.
   Internal Marga business controls and bindings are untouched. */
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.content.colibri-page-content :where(.h-section,.h-section-grid-container,.h-row-container,.h-row,.h-column,.h-column-container,.h-column__inner,.h-column__content):has(.md-template){
  width:100%!important;max-width:none!important;min-width:0!important;float:none!important;
  flex:0 0 100%!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.content.colibri-page-content .h-row:has(.md-template){display:block!important}
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title) .md-template{
  display:block!important;width:min(calc(100% - 36px),1240px)!important;max-width:1240px!important;
  margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.md-template>.h-section-grid-container,
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.md-template>.h-section-grid-container>.h-row-container,
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.md-template>.h-section-grid-container>.h-row-container>.h-row{
  width:100%!important;max-width:none!important;min-width:0!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;
}
/* Product rows after the header must not inherit h-col-lg-8 / h-col-lg-4 from
   the old page skeleton. The header itself keeps the explicit 3-column grid. */
body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title)
.md-template>.h-section-grid-container>.h-row-container>.h-row:not(:has(.viaje-title))>.h-column{
  width:100%!important;max-width:none!important;min-width:0!important;flex:0 0 100%!important;margin-left:0!important;margin-right:0!important;
}
/* Contact/reservation grid root can be form OR Vue root div. */
body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid{
  display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:16px 18px!important;
  width:100%!important;max-width:1060px!important;min-width:0!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia #contacto-form.cth-lap-form-grid{max-width:1120px!important}
body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid .cth-lap-grid-pass{
  display:contents!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;
}
body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid .cth-lap-field-cell{
  grid-column:span 6!important;display:block!important;float:none!important;width:auto!important;max-width:none!important;min-width:0!important;margin:0!important;
}
body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid .cth-lap-field-cell--compact{grid-column:span 4!important}
body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid .cth-lap-field-cell--wide{grid-column:1/-1!important}
@media(max-width:1120px) and (min-width:768px){
  body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid .cth-lap-field-cell--compact{grid-column:span 6!important}
}
@media(max-width:767px){
  body.cth-brand--viajaralaponia.cth-route--marga.vmon-marga-page:has(.md-template .viaje-title) .md-template{width:min(calc(100% - 20px),1240px)!important}
  body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid{grid-template-columns:1fr!important;gap:13px!important;max-width:100%!important}
  body.cth-brand--viajaralaponia :where(#contacto-form,.cth-lap-reservation-form).cth-lap-form-grid :where(.cth-lap-field-cell,.cth-lap-field-cell--compact,.cth-lap-field-cell--wide){grid-column:1/-1!important;width:100%!important;max-width:100%!important}
}

/* ==========================================================================
   LAP2.9 · FINAL FIVE-GATE RELEASE
   1) reservation uses its real Marga rows (no display:contents flattening)
   2) period cards are full-card links when PHP resolves a real WP page
   3) editorial imagery keeps intrinsic height
   4) experiences recover source media and use deliberate rows
   5) Marga listings own a centered 1240px result grid
   ========================================================================== */

/* 1. Reservation: explicitly undo the LAP2.9 12-column flattening. Contact is
   intentionally excluded because the live trip-contact layout is accepted. */
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form,
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form.cth-lap-form-grid{
  display:block!important;
  width:100%!important;
  max-width:1120px!important;
  min-width:0!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .cth-lap-grid-pass{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .cth-lap-field-cell,
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .cth-lap-field-cell--compact,
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .cth-lap-field-cell--wide{
  grid-column:auto!important;
  min-width:0!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row){
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:flex-start!important;
  gap:18px 20px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 22px!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > :where(.h-column,[class*="h-col-"],[class*="col-"]){
  float:none!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  flex:1 1 230px!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
  box-sizing:border-box!important;
}
/* Preserve useful proportions from the original Colibri grid without changing
   field order or Marga bindings. */
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > .h-col-lg-2{flex-basis:150px!important;flex-grow:0!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > .h-col-lg-3{flex-basis:220px!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > .h-col-lg-4{flex-basis:280px!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > .h-col-lg-6{flex-basis:440px!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > :where(.h-col-lg-8,.h-col-lg-9,.h-col-lg-10,.h-col-lg-12){flex-basis:100%!important}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(h2,h3,h4,h5,h6,p,label,.md-label,strong,span){
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.cth-lap-privacy-box,.cth-lap-legal-tail,.g-recaptcha,[data-sitekey],textarea){
  width:100%!important;
  max-width:100%!important;
  flex:0 0 100%!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(button,input[type="button"],input[type="submit"],input[type="checkbox"],input[type="radio"]){
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
}
@media(max-width:1023px) and (min-width:768px){
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > :where(.h-column,[class*="h-col-"],[class*="col-"]){flex:1 1 calc(50% - 10px)!important}
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form .h-row > :where(.h-col-lg-8,.h-col-lg-9,.h-col-lg-10,.h-col-lg-12){flex-basis:100%!important}
}
@media(max-width:767px){
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form{padding:18px 14px!important;max-width:100%!important}
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row){display:block!important;margin-bottom:18px!important}
  body.cth-brand--viajaralaponia.cth-marga-reservation form.cth-lap-reservation-form :where(.h-row,.row) > :where(.h-column,[class*="h-col-"],[class*="col-"]){display:block!important;width:100%!important;max-width:100%!important;margin:0 0 14px!important}
}

/* 3. Editorial images: natural wrapper + natural image. Also stop legacy card
   rows from stretching a short image card to the height of a long neighbour. */
body.cth-brand--viajaralaponia .lap-card-grid{align-items:start!important;grid-auto-rows:auto!important}
body.cth-brand--viajaralaponia .lap-content-card{height:auto!important;min-height:0!important;align-self:start!important}
body.cth-brand--viajaralaponia :where(.lap-editorial-tail,.lap-reading__prose--plain) figure,
body.cth-brand--viajaralaponia :where(.lap-editorial-tail,.lap-reading__prose--plain) .lap-inline-image{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
  margin:32px auto!important;
}
body.cth-brand--viajaralaponia :where(.lap-editorial-tail,.lap-reading__prose--plain) figure img,
body.cth-brand--viajaralaponia :where(.lap-editorial-tail,.lap-reading__prose--plain) .lap-inline-image img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  margin:0 auto!important;
}

/* 4. Experiences: media/no-media cards share a deliberate row rather than a
   pseudo-masonry with holes. Existing source images only; no fallback image is
   fabricated. */
body.cth-brand--viajaralaponia .lap-visual-grid--experiences{align-items:stretch!important;grid-auto-rows:auto!important;gap:20px!important}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card{height:100%!important;min-height:0!important;align-self:stretch!important}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card:not(.has-media){display:flex!important;flex-direction:column!important;justify-content:flex-start!important;background:linear-gradient(145deg,#fff,#f7fbfc)!important}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card:not(.has-media) .lap-visual-card__copy{flex:1!important}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card:not(.has-media){position:relative!important;isolation:isolate!important;background:linear-gradient(145deg,#f5fbfc 0%,#fff 64%)!important;border-color:rgba(8,125,134,.16)!important}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card:not(.has-media)::after{content:"✦";position:absolute;right:18px;bottom:10px;z-index:0;font-size:clamp(3.8rem,6vw,6.4rem);line-height:1;color:rgba(8,125,134,.09);pointer-events:none}
body.cth-brand--viajaralaponia .lap-visual-grid--experiences .lap-visual-card:not(.has-media) .lap-visual-card__copy{position:relative;z-index:1;padding-bottom:64px!important}
body.cth-brand--viajaralaponia .lap-route-composition--experiencias > .lap-editorial-tail{margin-top:64px!important}

/* 5. Marga result hubs (/ruka/, dimensions, search results): the result island
   itself is centered and its legacy h-column cards become a real responsive
   grid. Product detail pages are excluded by the .viaje-title guard. */
body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) :where(.md-destacados-wrap,.md-resultados,.md-results){
  width:min(calc(100% - 36px),1240px)!important;
  max-width:1240px!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .travel-card),
body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .box){
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:24px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  align-items:start!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .travel-card) > .h-column,
body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .box) > .h-column{
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  flex:none!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
}
@media(max-width:1024px){
  body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .travel-card),
  body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .box){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) :where(.md-destacados-wrap,.md-resultados,.md-results){width:min(calc(100% - 20px),1240px)!important}
  body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .travel-card),
  body.cth-brand--viajaralaponia.vmon-marga-page:not(:has(.md-template .viaje-title)) .md-destacados-wrap :where(.h-row,.row):has(> .h-column .box){grid-template-columns:1fr!important;gap:18px!important}
}


/* ========================================================================== 
   LAP2.9.2 · TWO SMALL PRODUCTION FIXES ONLY
   A) Dimension/result pages: release the legacy Colibri parent column that can
      keep the entire Marga island at ~33/50% width. This mirrors the proven
      trip-detail ancestor reset, but only when a listing contains travel-card
      and never on search/contact/reservation/product-detail routes.
   B) Reservation opener: present the existing "Has viajado..." yes/no controls
      as a clean horizontal pair. No values, events or Marga bindings change.
   ========================================================================== */

/* A · Listing canvas. The previous LAP2.9 rule centered result wrappers inside
   the narrow column; this releases the column itself before centering 1240px. */
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-search-route):not(.vmon-contact-route):not(.cth-marga-reservation):not(:has(.md-template .viaje-title)):has(.md-template .travel-card)
.content.colibri-page-content :where(.h-section,.h-section-grid-container,.h-row-container,.h-row,.h-column,.h-column-container,.h-column__inner,.h-column__content):has(.md-template){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  flex:0 0 100%!important;
  float:none!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-search-route):not(.vmon-contact-route):not(.cth-marga-reservation):not(:has(.md-template .viaje-title)):has(.md-template .travel-card)
.content.colibri-page-content .h-row:has(.md-template){display:block!important}
body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-search-route):not(.vmon-contact-route):not(.cth-marga-reservation):not(:has(.md-template .viaje-title)):has(.md-template .travel-card)
.md-template{
  display:block!important;
  width:min(calc(100% - 36px),1240px)!important;
  max-width:1240px!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* B · First reservation question. JS only adds these classes after recognising
   the literal question and the existing SI/NO controls; it never moves them. */
body.cth-brand--viajaralaponia.cth-marga-reservation .cth-lap-reservation-history{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 22px!important;
  padding:6px 0 2px!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation .cth-lap-reservation-history__question{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0 0 4px!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation .cth-lap-reservation-history__choice{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:58px!important;
  max-width:none!important;
  min-height:42px!important;
  height:auto!important;
  margin:0 8px 0 0!important;
  padding:9px 15px!important;
  line-height:1!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  box-sizing:border-box!important;
}
body.cth-brand--viajaralaponia.cth-marga-reservation input.cth-lap-reservation-history__choice[type="radio"]{
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
}
@media(max-width:767px){
  body.cth-brand--viajaralaponia.vmon-marga-page:not(.vmon-search-route):not(.vmon-contact-route):not(.cth-marga-reservation):not(:has(.md-template .viaje-title)):has(.md-template .travel-card) .md-template{
    width:min(calc(100% - 20px),1240px)!important;
  }
}
