/* ==============================================================
   IMTS WEB PRO 8.2 — Estilo completo y unificado de las cuatro páginas
   Conserva el HTML y el contenido original. No necesita frameworks.
   =============================================================== */
:root{
  --imts-azul:#53d3ff;
  --imts-azul-claro:#bcefff;
  --imts-dorado:#edbd50;
  --imts-marino:#03132d;
  --imts-texto:#f6faff;
  --imts-borde:rgba(91,189,248,.28);
}
*,*::before,*::after{box-sizing:border-box}
html,body{min-height:100%;overflow-x:hidden}
html{scroll-behavior:smooth;scrollbar-gutter:stable}
body{margin:0;min-height:100vh;font-family:Arial,Helvetica,sans-serif;background:#030d20;color:var(--imts-texto);-webkit-font-smoothing:antialiased}
img{max-width:100%}

/* Fondo original de 1672×941 siempre visible, aunque falle JS. */
.page{
  isolation:isolate;
  position:relative;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:none!important;
}
.page::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-color:#03142e;
  background-image:linear-gradient(90deg,rgba(1,8,24,.20),rgba(0,12,35,.13)),url("assets/footer-bg.png");
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
  /* El circuito se enciende suavemente, NUNCA pasa por opacity:0. */
  animation:imtsEncendido 2.2s ease-out both;
}
@keyframes imtsEncendido{
  0%{filter:brightness(.82) saturate(.93)}
  35%{filter:brightness(1.045) saturate(1.11)}
  100%{filter:brightness(1) saturate(1)}
}
#techCanvas{
  display:block;
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  z-index:0;
  pointer-events:none;
}
.page>.header,.page>.hero,.page>.hero-about,.page>.about-main,.page>.about-bottom,
.page>.hero-services,.page>.services-grid,.page>.contact-section,.page>.contact-page,.page>.footer{
  position:relative;
  z-index:2;
}
/* El antiguo CSS ocultaba secciones mientras reproducía fadeIn: eliminamos ese vacío. */
.header,.brand img,.menu a,.hero-text h1,.hero-text p,.hero-logo,
.hero-about h1,.hero-about p,.hero-services h1,.hero-services p,
.service-card,.about-card,.mini-card,.value-box,.contact-heading,.contact-card,.footer{
  opacity:1!important;
  animation:none!important;
}

/* Encabezado equilibrado */
.header{
  z-index:30!important;
  min-height:84px;
  background:rgba(2,14,34,.95);
  border-bottom:1px solid rgba(236,189,80,.20);
  box-shadow:0 8px 24px rgba(0,0,0,.19);
  backdrop-filter:blur(15px);
  -webkit-backdrop-filter:blur(15px);
}
.navbar{
  width:min(92%,1450px);
  min-height:84px;
  padding:9px 0;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
}
.brand{min-height:66px;min-width:0;display:flex;align-items:center;justify-content:flex-start;text-decoration:none}
.brand img{height:72px;max-width:min(100%,460px);object-fit:contain;
  filter:drop-shadow(0 0 8px rgba(84,203,255,.12))}
