/* CONTUHIJO CORE 2.0 RC4 · Trip Presentation Layer
   Presentation only. Marga owns content, prices, availability, forms and actions. */
@layer cth20.integrations {
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded){
    background:var(--paper,#f6f8fc);
  }

  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .md-template.cth-trip-presentation-v2{
    padding-block:clamp(28px,4vw,56px) clamp(64px,7vw,100px);
  }

  /* Commercial header: one deliberate product composition. */
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title){
    display:grid;
    grid-template-columns:minmax(240px,.82fr) minmax(0,1.55fr) minmax(250px,.72fr);
    gap:clamp(22px,3vw,42px);
    align-items:start;
    width:100%;
    margin:0 0 clamp(28px,4vw,48px);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column{
    width:auto;
    max-width:none;
    min-width:0;
    margin:0;
    padding:0;
    flex:none;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:first-child{
    position:relative;
    overflow:hidden;
    border-radius:24px;
    background:#e8eaee;
    min-height:260px;
    box-shadow:0 18px 46px rgba(15,23,42,.08);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:first-child :where(img,picture,figure){
    width:100%;
    max-width:100%;
    height:100%;
    margin:0;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:first-child img{
    display:block;
    width:100%;
    height:100%;
    min-height:260px;
    object-fit:cover;
  }

  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .viaje-title{
    max-width:18ch;
    margin:0 0 18px;
    font-family:var(--display,var(--cth20-display-font));
    font-size:clamp(2.25rem,4vw,4.15rem);
    line-height:1.01;
    letter-spacing:-.055em;
    text-wrap:balance;
    color:var(--ink,#111827);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .viaje-title a{
    color:inherit;
    text-decoration:none;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(2) :where(p,ul){
    max-width:68ch;
    font-size:clamp(1rem,.97rem + .18vw,1.08rem);
    line-height:1.7;
    color:color-mix(in srgb,var(--ink,#111827) 80%,#fff 20%);
  }

  /* Price/action card. */
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(3){
    position:sticky;
    top:96px;
    padding:22px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:22px;
    background:#fff;
    box-shadow:0 18px 48px rgba(15,23,42,.08);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #price-container{
    margin:5px 0 18px;
    font-family:var(--display,var(--cth20-display-font));
    font-size:clamp(2rem,3.1vw,3rem);
    line-height:1;
    letter-spacing:-.04em;
    color:var(--ink,#111827);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(3) .d-flex.flex-column{
    display:grid;
    gap:10px;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(3) .md-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    width:100%;
    padding:11px 16px;
    border-radius:13px;
    text-align:center;
    font-weight:900;
    text-decoration:none;
  }

  /* Main tab surface. */
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs{
    width:100%;
    overflow:hidden;
    border:1px solid rgba(15,23,42,.11);
    border-radius:24px;
    background:#fff;
    box-shadow:0 18px 52px rgba(15,23,42,.065);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-navigation{
    position:relative;
    display:flex;
    gap:6px;
    width:100%;
    padding:8px;
    background:color-mix(in srgb,var(--paper,#f6f8fc) 86%,#fff 14%);
    border-bottom:1px solid rgba(15,23,42,.1);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-navigation-item{
    flex:1 1 0;
    min-width:max-content;
    min-height:48px;
    padding:12px 16px;
    border-radius:13px;
    font-weight:850;
    line-height:1.15;
    text-align:center;
    text-decoration:none;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content{
    width:100%;
    max-width:none;
    padding:clamp(26px,4vw,54px);
    color:var(--ink,#111827);
  }

  /* Never bring the old 72ch restriction back into a product panel. */
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
    :where(#itinerario,#imagenes,#alojamiento,#precioIncluye)
    :where(.w-100,.h-y-container,.h-column__content,.container,.container-fluid){
    width:100%;
    max-width:none;
    min-width:0;
    margin-inline:0;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content
    :where(p,ul,ol,blockquote,figure,table,div):not(.select2-container){
    max-width:none;
    min-width:0;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content :where(p,li){
    font-size:clamp(1rem,.98rem + .16vw,1.08rem);
    line-height:1.78;
    color:color-mix(in srgb,var(--ink,#111827) 82%,#fff 18%);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content p{
    width:100%;
    margin:.75em 0 1.15em;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content :where(h2,h3,h4){
    max-width:30ch;
    margin:1.3em 0 .48em;
    font-family:var(--display,var(--cth20-display-font));
    line-height:1.02;
    letter-spacing:-.035em;
    text-wrap:balance;
    color:var(--ink,#111827);
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content h2{font-size:clamp(1.8rem,3vw,2.8rem);}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content h3{font-size:clamp(1.45rem,2.35vw,2.15rem);}

  /* Day markers are annotated by presentation JS only; text and business data remain untouched. */
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .cth-trip-day{
    display:block;
    margin:clamp(28px,4vw,46px) 0 14px;
    padding:16px 18px;
    border-left:4px solid var(--brand,#2563eb);
    border-radius:0 14px 14px 0;
    background:color-mix(in srgb,var(--brand,#2563eb) 7%,#fff 93%);
    font-family:var(--display,var(--cth20-display-font));
    font-size:clamp(1.2rem,1.5vw,1.45rem);
    font-weight:900;
    line-height:1.25;
    color:var(--ink,#111827);
  }

  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #itinerario :where(figure,.wp-caption,p:has(>img:only-child)){
    width:100%;
    margin:clamp(24px,3vw,40px) 0;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #itinerario img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    border-radius:18px;
    object-fit:cover;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #imagenes img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    margin:0 0 20px;
    border-radius:18px;
    object-fit:cover;
  }

  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #alojamiento :where(h2,h3,h4){max-width:none;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #alojamiento img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    border-radius:18px;
  }

  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #precioIncluye{
    width:100%;
    overflow-x:auto;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #precioIncluye :where(table,.table){
    width:100%;
    min-width:680px;
    border-collapse:separate;
    border-spacing:0;
    border:1px solid rgba(15,23,42,.12);
    border-radius:16px;
    overflow:hidden;
    background:#fff;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #precioIncluye :where(th,td){
    padding:13px 14px;
    border-bottom:1px solid rgba(15,23,42,.09);
    vertical-align:top;
    text-align:left;
  }
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 #precioIncluye tbody tr:last-child :where(th,td){border-bottom:0;}

  @media (min-width:760px){
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content :where(p,li){
      text-align:justify;
      text-justify:inter-word;
    }
  }
  @media (max-width:1050px){
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
      >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title){
      grid-template-columns:minmax(220px,.78fr) minmax(0,1.35fr);
    }
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
      >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(3){
      grid-column:1/-1;
      position:relative;
      top:auto;
      display:grid;
      grid-template-columns:minmax(0,1fr) minmax(220px,.65fr);
      gap:18px;
      align-items:center;
    }
  }
  @media (max-width:760px){
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .md-template.cth-trip-presentation-v2{padding-top:18px;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
      >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title){display:block;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
      >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column{margin-bottom:20px;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2
      >.h-section-grid-container>.h-row-container>.h-row:has(.viaje-title)>.h-column:nth-child(3){display:block;padding:18px;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .viaje-title{max-width:none;font-size:clamp(2.25rem,11.5vw,3.7rem);}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-navigation{overflow-x:auto;flex-wrap:nowrap;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-navigation-item{flex:0 0 auto;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content{padding:22px 18px 30px;}
    body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-presentation-v2 .h-tabs-item-content :where(p,li){text-align:left;}
  }
}


/* RC5 TOP · server-normalized full-width product flow. */
@layer cth20.integrations {
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-flow{display:block;width:100%;max-width:none;min-width:0;margin:0;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-flow>.cth-trip-main,
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-flow>.cth-trip-aside{display:block;width:100%;max-width:none;min-width:0;margin:0;padding:0;flex:none;float:none;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-main :where(.h-column__inner,.h-column__content,.h-y-container),
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside :where(.h-column__inner,.h-column__content,.h-y-container){width:100%;max-width:none;min-width:0;margin-inline:0;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside{margin-top:clamp(28px,4vw,48px);padding:clamp(24px,3vw,40px);border:1px solid rgba(15,23,42,.11);border-radius:24px;background:#fff;box-shadow:0 18px 52px rgba(15,23,42,.055);}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside>div,
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside table,
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-table{width:100%;max-width:100%;float:none;margin-left:0;margin-right:0;box-sizing:border-box;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-media{display:block;width:100%;max-width:100%;height:auto;float:none;object-fit:cover;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server #alojamiento .cth-trip-table{margin:clamp(24px,3vw,38px) 0 16px;}
  body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside h2{margin:0 0 18px;font-size:clamp(1.65rem,2.6vw,2.4rem);text-align:left;}
  @media(max-width:760px){body.cth-core20-platform:is(.cth-route--marga,.cth-route--marga-embedded) .cth-trip-server .cth-trip-aside{padding:20px 16px;border-radius:18px;}}
}
