/* V5.18 · Menú maestro unificado. Header sticky elevado fuera del flujo visual al hacer scroll. */
.td-master-header.site-header {
  display:grid;
  grid-template-columns:minmax(185px,1fr) auto minmax(185px,1fr);
  grid-template-areas:"brand anniversary seal" "nav nav nav";
  align-items:center;gap:0 18px;min-height:0;padding:0 20px;margin-top:12px;
  background:linear-gradient(140deg,rgba(13,30,23,.83),rgba(13,30,23,.56));
  backdrop-filter:blur(18px) saturate(125%);-webkit-backdrop-filter:blur(18px) saturate(125%);
  border:1px solid rgba(255,255,255,.24);border-radius:15px;
  box-shadow:0 18px 48px rgba(0,0,0,.18);position:fixed;top:12px;left:50%;transform:translateX(-50%);
  width:min(1224px,calc(100% - 88px));margin-top:0;z-index:12000;
  max-width:1224px;box-sizing:border-box;
  transition:background .28s ease,box-shadow .28s ease,border-color .28s ease,top .28s ease,
             padding .28s ease,margin-top .28s ease,border-radius .28s ease,
             transform .28s ease,width .28s ease;
}
.td-master-header .brand{grid-area:brand;justify-self:start;align-self:center;padding:10px 0;min-width:0;}
.td-master-header .brand img{width:177px;height:66px;object-fit:contain;transition:width .28s ease,height .28s ease;}
.td-master-header .td-header-anniversary{
  grid-area:anniversary;justify-self:center;display:flex;flex-direction:column;align-items:center;
  justify-content:center;line-height:1.02;color:#fff;text-align:center;white-space:nowrap;
  padding:8px 18px;min-width:150px;
}
.td-master-header .td-header-anniversary strong{
  font-size:19px;letter-spacing:.01em;font-weight:750;color:#ffbd24;
}
.td-master-header .td-header-anniversary span{
  margin-top:4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.78);font-weight:600;
}
.td-master-header .supertransporte-header{
  grid-area:seal;display:inline-flex;align-items:center;justify-content:flex-end;
  height:57px;padding-left:17px;border-left:1px solid rgba(255,255,255,.25);
  flex:none;min-width:0;margin-left:auto;max-width:205px;
}
.td-master-header .supertransporte-header img{width:min(168px,100%);max-height:49px;object-fit:contain;transition:width .28s ease,max-height .28s ease;}
.td-master-header .td-master-nav{
  grid-area:nav;width:100%;display:flex;justify-content:space-between;align-items:center;
  gap:clamp(5px,.75vw,13px);margin:0;padding:0 2px;border-top:1px solid rgba(255,255,255,.20);
  font-size:clamp(10.5px,.88vw,12.5px);letter-spacing:-.012em;min-width:0;
}
.td-master-header .td-master-nav>a,
.td-master-header .td-master-nav>details>summary {
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  min-height:53px;padding:12px 0;white-space:nowrap;line-height:1.2;
  color:#f7f7f2;font-weight:600;
}
.td-master-header .td-master-nav>a:hover,
.td-master-header .td-master-nav>details>summary:hover,
.td-master-header .td-master-nav>details[open]>summary,
.td-master-header .td-master-nav>a[aria-current="page"]{color:#ffca4b;}
.td-master-header .td-master-nav>details{position:relative;z-index:70;}
.td-master-header .td-master-nav .dropdown {
  position:absolute;top:calc(100% + 2px);left:-12px;z-index:12002;
  width:max-content;min-width:210px;max-width:min(350px,90vw);max-height:min(65vh,470px);
  overflow:auto;padding:10px;background:#fff;border:1px solid #e3e6df;border-radius:10px;
  box-shadow:0 22px 55px rgba(0,0,0,.27);color:#17201f;
}
.td-master-header .td-master-nav .dropdown a{
  display:block;padding:10px 12px;color:#17201f;white-space:normal;min-height:0;
  font-size:13px;line-height:1.38;border-radius:5px;
}
.td-master-header .td-master-nav .dropdown a:hover,
.td-master-header .td-master-nav .dropdown a:focus-visible{background:#fff4d7;color:#17201f;}
.td-master-header .td-master-nav .td-nav-media .dropdown{left:auto;right:-12px;}
.td-master-header .td-master-nav .contact-header{
  border:1px solid rgba(255,255,255,.53);border-radius:30px;
  min-height:34px;padding:9px 11px!important;gap:5px;background:rgba(255,255,255,.08);
}
.td-master-header .td-master-nav .contact-header:hover{background:rgba(255,180,0,.18);}
.td-master-header .menu-toggle{grid-area:toggle;display:none;justify-self:end;}
.td-master-header .td-master-mobile{display:none;}

/* Estado compacto: el menú acompaña el scroll y gana contraste sobre cualquier fondo. */
.td-master-header.td-header-scrolled{
  position:fixed;top:8px;left:50%;transform:translateX(-50%);
  width:min(1224px,calc(100% - 28px));margin-top:0;
  padding:0 16px;border-radius:13px;
  background:linear-gradient(135deg,rgba(9,31,22,.96),rgba(24,41,35,.93));
  border-color:rgba(255,255,255,.18);
  box-shadow:0 16px 42px rgba(3,15,10,.30);
  backdrop-filter:blur(20px) saturate(135%);-webkit-backdrop-filter:blur(20px) saturate(135%);
  z-index:12000;
}
.td-master-header.td-header-scrolled .brand{padding:5px 0;}
.td-master-header.td-header-scrolled .brand img{width:145px;height:48px;}
.td-master-header.td-header-scrolled .td-header-anniversary{padding:4px 12px;}
.td-master-header.td-header-scrolled .td-header-anniversary strong{font-size:15px;}
.td-master-header.td-header-scrolled .td-header-anniversary span{font-size:8.5px;margin-top:2px;}
.td-master-header.td-header-scrolled .supertransporte-header{height:44px;padding-left:14px;}
.td-master-header.td-header-scrolled .supertransporte-header img{width:140px;max-height:38px;}
.td-master-header.td-header-scrolled .td-master-nav>a,
.td-master-header.td-header-scrolled .td-master-nav>details>summary{min-height:42px;padding:8px 0;}
.td-master-header.td-header-scrolled .td-master-nav{font-size:11.5px;}
body.td-has-sticky-header{padding-top:0;}

@media(max-width:1180px){
 .td-master-header.site-header{grid-template-columns:minmax(160px,1fr) auto minmax(160px,1fr);}
 .td-master-header .td-header-anniversary{min-width:130px;padding-inline:8px;}
 .td-master-header .td-master-nav{font-size:10.5px;gap:5px;}
 .td-master-header .td-master-nav .contact-header{padding:8px 9px!important;}
}
@media(max-width:1080px){
 .td-master-header.site-header{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand toggle";min-height:87px;padding:0 16px;}
 .td-master-header .td-master-nav{display:none!important;}
 .td-master-header .supertransporte-header{display:none!important;}
 .td-master-header .td-header-anniversary{display:none!important;}
 .td-master-header .menu-toggle{display:inline-flex!important;grid-area:toggle;}
 .td-master-header .td-master-mobile{
   display:block;position:absolute;top:calc(100% + 7px);left:0;right:0;bottom:auto;
   z-index:90;padding:11px 17px 17px;max-height:calc(100dvh - 120px);overflow-y:auto;
   background:#fff;color:#17201f;border:1px solid #e3e6df;border-radius:12px;
   box-shadow:0 25px 55px rgba(0,0,0,.32);
 }
 .td-master-header .td-master-mobile[hidden]{display:none!important;}
 .td-master-header .td-master-mobile>a,
 .td-master-header .td-master-mobile>details>summary{
   display:flex;align-items:center;justify-content:space-between;
   min-height:47px;padding:12px 10px;font-size:15px;font-weight:600;
   border-bottom:1px solid #e9ece5;list-style:none;cursor:pointer;
 }
 .td-master-header .td-master-mobile>details>summary::-webkit-details-marker{display:none;}
 .td-master-header .td-master-mobile>details>summary span{font-size:19px;transition:transform .2s;}
 .td-master-header .td-master-mobile>details[open]>summary span{transform:rotate(180deg);}
 .td-master-header .td-master-mobile>a[aria-current="page"]{color:#965d00;border-left:3px solid #ffb400;}
 .td-master-header .td-master-mobile .td-mobile-submenu{max-height:260px;overflow:auto;background:#f6f7f4;}
 .td-master-header .td-master-mobile .td-mobile-submenu>a{
   display:block;min-height:41px;padding:11px 22px;border-bottom:1px solid #e4e8e1;
   white-space:normal;font-size:13px;font-weight:500;color:#233b2c;
 }
 .td-master-header .td-master-mobile a:hover,
 .td-master-header .td-master-mobile summary:hover{background:#fff6df;}
 .td-master-header.td-header-scrolled{top:7px;width:min(100% - 18px,1224px);min-height:66px;padding:0 13px;}
 .td-master-header.td-header-scrolled .brand img{width:137px;height:48px;}
}
@media(max-width:600px){
 .td-master-header.site-header{margin-top:10px;padding:0 13px;min-height:77px;border-radius:11px;}
 .td-master-header .brand img{width:155px;height:57px;}
 .td-master-header .td-master-mobile{max-height:calc(100dvh - 100px);}
 .td-master-header.td-header-scrolled{margin-top:0;min-height:62px;}
 .td-master-header.td-header-scrolled .brand img{width:128px;height:44px;}
}
@media(prefers-reduced-motion:reduce){
 .td-master-header,.td-master-header .brand img,.td-master-header .supertransporte-header img,
 .td-master-header .td-master-mobile>details>summary span{transition:none;}
}



/* V5.18: siempre por encima del hero, clientes y certificaciones en TODAS las páginas.
   No exceder z-index:20000 del anuncio de aniversario. */
body > .td-master-header.site-header { position:fixed !important;z-index:12000 !important; }
body > .td-master-header .td-master-mobile,
body > .td-master-header .td-master-nav .dropdown { z-index:12002; }
@media(max-width:950px){
  body > .td-master-header.site-header:not(.td-header-scrolled){width:calc(100% - 54px)}
}
@media(max-width:600px){
  body > .td-master-header.site-header:not(.td-header-scrolled){width:calc(100% - 36px)}
}

/* Evita que el margen del estilo móvil sume 10px al top fijo. */
@media(max-width:600px){body > .td-master-header.site-header:not(.td-header-scrolled){top:10px;margin-top:0;}}


/* ============================================================
   V5.19 · Corrección visual fuerte para páginas internas.
   Objetivo: Nosotros debe usar EXACTAMENTE la misma composición
   de cabecera que Inicio: dos niveles al estar arriba y una sola
   fila compacta al desplazarse. Estas reglas se cargan al final
   y usan selectores específicos para neutralizar estilos legacy.
   ============================================================ */
@media (min-width:1081px){
  body > header.td-master-header.site-header,
  header.td-master-header.site-header{
    display:grid !important;
    grid-template-columns:minmax(190px,1fr) auto minmax(190px,1fr) !important;
    grid-template-rows:auto auto !important;
    grid-template-areas:
      "brand anniversary seal"
      "nav nav nav" !important;
    align-items:center !important;
    justify-content:stretch !important;
    gap:0 18px !important;
    min-height:0 !important;
    width:min(1224px,calc(100% - 88px)) !important;
    max-width:1224px !important;
    top:12px !important;
    left:50% !important;
    right:auto !important;
    transform:translateX(-50%) !important;
    padding:0 20px !important;
    margin:0 !important;
    border:1px solid rgba(255,255,255,.24) !important;
    border-radius:15px !important;
    background:linear-gradient(140deg,rgba(8,31,22,.94),rgba(24,45,37,.87)) !important;
    box-shadow:0 18px 48px rgba(0,0,0,.24) !important;
    backdrop-filter:blur(18px) saturate(125%) !important;
    -webkit-backdrop-filter:blur(18px) saturate(125%) !important;
    z-index:12000 !important;
  }
  header.td-master-header.site-header > .brand{
    grid-area:brand !important;
    display:inline-flex !important;
    justify-self:start !important;
    align-self:center !important;
    margin:0 !important;
    padding:10px 0 !important;
  }
  header.td-master-header.site-header > .brand img{
    width:177px !important;
    height:66px !important;
    max-width:none !important;
    object-fit:contain !important;
  }
  header.td-master-header.site-header > .td-header-anniversary{
    grid-area:anniversary !important;
    display:flex !important;
    justify-self:center !important;
    align-self:center !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:150px !important;
    padding:8px 18px !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  header.td-master-header.site-header > .supertransporte-header{
    grid-area:seal !important;
    display:inline-flex !important;
    justify-self:end !important;
    align-self:center !important;
    align-items:center !important;
    justify-content:flex-end !important;
    width:auto !important;
    min-width:0 !important;
    max-width:205px !important;
    height:57px !important;
    margin:0 !important;
    padding:0 0 0 17px !important;
    border-left:1px solid rgba(255,255,255,.25) !important;
  }
  header.td-master-header.site-header > .supertransporte-header img{
    display:block !important;
    width:168px !important;
    max-width:168px !important;
    height:auto !important;
    max-height:49px !important;
    object-fit:contain !important;
  }
  header.td-master-header.site-header > nav.td-master-nav.desktop-nav{
    grid-area:nav !important;
    display:flex !important;
    width:100% !important;
    margin:0 !important;
    padding:0 2px !important;
    justify-content:space-between !important;
    align-items:center !important;
    gap:clamp(5px,.75vw,13px) !important;
    border-top:1px solid rgba(255,255,255,.20) !important;
    min-width:0 !important;
    font-size:clamp(10.5px,.88vw,12.5px) !important;
  }

  /* Al bajar: una sola fila más baja, sin perder opciones. */
  body > header.td-master-header.site-header.td-header-scrolled,
  header.td-master-header.site-header.td-header-scrolled{
    grid-template-columns:auto minmax(0,1fr) auto !important;
    grid-template-rows:auto !important;
    grid-template-areas:"brand nav seal" !important;
    width:min(1320px,calc(100% - 28px)) !important;
    max-width:1320px !important;
    top:8px !important;
    padding:0 15px !important;
    gap:14px !important;
    border-radius:13px !important;
    background:linear-gradient(135deg,rgba(7,29,20,.98),rgba(23,42,35,.96)) !important;
    box-shadow:0 16px 42px rgba(3,15,10,.34) !important;
  }
  header.td-master-header.site-header.td-header-scrolled > .td-header-anniversary{
    display:none !important;
  }
  header.td-master-header.site-header.td-header-scrolled > .brand{
    padding:5px 0 !important;
  }
  header.td-master-header.site-header.td-header-scrolled > .brand img{
    width:132px !important;
    height:46px !important;
  }
  header.td-master-header.site-header.td-header-scrolled > nav.td-master-nav.desktop-nav{
    border-top:0 !important;
    font-size:11px !important;
    gap:clamp(5px,.55vw,10px) !important;
  }
  header.td-master-header.site-header.td-header-scrolled .td-master-nav>a,
  header.td-master-header.site-header.td-header-scrolled .td-master-nav>details>summary{
    min-height:52px !important;
    padding:7px 0 !important;
  }
  header.td-master-header.site-header.td-header-scrolled > .supertransporte-header{
    height:42px !important;
    max-width:158px !important;
    padding-left:12px !important;
  }
  header.td-master-header.site-header.td-header-scrolled > .supertransporte-header img{
    width:138px !important;
    max-width:138px !important;
    max-height:38px !important;
  }
}

/* El hero de Nosotros nunca puede volver a forzar la cabecera a relative. */
.about-page .about-hero > header.td-master-header.site-header,
.about-page header.td-master-header.site-header{
  position:fixed !important;
  z-index:12000 !important;
}