.menu{display:grid;align-items:center;grid-template-columns:repeat(4,minmax(98px,auto));justify-content:end;gap:8px}
.menu a{
  width:auto;min-width:98px;height:42px;padding:0 13px;
  display:flex;align-items:center;justify-content:center;text-align:center;
  color:#fff;text-decoration:none;white-space:nowrap;font-weight:700;
  border-radius:10px;
  border:1px solid transparent;
  font-size:14px;
  opacity:1!important;
  transition:transform .25s,background-color .25s,color .25s,border-color .25s,box-shadow .25s;
}
.menu a:hover{
  transform:translateY(-2px);
  color:white;
  background:rgba(55,169,246,.16);
  border-color:rgba(90,197,255,.44);
  box-shadow:0 0 18px rgba(57,183,255,.14);
}
.menu a.active{
  color:#071832;
  background:linear-gradient(130deg,#f6d17c,#dba23a);
  box-shadow:0 6px 20px rgba(230,171,69,.22);
}

/* Inicio: título compacto y legible, sin botones. */
.hero{flex:1;min-height:0;padding:22px 0 34px;display:flex;align-items:center}
.hero-content{
  width:min(92%,1410px);
  margin:auto;
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);
  gap:clamp(18px,3.3vw,58px);
  align-items:center;
}
.hero-text{justify-content:flex-start;min-width:0}
.hero-text-inner{
  position:relative;
  isolation:isolate;
  max-width:680px;
  padding:20px 6px 24px 8px;
  transform:none;
}
/* Lado izquierdo más oscuro SIN recuadro visible. */
.hero-text-inner::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-28px -75px -20px -45px;
  pointer-events:none;
  background:radial-gradient(ellipse at 36% 50%,
    rgba(1,10,29,.91) 0%,rgba(1,13,36,.80) 36%,
    rgba(1,13,37,.48) 60%,transparent 83%);
  filter:blur(11px);
}
.hero-text h1{
  margin:0;
  font-size:clamp(39px,4.25vw,72px);
  line-height:1.105;
  letter-spacing:-.026em;
  font-weight:900;
  color:#fff;
  text-wrap:initial;
  text-shadow:0 3px 16px rgba(0,3,15,.9),0 1px 2px #010b20;
}
.hero-text h1 span{display:block;white-space:nowrap}
.hero-text p{
  max-width:590px;
  margin-top:15px;
  color:#e4efff;
  font-size:clamp(15px,1.04vw,17px);
  font-weight:500;
  letter-spacing:0;
  line-height:1.72;
  text-shadow:0 2px 11px #000919,0 0 3px #001126;
}
.hero-logo{transform:none;min-width:0;align-items:center;justify-content:center}
.hero-logo img{
  display:block;
  width:100%;
  max-width:650px;
  height:auto;
  filter:drop-shadow(0 16px 30px rgba(0,0,0,.30)) drop-shadow(0 0 11px rgba(236,187,72,.15));
  animation:imtsFlotar 7.2s ease-in-out infinite!important;
}
@keyframes imtsFlotar{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.imts-actions{display:none!important}

/* Cabeceras internas: sombra que preserva legibilidad y circuitos alrededor */
.hero-about,.hero-services{
  width:min(91%,1350px);
  margin:36px auto 0;
  padding:14px 0 4px;
  text-align:center;
}
.hero-about::before,.hero-services::before{
  content:"";
  position:absolute;
  inset:-15px 11% -18px;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(ellipse,rgba(2,14,37,.84) 0%,rgba(2,14,37,.42) 54%,transparent 85%);
  filter:blur(13px);
}
.hero-about h1,.hero-services h1{
  margin:0;
  font-size:clamp(32px,3vw,49px);
  letter-spacing:-.02em;
  line-height:1.13;
  text-shadow:0 3px 18px rgba(0,0,0,.76);
}
.hero-about p,.hero-services p{
  margin:8px auto 0;
  font-size:clamp(14px,1vw,16px);
  line-height:1.52;
  max-width:870px;
  color:#e7f1ff;
  text-shadow:0 3px 10px rgba(0,0,0,.8);
}

/* Servicios: mismas seis categorías, grid estable y tarjetas parejas. */
.services-grid{
  width:min(91%,1380px);
  margin:21px auto 30px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-content:center;
  gap:14px;
  padding:0;
}
.service-card,.about-card,.mini-card,.contact-card{
  background:rgba(2,17,40,.90);
  border:1px solid var(--imts-borde);
  backdrop-filter:blur(11px);
  -webkit-backdrop-filter:blur(11px);
  box-shadow:0 14px 30px rgba(0,0,0,.20);
}
.service-card{padding:18px 19px;border-radius:17px;min-width:0}
.service-icon{display:block;font-size:29px;margin-bottom:9px;color:#6bd8ff;animation:imtsIcono 5s ease-in-out infinite!important}
@keyframes imtsIcono{0%,100%{filter:drop-shadow(0 0 2px rgba(80,204,255,.2))}50%{filter:drop-shadow(0 0 8px rgba(80,204,255,.55))}}
.service-card h3{font-size:clamp(17px,1.27vw,20px);line-height:1.19;margin-bottom:7px;letter-spacing:-.015em}
.service-card p{font-size:clamp(13px,.9vw,15px);line-height:1.52;color:#e2eeff}
.service-card:hover,.about-card:hover,.mini-card:hover{transform:translateY(-3px);border-color:rgba(234,193,90,.60);box-shadow:0 19px 33px rgba(0,0,0,.28)}

/* Nosotros: las cinco tarjetas forman un bloque continuo y compacto. */
.page:has(.about-main) .hero-about{margin:32px auto 0;padding:10px 0 3px}
.about-main{
  width:min(91%,1380px);
  margin:16px auto 12px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px;
  align-items:stretch;
}
.about-card{min-width:0;padding:17px 20px;border-radius:17px}
.about-card h2{font-size:clamp(23px,1.75vw,29px);line-height:1.2;margin-bottom:8px}
.about-card p{font-size:clamp(13px,.92vw,15px);line-height:1.53;color:#e5efff}
.about-card p+p{margin-top:8px}
.values-grid{margin-top:5px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.value-box{min-width:0;padding:11px 13px;border-radius:12px;background:rgba(13,37,76,.70)}
.value-box h3{font-size:16px;line-height:1.15;margin-bottom:5px;color:#72d6ff}
.value-box p{font-size:12.5px;line-height:1.4}
.about-bottom{
  width:min(91%,1380px);
  margin:0 auto 28px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
}
.mini-card{min-width:0;padding:15px 18px;border-radius:16px}
.mini-card h3{font-size:19px;line-height:1.18;margin-bottom:7px}
.mini-card p{font-size:clamp(13px,.89vw,14px);line-height:1.48}

/* ==============================================================
   CONTACTO — mismo encabezado que Nosotros y Servicios.
   Diseño SIN recuadro para el título; horarios por filas.
   Se usa con el contacto.html completo incluido.
   ============================================================== */
.contact-page{
  flex:1;
  position:relative;
  z-index:2;
  width:min(92%,1400px);
  margin:0 auto;
  padding:clamp(18px,3vh,30px) 0 26px;
}
.contact-hero{
  isolation:isolate;
  position:relative;
  width:100%;
  max-width:1040px;
  margin:0 auto 19px;
  text-align:center;
  padding:8px 10px 0;
}
/* Halo difuminado SIN tarjeta azul visible. */
.contact-hero::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-15px 8% -13px;
  pointer-events:none;
  background:radial-gradient(ellipse,rgba(1,10,28,.85),rgba(2,14,35,.52) 54%,transparent 82%);
  filter:blur(12px);
}
.contact-hero h1{
  margin:0 0 8px;
  font-size:clamp(34px,3vw,49px);
  line-height:1.12;
  letter-spacing:-.02em;
  font-weight:900;
  color:#fff;
  text-shadow:0 3px 18px rgba(0,0,0,.80);
}
.contact-hero h1::after{content:none!important;display:none!important}
.contact-hero p{
  margin:0 auto;
  max-width:900px;
  color:#e7f1ff;
  font-size:clamp(14px,1vw,16px);
  line-height:1.54;
  text-shadow:0 3px 12px rgba(0,0,0,.85);
  text-wrap:pretty;
}
.contact-card-full{
  width:min(100%,1160px);
  max-width:none;
  margin:0 auto;
  padding:clamp(17px,1.8vw,26px);
  border:1px solid var(--imts-borde);
  border-radius:20px;
  background:rgba(2,17,40,.93);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 18px 38px rgba(0,0,0,.24);
  min-width:0;
}
.contact-card-full h2{
  margin:0 0 7px;
  font-size:clamp(20px,1.7vw,25px);
  line-height:1.2;
}
.contact-intro{
  margin:0 0 14px;
  max-width:1000px;
  color:#e0ecfa;
  font-size:clamp(13px,.95vw,15px);
  line-height:1.52;
}
.contact-grid-two{
  display:grid;
  grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr);
  gap:clamp(12px,1.7vw,20px);
  align-items:stretch;
}
.contact-left-column,.contact-right-column{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.contact-left-column .contact-info-box:last-child{flex:1}
.contact-info-box{
  min-width:0;
  padding:11px 14px;
  border-radius:12px;
  border:1px solid rgba(106,177,237,.16);
  background:rgba(21,50,93,.84);
  transition:border-color .2s ease,background .2s ease;
}
.contact-info-box:hover{border-color:rgba(103,200,255,.35);background:rgba(22,56,104,.87)}
.contact-info-box .info-label{
  display:block;
  margin:0 0 5px;
  color:#78d6ff;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
}
.info-text,.info-link{
  display:block;
  color:#fff;
  font-size:14px;
  line-height:1.5;
  font-weight:500;
  text-decoration:none;
  overflow-wrap:anywhere;
}
.info-link:hover{text-decoration:underline;color:#aee8ff}
.schedule-list{display:flex;flex-direction:column;margin-top:3px}
.schedule-row{
  display:grid;
  grid-template-columns:minmax(95px,.78fr) minmax(0,1.22fr);
  align-items:center;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid rgba(187,217,245,.12);
}
.schedule-row:last-child{border-bottom:0}
.schedule-row .day{color:#f5f9ff;font-size:14px;font-weight:700;line-height:1.35}
.schedule-row .time{color:#f5f9ff;font-size:14px;line-height:1.35;font-variant-numeric:tabular-nums}
.schedule-row .time.closed{color:#fff;font-weight:700}
.social-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:5px}
.social-links a{
  display:inline-flex;
  width:36px;height:36px;
  align-items:center;justify-content:center;
  border-radius:10px;
  color:white;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  text-decoration:none;
  transition:transform .2s,background .2s,border-color .2s;
}
.social-links a:hover{transform:translateY(-2px);background:rgba(57,183,255,.21);border-color:rgba(103,207,255,.45)}
.social-links svg{display:block;width:19px;height:19px;fill:white}

/* Pie: no tapa contenido en pantallas pequeñas */
.footer{
  flex-shrink:0;
  margin-top:auto;
  text-align:center;
  padding:10px 14px;
  color:#e5f1ff;
  font-size:12px;
  background:rgba(2,13,32,.93);
  border-top:1px solid rgba(237,189,80,.16);
}

.footer p{margin:0}

/* Entrada corta: NUNCA inicia con opacity:0. */
.hero-text-inner,.hero-logo,.hero-about,.hero-services,.contact-hero,.contact-card-full,
.service-card,.about-card,.mini-card{
  animation:imtsAparecer .7s ease-out both!important;
}
@keyframes imtsAparecer{
  from{transform:translateY(9px)}
  to{transform:translateY(0)}
}
.service-card:nth-child(2),.about-card:nth-child(2),.mini-card:nth-child(2){animation-delay:.08s!important}
.service-card:nth-child(3),.mini-card:nth-child(3){animation-delay:.14s!important}
.service-card:nth-child(4){animation-delay:.08s!important}
.service-card:nth-child(5){animation-delay:.14s!important}
.service-card:nth-child(6){animation-delay:.2s!important}

/* En pantallas de poca altura se prioriza todo el contenido, nunca overflow:hidden */
@media(min-width:1050px) and (max-height:800px){
  .header,.navbar{min-height:74px}.brand img{height:65px}
  .hero{padding:10px 0 16px}
  .hero-text h1{font-size:clamp(39px,4vw,66px)}
  .hero-logo img{max-width:min(610px,70vh)}
  .hero-about,.hero-services,.page:has(.about-main) .hero-about{margin-top:12px}
  .services-grid{gap:10px;margin:12px auto 15px}
  .service-card{padding:12px 15px}.service-icon{font-size:25px;margin-bottom:6px}
  .about-main{margin:11px auto 9px}.about-card{padding:12px 16px}
  .about-bottom{margin-bottom:13px}.mini-card{padding:10px 15px}
  .contact-page{padding:10px 0 16px}.contact-hero{margin-bottom:12px}.contact-card-full{padding:13px 16px}
  .contact-info-box{padding:8px 11px}.schedule-row{padding:5px 0}
  .info-box{padding:6px 10px;margin-bottom:5px}
  .footer{padding:7px 12px}
}
@media(max-width:1100px){
  .navbar{width:min(95%,1080px)}
  .brand img{height:67px}
  .hero-content{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:17px}
  .hero-text h1{font-size:clamp(38px,4.8vw,58px)}
  .hero-logo img{max-width:550px}
  .services-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .about-main{grid-template-columns:1fr}
  .contact-grid-two{grid-template-columns:1fr 1.15fr;gap:12px}
}
@media(max-width:800px){
  .navbar{grid-template-columns:1fr;justify-content:center;gap:7px;padding:10px 0}
  .brand{min-height:0;justify-content:center}.brand img{height:60px;max-width:92%}
  .menu{grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,550px);margin:auto;gap:4px}
  .menu a{height:39px;min-width:0;width:100%;font-size:13px;padding:0 4px}
  .hero{padding:35px 0 45px}
  .hero-content{grid-template-columns:1fr;gap:26px;width:min(91%,660px)}
  .hero-text-inner{padding:16px 3px}
  .hero-text h1{font-size:clamp(36px,7.3vw,56px)}
  .hero-logo img{max-width:400px}
  .services-grid{gap:12px;margin-bottom:24px}
  .about-main{grid-template-columns:1fr}.about-bottom{grid-template-columns:1fr;gap:12px}
  .contact-grid-two{grid-template-columns:1fr;gap:12px}
  .contact-page{width:min(94%,700px);padding:20px 0 24px}
  .contact-hero{margin-bottom:18px}
  .contact-left-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:9px}
  .contact-left-column .contact-info-box:last-child{flex:auto}
  .contact-card-full{width:100%}
  .hero-about,.hero-services,.page:has(.about-main) .hero-about{margin-top:26px}
}
@media(max-width:550px){
  .brand img{height:auto;width:min(90%,330px)}
  .menu{grid-template-columns:repeat(2,minmax(0,1fr));max-width:350px}
  .hero-text h1{font-size:clamp(29px,8vw,44px);letter-spacing:-.03em;line-height:1.13}
  .hero-text h1 span{white-space:normal}
  .hero-text p{font-size:15px;line-height:1.65}
  .hero-logo img{max-width:315px}
  .services-grid{grid-template-columns:1fr}
  .service-card{padding:17px}.service-card h3{font-size:19px}.service-card p{font-size:14px}
  .values-grid{grid-template-columns:1fr 1fr}
  .contact-page{width:94%;padding:16px 0 22px}
  .contact-hero{padding:4px 0 0}
  .contact-hero h1{font-size:clamp(36px,9vw,45px)}
  .contact-hero p{font-size:14px;line-height:1.6}
  .contact-card-full{padding:16px 14px;border-radius:17px}
  .contact-left-column{display:flex;flex-direction:column}
  .contact-info-box{padding:10px 12px}
  .schedule-row{grid-template-columns:minmax(76px,.7fr) minmax(0,1.3fr);gap:8px}
  .schedule-row .day,.schedule-row .time{font-size:12px}
  .footer{font-size:11px}
}
@media(max-width:360px){.values-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){
  .page::before{animation:none!important}
  #techCanvas{display:none!important}
  .hero-logo img,.service-icon,.hero-text-inner,.hero-logo,.hero-about,.hero-services,
  .contact-hero,.contact-card-full,.service-card,.about-card,.mini-card{animation:none!important}
  *,*::before,*::after{scroll-behavior:auto!important}
}

/* ============================================================
   IMTS 8.3 — ENCABEZADO COMPARTIDO, SIN SALTOS AL NAVEGAR
   Las cuatro páginas usan las mismas medidas y posiciones.
   ============================================================ */

/* Reservar siempre el mismo espacio del scrollbar en cada ruta. */
html {
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
}
body {
  overflow-y: visible !important;
}

/* Ninguna transición de entrada puede desplazar el encabezado. */
.header,
.page > .header {
  height: 90px !important;
  min-height: 90px !important;
  max-height: 90px !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
}
.header > .navbar {
  box-sizing: border-box;
  width: min(92%, 1450px) !important;
  max-width: 1450px !important;
  height: 90px !important;
  min-height: 90px !important;
  margin: 0 auto !important;
  padding: 6px 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 416px !important;
  gap: 20px !important;
  align-items: center !important;
  justify-content: normal !important;
}
.header .brand {
  display: flex !important;
  width: 371px !important;
  min-width: 371px !important;
  max-width: 371px !important;
  height: 70px !important;
  min-height: 70px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: none !important;
  transform: none !important;
  animation: none !important;
}
.header .brand img {
  box-sizing: border-box;
  display: block !important;
  width: 371px !important;
  min-width: 371px !important;
  max-width: 371px !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  object-fit: contain !important;
  object-position: left center !important;
  flex: none !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
.header .menu {
  box-sizing: border-box;
  width: 416px !important;
  min-width: 416px !important;
  max-width: 416px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 98px) !important;
  gap: 8px !important;
  justify-content: end !important;
  align-items: center !important;
}
.header .menu a,
.header .menu a.active {
  box-sizing: border-box;
  display: flex !important;
  width: 98px !important;
  min-width: 98px !important;
  max-width: 98px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border-radius: 10px !important;
  align-items: center !important;
  justify-content: center !important;
  font: 700 14px/1.2 Arial, Helvetica, sans-serif !important;
  white-space: nowrap !important;
  text-align: center !important;
  transform: none !important;
  animation: none !important;
  transition: background-color .2s, color .2s, border-color .2s,
              box-shadow .2s !important;
}

/* Tabletas: mismo encabezado en cada página, pero compacto. */
@media (max-width: 800px) {
  .header,
  .page > .header {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  .header > .navbar {
    width: min(94%, 700px) !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    justify-items: center !important;
    padding: 10px 0 !important;
  }
  .header .brand {
    width: 305px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    justify-content: center !important;
  }
  .header .brand img {
    width: 305px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    object-position: center !important;
  }
  .header .menu {
    width: min(100%, 480px) !important;
    min-width: 0 !important;
    max-width: 480px !important;
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
    gap: 6px !important;
  }
  .header .menu a,
  .header .menu a.active {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 4px !important;
    font-size: 13px !important;
  }
}
@media (max-width: 430px) {
  .header .menu {
    width: min(100%, 330px) !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 5px !important;
  }
  .header .brand,
  .header .brand img {
    width: min(305px, 94%) !important;
  }
}

/* =============================================================
   IMTS WEB 8.5 — DORADO SOLO EN EL CONTORNO PRINCIPAL DE CONTACTO
   Los recuadros interiores conservan su borde AZUL original.
   No modifica las demás páginas.
   ============================================================= */
.contact-page .contact-card-full {
  position: relative;
  transition: border-color .25s ease, box-shadow .3s ease;
}

/* Un solo contorno luminoso: la tarjeta grande de Información de contacto. */
.contact-page .contact-card-full::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1.5px solid rgba(244,191,83,.85);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(237,189,80,.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-page .contact-card-full:hover {
    border-color: rgba(244,191,83,.83);
    box-shadow: 0 18px 38px rgba(0,0,0,.28),
                0 0 14px rgba(237,189,80,.10);
  }
  .contact-page .contact-card-full:hover::after {
    opacity: 1;
    animation: imtsContactGoldPulse 2.15s ease-in-out infinite;
  }
}

/* Al navegar con teclado, el contorno principal también es visible. */
.contact-page .contact-card-full:focus-within {
  border-color: rgba(244,191,83,.83);
}
.contact-page .contact-card-full:focus-within::after {
  opacity: 1;
}

/* Recuadros interiores: tonos azules, NUNCA dorados. */
.contact-page .contact-info-box {
  border-color: rgba(106,177,237,.16);
  background: rgba(21,50,93,.84);
  transition: border-color .2s ease, background-color .2s ease;
}
.contact-page .contact-info-box::after { content: none; }
@media (hover: hover) and (pointer: fine) {
  .contact-page .contact-info-box:hover {
    border-color: rgba(103,200,255,.35);
    background: rgba(22,56,104,.87);
    box-shadow: none;
  }
}
.contact-page .contact-info-box:focus-within {
  border-color: rgba(103,200,255,.45);
  box-shadow: none;
}

@keyframes imtsContactGoldPulse {
  0%,100% {
    border-color: rgba(244,191,83,.68);
    box-shadow: 0 0 8px rgba(237,189,80,.12);
  }
  50% {
    border-color: #ffe3a1;
    box-shadow: 0 0 20px rgba(237,189,80,.32),
                0 0 0 1px rgba(244,191,83,.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page .contact-card-full,
  .contact-page .contact-card-full::after,
  .contact-page .contact-info-box {
    animation: none !important;
    transition: none !important;
  }
}

/* ================================================================
   IMTS 8.6 — PIE DE PÁGINA IDÉNTICO EN LAS CUATRO PÁGINAS
   Contacto no incluía el reset de fuente/margen del HTML original.
   No cambia el pulso dorado ni los recuadros de Contacto.
   ================================================================ */
html {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}
.footer,
.page > .footer {
  box-sizing: border-box;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: .2px;
  text-align: center;
}
.footer p,
.page > .footer p {
  margin: 0;
  padding: 0;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: center;
}
@media (max-width: 550px) {
  .footer,
  .page > .footer {
    font-size: 11px;
  }
}

/* ================================================================
   IMTS WEB 8.7 — INICIO EQUILIBRADO
   Solo modifica el hero del index. NO afecta Servicios, Nosotros ni Contacto.
   ================================================================ */
.page > .hero {
  min-height: 0;
  padding: clamp(24px, 3.2vh, 40px) 0 clamp(24px, 3.5vh, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page > .hero .hero-content {
  width: min(93%, 1380px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
}
.page > .hero .hero-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.page > .hero .hero-text-inner {
  width: 100%;
  max-width: 635px;
  margin: 0 auto;
  padding: 20px 6px;
  text-align: center;
  transform: none;
}
/* Halo oscuro muy suave, sin caja visible, para separar letras y circuitos. */
.page > .hero .hero-text-inner::before {
  inset: -40px -48px -40px;
  background: radial-gradient(ellipse at center,
    rgba(1, 10, 29, .91) 0%,
    rgba(1, 13, 34, .69) 43%,
    rgba(1, 13, 34, .25) 71%,
    transparent 92%);
  filter: blur(15px);
}
.page > .hero .hero-text h1 {
  margin: 0;
  font-size: clamp(40px, 4.1vw, 67px);
  line-height: 1.105;
  letter-spacing: -.035em;
  font-weight: 900;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0, 3, 15, .82);
}
.page > .hero .hero-text h1 span {
  display: block;
  white-space: nowrap;
}
.page > .hero .hero-text p {
  width: min(100%, 535px);
  max-width: 535px;
  margin: 19px auto 0;
  font-size: clamp(15px, 1.05vw, 17px);
  font-weight: 500;
  line-height: 1.68;
  letter-spacing: .002em;
  text-align: center;
  text-wrap: pretty;
  color: #f0f6ff;
  text-shadow: 0 2px 10px rgba(0, 4, 20, .9);
}
.page > .hero .hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  transform: none;
}
.page > .hero .hero-logo img {
  display: block;
  width: 100%;
  max-width: 585px;
  max-height: min(70vh, 610px);
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 18px 33px rgba(0,0,0,.32))
          drop-shadow(0 0 14px rgba(237,189,80,.15));
}
@media (max-width: 1100px) and (min-width: 801px) {
  .page > .hero .hero-content { gap: clamp(12px,2vw,28px); }
  .page > .hero .hero-text h1 { font-size: clamp(36px, 4.15vw, 51px); }
  .page > .hero .hero-logo img { max-width: 490px; }
}
@media (max-width: 800px) {
  .page > .hero { padding: 32px 0 35px; }
  .page > .hero .hero-content {
    width: min(92%, 620px);
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .page > .hero .hero-text-inner {
    max-width: 600px;
    padding: 16px 5px 10px;
  }
  .page > .hero .hero-text h1 {
    font-size: clamp(34px, 6.8vw, 54px);
  }
  .page > .hero .hero-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 16px;
  }
  .page > .hero .hero-logo img { max-width: 380px; max-height: none; }
}
@media (max-width: 550px) {
  .page > .hero { padding: 26px 0 28px; }
  .page > .hero .hero-content { gap: 7px; }
  .page > .hero .hero-text h1 {
    font-size: clamp(30px, 8.6vw, 44px);
    line-height: 1.14;
    letter-spacing: -.035em;
  }
  .page > .hero .hero-text h1 span { white-space: normal; }
  .page > .hero .hero-text p { max-width: 410px; font-size: 15px; }
  .page > .hero .hero-logo img { max-width: min(82vw, 310px); }
}
@media (prefers-reduced-motion: reduce) {
  .page > .hero .hero-logo img { animation: none !important; }
}


/* ================================================================
   IMTS WEB 8.8 — INICIO MÁS PREMIUM + HOVER AZUL EN CONTACTO
   - Mejora la composición del hero de Inicio.
   - Agrega animación azul elegante a las tarjetas internas de Contacto.
   ================================================================ */

/* -------- INICIO -------- */
.page > .hero {
  padding: clamp(28px, 3.6vh, 46px) 0 clamp(24px, 3.8vh, 42px);
}
.page > .hero .hero-content {
  width: min(94%, 1420px);
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  gap: clamp(26px, 4.5vw, 84px);
}
.page > .hero .hero-text-inner {
  max-width: 700px;
  padding: 18px 8px 18px;
}
.page > .hero .hero-text-inner::before {
  inset: -52px -72px -48px;
  background: radial-gradient(ellipse at center,
    rgba(1, 9, 28, .93) 0%,
    rgba(1, 12, 34, .76) 38%,
    rgba(1, 13, 35, .34) 68%,
    transparent 92%);
  filter: blur(18px);
}
.page > .hero .hero-text h1 {
  max-width: 670px;
  margin: 0 auto;
  font-size: clamp(41px, 4.65vw, 76px);
  line-height: 1.03;
  letter-spacing: -.04em;
  text-wrap: balance;
  text-shadow: 0 4px 22px rgba(0, 3, 15, .88), 0 2px 2px rgba(0,0,0,.35);
}
.page > .hero .hero-text h1 span {
  display: inline;
  white-space: normal;
}
.page > .hero .hero-text p {
  width: min(100%, 610px);
  max-width: 610px;
  margin: 22px auto 0;
  font-size: clamp(15px, 1.08vw, 18px);
  line-height: 1.72;
  color: #f3f8ff;
  text-shadow: 0 2px 12px rgba(0, 4, 20, .92);
}
.page > .hero .hero-logo img {
  max-width: 650px;
  max-height: min(73vh, 650px);
  filter: drop-shadow(0 20px 38px rgba(0,0,0,.33))
          drop-shadow(0 0 16px rgba(237,189,80,.19));
}

/* -------- CONTACTO: mismas tarjetas elegantes, pero en AZUL -------- */
.contact-page .contact-info-box {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, background-color .22s ease, box-shadow .28s ease;
}
.contact-page .contact-info-box::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(103, 207, 255, .58);
  box-shadow: 0 0 0 0 rgba(93, 203, 255, .0);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact-page .contact-info-box:hover {
    transform: translateY(-3px);
    border-color: rgba(106, 203, 255, .42);
    background: rgba(24, 58, 108, .94);
    box-shadow: 0 16px 30px rgba(0,0,0,.22), 0 0 18px rgba(77, 195, 255, .08);
  }
  .contact-page .contact-info-box:hover::after {
    opacity: 1;
    animation: imtsContactBluePulse 1.9s ease-in-out infinite;
  }
}
.contact-page .contact-info-box:focus-within {
  transform: translateY(-2px);
  border-color: rgba(106, 203, 255, .42);
  background: rgba(24, 58, 108, .94);
  box-shadow: 0 14px 28px rgba(0,0,0,.2), 0 0 14px rgba(77, 195, 255, .08);
}
.contact-page .contact-info-box:focus-within::after {
  opacity: 1;
}
@keyframes imtsContactBluePulse {
  0%, 100% {
    border-color: rgba(103, 207, 255, .42);
    box-shadow: 0 0 0 0 rgba(93, 203, 255, .0), 0 0 10px rgba(93, 203, 255, .10);
  }
  50% {
    border-color: rgba(179, 236, 255, .95);
    box-shadow: 0 0 0 1px rgba(103, 207, 255, .12), 0 0 20px rgba(93, 203, 255, .24);
  }
}

@media (max-width: 1100px) and (min-width: 801px) {
  .page > .hero .hero-content { gap: clamp(18px, 2.8vw, 36px); }
  .page > .hero .hero-text h1 { font-size: clamp(38px, 4.1vw, 58px); }
  .page > .hero .hero-text p { max-width: 560px; }
  .page > .hero .hero-logo img { max-width: 540px; }
}
@media (max-width: 800px) {
  .page > .hero { padding: 28px 0 34px; }
  .page > .hero .hero-content {
    width: min(92%, 660px);
    gap: 12px;
  }
  .page > .hero .hero-text-inner {
    max-width: 620px;
    padding: 16px 6px 10px;
  }
  .page > .hero .hero-text h1 {
    max-width: 620px;
    font-size: clamp(35px, 7.2vw, 56px);
    line-height: 1.08;
  }
  .page > .hero .hero-text p {
    max-width: 560px;
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.62;
  }
  .page > .hero .hero-logo img { max-width: 405px; }
}
@media (max-width: 550px) {
  .page > .hero .hero-text h1 {
    font-size: clamp(31px, 8.8vw, 45px);
    line-height: 1.11;
  }
  .page > .hero .hero-text p {
    max-width: 410px;
    font-size: 15px;
    line-height: 1.6;
  }
  .page > .hero .hero-logo img {
    max-width: min(84vw, 320px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-page .contact-info-box,
  .contact-page .contact-info-box::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}


/* ================================================================
   IMTS 9.0 — ENTRADA SUAVE, UNIFORME Y DISCRETA
   Servicios, Nosotros y Contacto avanzan 6px en 1050ms.
   Animación ease-in-out: arranca y termina suavemente.
   El contenido nunca desaparece y el encabezado no se mueve.
   ================================================================ */
:root {
  --imts-entrada-distancia: 6px;
  --imts-entrada-duracion: 1050ms;
  --imts-entrada-curva: cubic-bezier(.42, 0, .58, 1);
}

/* Todos los bloques principales comparten el mismo movimiento. */
.page > .hero-services,
.page > .services-grid,
.page > .hero-about,
.page > .about-main,
.page > .about-bottom,
.page > .contact-page > .contact-hero,
.page > .contact-page > .contact-card-full {
  opacity: 1 !important;
  animation-name: imtsEntradaSuave !important;
  animation-duration: var(--imts-entrada-duracion) !important;
  animation-timing-function: var(--imts-entrada-curva) !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  animation-direction: normal !important;
  animation-fill-mode: both !important;
}

/* Sin saltos individuales: las tarjetas quedan estables dentro del bloque. */
.page > .services-grid > .service-card,
.page > .about-main > .about-card,
.page > .about-bottom > .mini-card,
.page .values-grid > .value-box {
  opacity: 1 !important;
  animation: none !important;
}

@keyframes imtsEntradaSuave {
  0% { transform: translate3d(0, var(--imts-entrada-distancia), 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Accesibilidad: sin movimiento para quienes lo desactiven. */
@media (prefers-reduced-motion: reduce) {
  .page > .hero-services,
  .page > .services-grid,
  .page > .hero-about,
  .page > .about-main,
  .page > .about-bottom,
  .page > .contact-page > .contact-hero,
  .page > .contact-page > .contact-card-full {
    animation: none !important;
  }
}


/* =============================================================
   IMTS 9.1 - CORRECCION RESPONSIVE DEFINITIVA
   Cinco elementos de navegacion + portada adaptable a movil.
   ============================================================= */
/* Ajustar cinco pestañas sin dispersión ni un sexto espacio vacío. */
@media (min-width: 1051px) {
  .header > .navbar { grid-template-columns: minmax(0,1fr) auto !important; }
  .header .menu {
    display: flex !important; flex-wrap: nowrap !important;
    width: auto !important; min-width: 0 !important; max-width: none !important;
    gap: 6px !important; justify-content: flex-end !important;
  }
  .header .menu a, .header .menu a.active {
    flex: 0 0 auto !important; width: 98px !important;
    min-width: 98px !important; max-width: 98px !important;
    margin: 0 !important;
  }
}
@media (max-width: 1050px) {
  .header, .page > .header { height: auto !important; min-height: 0 !important; max-height: none !important; }
  .header > .navbar {
    height: auto !important; min-height: 0 !important;
    width: min(94%, 850px) !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 8px !important; justify-items: center !important;
    padding: 9px 0 !important;
  }
  .header .brand {
    width: min(100%, 340px) !important; min-width: 0 !important;
    max-width: 100% !important; height: 58px !important;
    min-height: 58px !important; justify-content: center !important;
  }
  .header .brand img {
    width: min(100%, 330px) !important; min-width: 0 !important;
    max-width: 100% !important; height: 56px !important;
    min-height: 0 !important; max-height: 56px !important;
    object-position: center !important;
  }
  .header .menu {
    display: flex !important; flex-wrap: wrap !important;
    width: min(100%,600px) !important; min-width: 0 !important;
    max-width: 600px !important;
    gap: 6px !important; justify-content: center !important;
    margin: 0 auto !important;
  }
  .header .menu a, .header .menu a.active {
    width: auto !important; flex: 1 1 95px !important;
    min-width: 0 !important; max-width: 118px !important;
    margin: 0 !important; height: 40px !important;
    min-height: 40px !important; max-height: 40px !important;
    padding: 0 6px !important; font-size: 13px !important;
  }
}
/* Corrección de portada: en celular no hay columnas laterales. */
@media (max-width: 800px) {
  .page > .hero { padding: 26px 0 34px !important; min-height: 0 !important; }
  .page > .hero .hero-content {
    display: grid !important; grid-template-columns: minmax(0,1fr) !important;
    width: min(92%,620px) !important; gap: 18px !important;
    justify-items: center !important; align-items: center !important;
  }
  .page > .hero .hero-text, .page > .hero .hero-text-inner,
  .page > .hero .hero-logo { width: 100% !important; min-width: 0 !important; height: auto !important; }
  .page > .hero .hero-text-inner { max-width: 100% !important; padding: 5px 0 !important; }
  .page > .hero .hero-text h1 {
    max-width: 100% !important;
    font-size: clamp(30px, 7.6vw, 48px) !important;
    line-height: 1.12 !important; text-align: center !important;
    overflow-wrap: normal !important; word-break: normal !important;
  }
  .page > .hero .hero-text h1 span { white-space: normal !important; }
  .page > .hero .hero-text p {
    display: block !important; width: 100% !important;
    max-width: 540px !important; margin: 16px auto 0 !important;
    font-size: clamp(14px, 3.6vw, 16px) !important;
    line-height: 1.55 !important; text-align: center !important;
    overflow-wrap: normal !important; word-break: normal !important;
  }
  .page > .hero .hero-logo { display: flex !important; justify-content: center !important; margin-top: 6px !important; }
  .page > .hero .hero-logo img {
    display: block !important; width: min(78vw,330px) !important;
    max-width: 100% !important; height: auto !important;
    max-height: none !important; margin: 0 auto !important;
  }
  .services-grid, .about-main, .about-bottom,
  .contact-grid-two { min-width: 0 !important; }
}
@media (max-width: 550px) {
  .header .menu { width: min(100%,380px) !important; gap: 5px !important; }
  .header .menu a, .header .menu a.active {
    flex: 0 1 calc((100% - 10px) / 3) !important;
    width: calc((100% - 10px) / 3) !important;
    max-width: none !important; font-size: 12px !important;
    height: 37px !important; min-height: 37px !important; max-height: 37px !important;
  }
  .page > .hero .hero-text h1 { font-size: clamp(29px, 8.1vw, 40px) !important; }
  .page > .hero .hero-text p { font-size: 15px !important; line-height: 1.55 !important; }
  .page > .hero .hero-logo img { width: min(72vw,270px) !important; }
}
@media (max-width: 360px) {
  .header .menu a, .header .menu a.active {font-size:11px !important;}
  .page > .hero .hero-text h1 {font-size:clamp(26px,8vw,31px) !important;}
}
