/* ==========================================================
   VCTF 4.3 · production repair
   Scope: Viajacontufamilia only. Presentation and progressive UI only.
   Marga remains the owner of values, options, filters, prices, validation,
   reservation calculations and submit behaviour.
   ========================================================== */

/* 1. Primary navigation: submenus are explicit, never proximity-hover traps. */
body.cth-brand--vctf .vmon-nav li.menu-item-has-children > ul,
body.cth-brand--vctf .vmon-nav li.has-sub > ul{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(8px)!important;
}
body.cth-brand--vctf .vmon-nav li.menu-item-has-children:hover > ul,
body.cth-brand--vctf .vmon-nav li.menu-item-has-children:focus-within > ul,
body.cth-brand--vctf .vmon-nav li.has-sub:hover > ul,
body.cth-brand--vctf .vmon-nav li.has-sub:focus-within > ul{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(8px)!important;
}
body.cth-brand--vctf .vmon-nav li.has-sub.is-open > ul{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transform:none!important;
}
body.cth-brand--vctf .vmon-nav li.has-sub > ul{
  top:100%!important;
  margin-top:8px!important;
}

/* 2. Search: never expose a native multiple listbox while enhancement loads. */
body.cth-brand--vctf .vmon-marga--search select[multiple]:not(.select2-hidden-accessible):not(.cth-vctf43-multi-source){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:50px!important;
  min-height:50px!important;
  max-height:50px!important;
  overflow:hidden!important;
  border:1px solid rgba(7,27,51,.16)!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#071b33!important;
  padding:0 12px!important;
}
body.cth-brand--vctf .vmon-marga--search select.cth-vctf43-multi-source{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:-1px!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi{
  position:relative!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__button{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  width:100%!important;
  height:50px!important;
  min-height:50px!important;
  margin:0!important;
  padding:0 14px!important;
  border:1px solid rgba(7,27,51,.16)!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#071b33!important;
  box-shadow:none!important;
  font:inherit!important;
  font-size:.94rem!important;
  font-weight:700!important;
  text-align:left!important;
  cursor:pointer!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__button:hover,
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__button:focus-visible{
  border-color:#0b74d1!important;
  box-shadow:0 0 0 3px rgba(11,116,209,.12)!important;
  outline:0!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__button span:first-child{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__chevron{
  flex:0 0 auto!important;
  color:#0b74d1!important;
  font-size:1.05rem!important;
  line-height:1!important;
  transition:transform .16s ease!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi.is-open .cth-vctf43-multi__chevron{transform:rotate(180deg)!important}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__panel{
  position:absolute!important;
  z-index:100500!important;
  left:0!important;
  top:calc(100% + 7px)!important;
  width:max(100%,280px)!important;
  max-width:min(440px,calc(100vw - 24px))!important;
  max-height:min(340px,55vh)!important;
  overflow:auto!important;
  padding:7px!important;
  border:1px solid rgba(7,27,51,.13)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 22px 55px rgba(7,27,51,.18)!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__panel[hidden]{display:none!important}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__option{
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  width:100%!important;
  margin:0!important;
  padding:9px 10px!important;
  border-radius:9px!important;
  color:#071b33!important;
  font-size:.91rem!important;
  line-height:1.3!important;
  cursor:pointer!important;
}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__option:hover{background:#eef7ff!important}
body.cth-brand--vctf .vmon-marga--search .cth-vctf43-multi__option input{
  flex:0 0 auto!important;
  width:16px!important;
  height:16px!important;
  min-height:0!important;
  margin:2px 0 0!important;
  accent-color:#0b74d1!important;
}
body.cth-brand--vctf .vmon-marga--search form.md-template,
body.cth-brand--vctf .vmon-marga--search form.h-px-2,
body.cth-brand--vctf.vmon-search-route #buscador,
body.cth-brand--vctf.vmon-search-route #buscador > *{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.cth-brand--vctf.vmon-search-route .vmon381-search-results .vmon-shell,
body.cth-brand--vctf .vctf-hub-search .vmon-shell{
  width:min(calc(100% - 36px),1280px)!important;
  max-width:1280px!important;
}

/* 3. Light Home cards must be readable without hover. */
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid > a{
  background:#fff!important;
  color:#071b33!important;
  border:1px solid rgba(7,27,51,.08)!important;
  box-shadow:0 12px 34px rgba(7,27,51,.055)!important;
}
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid > a:hover{
  background:#eef7ff!important;
  color:#071b33!important;
  border-color:rgba(11,116,209,.24)!important;
  box-shadow:0 18px 42px rgba(7,27,51,.10)!important;
}
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid small{color:#0876ce!important}
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid .vmon-age-card__label{
  color:#071b33!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
}
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid p{color:#5b6b80!important}
body.cth-brand--vctf .vmon-section--paper .vmon-age-cta{
  color:#071b33!important;
  background:#eef7ff!important;
  border-color:rgba(11,116,209,.28)!important;
}
body.cth-brand--vctf .vmon-section--paper .vmon-age-grid > a:hover .vmon-age-cta{
  color:#fff!important;
  background:linear-gradient(135deg,#13a9e3,#145fbe)!important;
}

/* 4. How-it-works numbers are actual step markers, not microcopy. */
body.cth-brand--vctf .vmon-steps > a > i{
  display:block!important;
  margin:0 0 18px!important;
  color:#0b74d1!important;
  font-family:var(--display)!important;
  font-style:normal!important;
  font-size:clamp(1.9rem,2.3vw,2.55rem)!important;
  font-weight:950!important;
  line-height:.9!important;
  letter-spacing:-.05em!important;
}
body.cth-brand--vctf .vmon-steps > a > h3{margin-top:12px!important}

/* 5. Travel tabs: the panel uses the complete canvas. The old shared 72ch
   reading cap is correct for articles, not for a product tab users expect to
   occupy the available block. */
body.cth-brand--vctf.vmon-marga-page .md-template :where(.cth-trip-tabs-shell,.cth-trip-tabs,.cth-trip-tab-panel){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  float:none!important;
  box-sizing:border-box!important;
}
body.cth-brand--vctf.vmon-marga-page .md-template :where(.h-column,.h-column-container).cth-trip-tabs-shell{
  width:100%!important;
  max-width:none!important;
  flex:0 0 100%!important;
  flex-basis:100%!important;
}
body.cth-brand--vctf.vmon-marga-page .md-template .h-tabs-item-content :where(p,ul,ol,blockquote,figure,table){
  width:100%!important;
  max-width:none!important;
}
body.cth-brand--vctf.vmon-marga-page #imagenes > :where(figure,picture,.wp-block-image),
body.cth-brand--vctf.vmon-marga-page #imagenes > :where(figure,picture,.wp-block-image) img,
body.cth-brand--vctf.vmon-marga-page #imagenes > img{
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  margin-left:0!important;
  margin-right:0!important;
}
body.cth-brand--vctf.vmon-marga-page :where(#itinerario,#imagenes,#alojamiento,#precioIncluye) > :where(.w-100,.container,.container-fluid,.h-row,.h-row-container){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* 6. General + trip contact forms: release every inherited Colibri column. */
body.cth-brand--vctf :where(.vmon-marga--contact,#contacto-form),
body.cth-brand--vctf.cth-marga-trip-contact :where(.md-template,#contacto-form),
body.cth-brand--vctf.cth-marga-trip-contact :where(.h-section,.h-section-grid-container,.h-row-container,.h-row,.h-column,.h-column-container,.h-column__inner,.h-column__content,.h-y-container):has(#contacto-form){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  float:none!important;
  box-sizing:border-box!important;
}
body.cth-brand--vctf.cth-marga-trip-contact .content.colibri-page-content .h-row:has(#contacto-form){display:block!important}
body.cth-brand--vctf.cth-marga-trip-contact #contacto-form{
  width:min(100%,1060px)!important;
  max-width:1060px!important;
  margin:28px auto 64px!important;
  padding:clamp(24px,3vw,40px)!important;
  border:1px solid rgba(7,27,51,.10)!important;
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 18px 48px rgba(7,27,51,.08)!important;
}

/* 7. reCAPTCHA: native Google dimensions, no giant flex/grid cell and the
   submit/legal tail follows it naturally. */
body.cth-brand--vctf #contacto-form :where(.h-row,.row):has(.g-recaptcha),
body.cth-brand--vctf #contacto-form :where(.h-row,.row):has([data-sitekey]){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
  margin:16px 0 18px!important;
}
body.cth-brand--vctf #contacto-form :where(.h-column,[class*="h-col-"],[class*="col-"]):has(.g-recaptcha),
body.cth-brand--vctf #contacto-form :where(.h-column,[class*="h-col-"],[class*="col-"]):has([data-sitekey]){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
  flex:0 0 100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.cth-brand--vctf #contacto-form .g-recaptcha,
body.cth-brand--vctf #contacto-form [data-sitekey]{
  display:block!important;
  width:304px!important;
  max-width:100%!important;
  min-height:78px!important;
  height:78px!important;
  margin:0!important;
  transform:none!important;
  transform-origin:left top!important;
}
body.cth-brand--vctf #contacto-form .g-recaptcha > div,
body.cth-brand--vctf #contacto-form .g-recaptcha iframe{
  max-width:100%!important;
}
body.cth-brand--vctf #contacto-form .form-actions,
body.cth-brand--vctf #contacto-form :where(.h-row,.row):has(#btn_enviar){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  margin:18px 0!important;
  padding:0!important;
  text-align:left!important;
}
body.cth-brand--vctf #contacto-form #btn_enviar{float:none!important;margin:0!important}

/* 8. Reservation canvas: center both the Marga template and its real form,
   even when a legacy h-col-* wrapper exists above it. */
body.cth-brand--vctf.cth-marga-reservation .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),
body.cth-brand--vctf.cth-marga-reservation .cth-vctf43-form-shell{
  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--vctf.cth-marga-reservation .content.colibri-page-content .h-row:has(.md-template),
body.cth-brand--vctf.cth-marga-reservation .h-row.cth-vctf43-form-shell{display:block!important}
body.cth-brand--vctf.cth-marga-reservation .md-template{
  display:block!important;
  width:min(calc(100% - 36px),1240px)!important;
  max-width:1240px!important;
  min-width:0!important;
  margin:28px auto 84px!important;
  box-sizing:border-box!important;
}
body.cth-brand--vctf.cth-marga-reservation .md-template form,
body.cth-brand--vctf.cth-marga-reservation .cth-vctf43-reservation-surface{
  display:block!important;
  width:100%!important;
  max-width:1120px!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.cth-brand--vctf.cth-marga-reservation .md-template 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--vctf.cth-marga-reservation .md-template form :where(.h-row,.row) > :where(.h-col,.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;
}
body.cth-brand--vctf.cth-marga-reservation .md-template form .h-row > .h-col-lg-2{flex-basis:150px!important;flex-grow:0!important}
body.cth-brand--vctf.cth-marga-reservation .md-template form .h-row > .h-col-lg-3{flex-basis:220px!important}
body.cth-brand--vctf.cth-marga-reservation .md-template form .h-row > .h-col-lg-4{flex-basis:280px!important}
body.cth-brand--vctf.cth-marga-reservation .md-template form .h-row > .h-col-lg-6{flex-basis:440px!important}
body.cth-brand--vctf.cth-marga-reservation .md-template 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--vctf .vmon-marga--search .cth-vctf43-multi__panel{
    width:min(360px,calc(100vw - 24px))!important;
  }
  body.cth-brand--vctf #contacto-form .g-recaptcha,
  body.cth-brand--vctf #contacto-form [data-sitekey]{
    transform:scale(.90)!important;
    margin-right:-31px!important;
    margin-bottom:-8px!important;
  }
  body.cth-brand--vctf.cth-marga-reservation .md-template{width:min(calc(100% - 20px),1240px)!important}
  body.cth-brand--vctf.cth-marga-reservation .md-template form :where(.h-row,.row){display:block!important}
  body.cth-brand--vctf.cth-marga-reservation .md-template form :where(.h-row,.row) > :where(.h-col,.h-column,[class*="h-col-"],[class*="col-"]){
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 14px!important;
  }
}
