/* CONTUHIJO CORE · VCTF 5.7 GOLD MASTER
   Final VCTF-only presentation contract for WordPress pages and articles.
   No Marga business logic is changed here. */

/* --------------------------------------------------------------------------
   1. Editorial geometry. The 5.2 layout has two columns only when a real TOC
      exists. Without a TOC the content must span the available editorial block.
   -------------------------------------------------------------------------- */
body.cth-brand--vctf .vctf-editorial-master__layout--no-toc{
  grid-template-columns:minmax(0,1100px)!important;
  justify-content:center!important
}
body.cth-brand--vctf .vctf-editorial-master__layout--no-toc .vctf-editorial-master__content{
  width:100%!important;max-width:1100px!important;min-width:0!important;grid-column:1/-1!important;justify-self:stretch!important
}
body.cth-brand--vctf .vctf-editorial-master__layout--with-toc{
  grid-template-columns:minmax(210px,250px) minmax(0,900px)!important
}
body.cth-brand--vctf .vctf-editorial-master__layout--with-toc .vctf-editorial-master__content{
  width:100%!important;max-width:900px!important;min-width:0!important
}

/* Generic safety for a one-child layout created by a cached older template. */
body.cth-brand--vctf .vctf-editorial-master__layout>.vctf-editorial-master__content:only-child{
  grid-column:1/-1!important;width:100%!important;max-width:1100px!important;justify-self:center!important
}

/* --------------------------------------------------------------------------
   2. Legacy builder geometry is content, never the current layout contract.
      Reset only inside the editorial/legal canvas; Marga/form/search routes are
      intentionally outside these selectors.
   -------------------------------------------------------------------------- */
body.cth-brand--vctf .vctf-editorial-master__content :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,.row,.container,.container-fluid,
  [class*="h-col-"],[class*="col-xs-"],[class*="col-sm-"],[class*="col-md-"],[class*="col-lg-"],[class*="col-xl-"]
),
body.cth-brand--vctf .vmon-editorial__content--legal :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,.row,.container,.container-fluid,
  [class*="h-col-"],[class*="col-xs-"],[class*="col-sm-"],[class*="col-md-"],[class*="col-lg-"],[class*="col-xl-"]
){
  width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;
  margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;
  flex:0 0 100%!important;flex-basis:100%!important
}
body.cth-brand--vctf .vctf-editorial-master__content :where(.row,.h-row,.h-row-container),
body.cth-brand--vctf .vmon-editorial__content--legal :where(.row,.h-row,.h-row-container){display:block!important}

/* --------------------------------------------------------------------------
   3. Content craft. Everything fills the editorial block, never the viewport.
   -------------------------------------------------------------------------- */
body.cth-brand--vctf .vctf-editorial-master__content,
body.cth-brand--vctf .vmon-editorial__content--legal{
  overflow-wrap:anywhere!important;word-break:normal!important
}
body.cth-brand--vctf .vctf-editorial-master__content>* ,
body.cth-brand--vctf .vmon-editorial__content--legal>*{
  max-width:100%!important;box-sizing:border-box!important
}
body.cth-brand--vctf .vctf-editorial-master__content :where(figure,.wp-caption,.wp-block-image,.gallery),
body.cth-brand--vctf .vmon-editorial__content--legal :where(figure,.wp-caption,.wp-block-image,.gallery){
  width:100%!important;max-width:100%!important;margin:clamp(22px,3vw,36px) 0!important
}
body.cth-brand--vctf .vctf-editorial-master__content :where(img),
body.cth-brand--vctf .vmon-editorial__content--legal :where(img){
  display:block!important;width:100%!important;max-width:100%!important;height:auto!important;margin-left:auto!important;margin-right:auto!important;
  object-fit:contain!important;border-radius:18px!important
}
body.cth-brand--vctf .vctf-editorial-master__content :where(video,iframe),
body.cth-brand--vctf .vmon-editorial__content--legal :where(video,iframe){
  display:block!important;width:100%!important;max-width:100%!important;margin:clamp(22px,3vw,36px) 0!important
}
body.cth-brand--vctf .vctf-editorial-master__content h4{
  margin:1.5em 0 .45em!important;color:#0b355f!important;font-size:clamp(1.05rem,1.45vw,1.25rem)!important;
  line-height:1.28!important;letter-spacing:-.012em!important
}
body.cth-brand--vctf .vctf-editorial-master__content :where(p,ul,ol,blockquote,table){width:100%!important;max-width:100%!important}
body.cth-brand--vctf .vctf-editorial-master__content p{margin:.75em 0 1.05em!important}
body.cth-brand--vctf .vctf-editorial-master__content table,
body.cth-brand--vctf .vmon-editorial__content--legal table{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important}

@media (min-width:760px){
  body.cth-brand--vctf .vctf-editorial-master__content :where(p,li),
  body.cth-brand--vctf .vmon-editorial__content--legal :where(p,li){text-align:justify!important;text-justify:inter-word!important}
}
@media (max-width:759px){
  body.cth-brand--vctf .vctf-editorial-master__content :where(p,li),
  body.cth-brand--vctf .vmon-editorial__content--legal :where(p,li){text-align:left!important}
}

/* --------------------------------------------------------------------------
   4. Old Colibri contact shortcode: if its original module no longer exists,
      the server fallback renders the real Marga contact form or a safe CTA.
   -------------------------------------------------------------------------- */
body.cth-brand--vctf .cth-vctf57-contact-fallback{padding:clamp(36px,6vw,72px) 0;background:#f5f8fc}
body.cth-brand--vctf .cth-vctf57-contact-fallback__inner{width:min(calc(100% - 32px),1060px);margin:0 auto}
body.cth-brand--vctf .cth-vctf57-contact-fallback__message{padding:clamp(24px,4vw,40px);border:1px solid rgba(7,27,51,.1);border-radius:22px;background:#fff;box-shadow:0 18px 48px rgba(7,27,51,.06)}
body.cth-brand--vctf .cth-vctf57-contact-fallback__message p{margin:0 0 14px;color:#46586e;font-size:1rem;line-height:1.65}
body.cth-brand--vctf .cth-vctf57-contact-fallback__message a{display:inline-flex;align-items:center;min-height:48px;padding:0 18px;border-radius:12px;background:#0b74d1;color:#fff!important;text-decoration:none!important;font-weight:900}

/* --------------------------------------------------------------------------
   5. GEO closing: keep it visually attached to the page and full-width inside
      its own shell. This also covers legal pages enabled by the GOLD layer.
   -------------------------------------------------------------------------- */
body.cth-brand--vctf .cth-editorial-closing{clear:both;width:100%;max-width:none;min-width:0}
body.cth-brand--vctf .cth-editorial-closing :where(.cth-shell,.cth-closing-geo__grid){min-width:0}

@media (max-width:980px){
  body.cth-brand--vctf .vctf-editorial-master__layout--with-toc{grid-template-columns:1fr!important}
  body.cth-brand--vctf .vctf-editorial-master__layout--with-toc .vctf-editorial-master__content{max-width:100%!important}
}
