/* CodeMaster Automation — efectos corporativos de producción */
html{scroll-behavior:smooth}

/* Header con sensación premium al desplazarse */
.header{
  transition:box-shadow .26s ease, background-color .26s ease, border-color .26s ease;
}
.header.cm-scrolled{
  background:rgba(255,255,255,.985)!important;
  box-shadow:0 12px 34px rgba(12,38,57,.10)!important;
  border-bottom-color:#d9e3e9!important;
}

/* Navegación: línea fina de estado, sin animaciones llamativas */
.navlinks a{
  position:relative;
  transition:color .18s ease;
}
.navlinks a::after{
  content:"";
  position:absolute;
  left:0;
  right:100%;
  bottom:-8px;
  height:2px;
  border-radius:2px;
  background:#08a9ca;
  transition:right .22s ease;
}
.navlinks a:hover::after,
.navlinks a:focus-visible::after{right:0}

/* Entrada progresiva de contenido */
.cm-reveal{
  opacity:0;
  transform:translateY(18px);
  transition:
    opacity .58s cubic-bezier(.2,.7,.2,1),
    transform .58s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--cm-delay,0ms);
  will-change:opacity,transform;
}
.cm-reveal.cm-visible{
  opacity:1;
  transform:none;
}

/* Tarjetas y bloques interactivos */
.card,.shortcut,.support-card,.method-box,.company-cap-card,.support-area-card,
.company-intro-grid article,.company-process article,.support-diagnostic-grid article,
.works-home-card,.contact-line,.robot-real-card{
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover,.shortcut:hover,.support-card:hover,.company-cap-card:hover,.support-area-card:hover,
.company-intro-grid article:hover,.company-process article:hover,.works-home-card:hover,.contact-line:hover,
.robot-real-card:hover{
  transform:translateY(-4px);
  box-shadow:0 22px 50px rgba(14,39,57,.12);
  border-color:#cfdde5;
}

/* Fotografía con zoom muy sutil */
.card img,.company-cap-card img,.support-area-card>img,.robot-real-card img,
.company-hero-photo img,.support-hero-img img,.company-engineering-images img,
.support-no-docs-images img,.hero-photo img{
  transition:transform .55s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.card:hover img,.company-cap-card:hover img,.support-area-card:hover>img,.robot-real-card:hover img{
  transform:scale(1.025);
}

/* Botones más refinados */
.btn,.company-secondary,.support-links a,.mobile-service-toggle{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease,
             background-color .18s ease, color .18s ease;
}
.btn:hover,.company-secondary:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(9,50,71,.14);
}
.btn:active,.company-secondary:active{transform:translateY(0)}

/* Títulos: mejor presencia sin alterar identidad */
.section-head h2,.company-section-head h2,.support-section-head h2,
.company-project-copy h2,.company-engineering-copy h2,.company-commitment h2{
  text-wrap:balance;
}

/* Foco visible para navegación profesional/accesible */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(8,169,202,.24)!important;
  outline-offset:3px!important;
}

@media(max-width:700px){
  /* En móvil los efectos son más cortos para mantener sensación rápida */
  .cm-reveal{
    transform:translateY(12px);
    transition-duration:.42s;
  }
  .card:hover,.shortcut:hover,.support-card:hover,.company-cap-card:hover,.support-area-card:hover,
  .company-intro-grid article:hover,.company-process article:hover,.works-home-card:hover,.contact-line:hover,
  .robot-real-card:hover{
    transform:none;
    box-shadow:inherit;
  }
}

@media(hover:none){
  .card:hover img,.company-cap-card:hover img,.support-area-card:hover>img,.robot-real-card:hover img{
    transform:none;
  }
  .btn:hover,.company-secondary:hover{transform:none}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
  .cm-reveal{opacity:1!important;transform:none!important}
}


/* =========================================================
   CODEMASTER — HEROES EJECUTIVOS COMPACTOS
   Reduce espacios vacíos e imágenes sobredimensionadas.
   ========================================================= */

/* Anchura más controlada en páginas internas */
.service-page > .container,
.company-page > .container,
.support-page > .container,
.works-page > .container,
.contact-exclusive-page > .container,
.plc-pro-page > .container,
.panel-pro-page > .container,
.paileria-page > .container{
  max-width:1180px !important;
}

/* Páginas estándar de servicio */
.service-page{
  padding-top:26px !important;
}
.service-breadcrumb{
  margin-bottom:13px !important;
}
.service-hero-card{
  padding:34px 38px !important;
  border-radius:20px !important;
}
.service-hero-card h1{
  max-width:850px !important;
  margin-bottom:13px !important;
  font-size:clamp(34px,4.1vw,52px) !important;
  line-height:1.06 !important;
  letter-spacing:-1.25px !important;
}
.service-hero-card > p{
  max-width:820px !important;
  font-size:16px !important;
  line-height:1.68 !important;
}
.service-hero-actions{
  margin-top:18px !important;
  gap:8px !important;
}
.service-pill{
  min-height:32px !important;
  padding:5px 10px !important;
  font-size:11px !important;
}

/* Heroes especiales */
.company-hero,
.support-hero,
.plc-pro-hero,
.panel-pro-hero,
.paileria-hero,
.laser-integration-hero{
  min-height:460px !important;
  grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr) !important;
  border-radius:21px !important;
}

/* Bloques de texto: compactos pero cómodos */
.company-hero-copy,
.support-hero-copy,
.plc-pro-copy,
.panel-pro-copy,
.paileria-copy,
.laser-integration-copy{
  padding:36px 38px !important;
  justify-content:center !important;
}

.company-hero h1,
.support-hero h1,
.plc-pro-copy h1,
.panel-pro-copy h1,
.paileria-copy h1,
.laser-integration-copy h1{
  margin-bottom:14px !important;
  font-size:clamp(38px,4.35vw,53px) !important;
  line-height:1.055 !important;
  letter-spacing:-1.35px !important;
}

.company-hero-copy > p,
.support-hero-copy > p,
.plc-pro-copy > p,
.panel-pro-copy > p,
.paileria-copy > p,
.laser-integration-copy > p{
  font-size:15.5px !important;
  line-height:1.68 !important;
}

/* Fotos: altura moderada */
.company-hero-media,
.support-hero-visual{
  min-height:460px !important;
  height:460px !important;
}

.panel-pro-feature-photo,
.paileria-hero-photo{
  min-height:460px !important;
  height:460px !important;
}

.panel-pro-feature-photo img,
.paileria-hero-photo img{
  min-height:0 !important;
  height:100% !important;
}

.plc-pro-visual{
  min-height:460px !important;
  height:460px !important;
}
.plc-pro-visual img{
  min-height:0 !important;
  height:100% !important;
}

.laser-integration-visual{
  min-height:460px !important;
  height:460px !important;
}
.laser-visual-card{
  min-height:0 !important;
}
.laser-visual-card img{
  min-height:0 !important;
  height:100% !important;
}

/* Empresa: datos más compactos */
.company-hero-facts{
  margin-top:20px !important;
}
.company-hero-facts div{
  padding:10px 12px !important;
}
.company-hero-facts strong{
  font-size:16px !important;
}

/* Soporte: chips y acciones con menos aire */
.support-hero-pills{
  margin-top:17px !important;
}
.support-hero-actions,
.company-hero-actions{
  margin-top:19px !important;
}

/* Páginas corporativas de texto */
.works-hero,
.contact-exclusive-hero{
  padding:34px 38px !important;
  border-radius:20px !important;
}
.works-hero h1,
.contact-exclusive-hero h1{
  font-size:clamp(34px,4.1vw,52px) !important;
  line-height:1.06 !important;
}
.works-hero p,
.contact-exclusive-hero p{
  font-size:15.5px !important;
  line-height:1.68 !important;
}

/* Evitar grandes vacíos antes de la siguiente sección */
.company-intro,
.support-overview,
.plc-capabilities,
.panel-real-work,
.paileria-photo-section,
.laser-reverse-section{
  margin-top:16px !important;
}

/* Tablet */
@media(max-width:1050px){
  .service-page > .container,
  .company-page > .container,
  .support-page > .container,
  .works-page > .container,
  .contact-exclusive-page > .container,
  .plc-pro-page > .container,
  .panel-pro-page > .container,
  .paileria-page > .container{
    max-width:none !important;
  }

  .company-hero,
  .support-hero,
  .plc-pro-hero,
  .panel-pro-hero,
  .paileria-hero,
  .laser-integration-hero{
    min-height:0 !important;
    grid-template-columns:1fr !important;
  }

  .company-hero-copy,
  .support-hero-copy,
  .plc-pro-copy,
  .panel-pro-copy,
  .paileria-copy,
  .laser-integration-copy{
    padding:32px 30px !important;
  }

  .company-hero h1,
  .support-hero h1,
  .plc-pro-copy h1,
  .panel-pro-copy h1,
  .paileria-copy h1,
  .laser-integration-copy h1{
    font-size:clamp(36px,6vw,48px) !important;
  }

  .company-hero-media,
  .support-hero-visual,
  .plc-pro-visual,
  .panel-pro-feature-photo,
  .paileria-hero-photo,
  .laser-integration-visual{
    min-height:320px !important;
    height:320px !important;
  }

  /* En tablet, las galerías dobles siguen mostrando las dos fotos */
  .company-hero-media,
  .support-hero-visual{
    grid-template-columns:1fr 1fr !important;
    grid-template-rows:1fr !important;
  }
}

/* Celular */
@media(max-width:700px){
  .service-page{
    padding-top:16px !important;
  }

  .service-hero-card{
    padding:24px 20px !important;
    border-radius:17px !important;
  }

  .service-hero-card h1{
    font-size:clamp(30px,9vw,39px) !important;
    line-height:1.08 !important;
    letter-spacing:-.9px !important;
  }

  .service-hero-card > p{
    font-size:15px !important;
    line-height:1.65 !important;
  }

  .company-hero-copy,
  .support-hero-copy,
  .plc-pro-copy,
  .panel-pro-copy,
  .paileria-copy,
  .laser-integration-copy{
    padding:25px 20px !important;
  }

  .company-hero h1,
  .support-hero h1,
  .plc-pro-copy h1,
  .panel-pro-copy h1,
  .paileria-copy h1,
  .laser-integration-copy h1{
    font-size:clamp(31px,9vw,40px) !important;
    line-height:1.08 !important;
    letter-spacing:-.85px !important;
  }

  .company-hero-copy > p,
  .support-hero-copy > p,
  .plc-pro-copy > p,
  .panel-pro-copy > p,
  .paileria-copy > p,
  .laser-integration-copy > p{
    font-size:15px !important;
    line-height:1.65 !important;
  }

  .company-hero-media,
  .support-hero-visual,
  .plc-pro-visual,
  .panel-pro-feature-photo,
  .paileria-hero-photo,
  .laser-integration-visual{
    min-height:250px !important;
    height:250px !important;
  }

  /* Una sola imagen visible por fila para evitar altura exagerada */
  .company-hero-media,
  .support-hero-visual{
    grid-template-columns:1fr 1fr !important;
  }

  .company-hero-facts{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
  }
  .company-hero-facts div{
    padding:8px !important;
  }
  .company-hero-facts strong{
    font-size:14px !important;
  }
  .company-hero-facts span{
    font-size:10px !important;
  }

  .works-hero,
  .contact-exclusive-hero{
    padding:24px 20px !important;
  }

  .works-hero h1,
  .contact-exclusive-hero h1{
    font-size:clamp(30px,9vw,39px) !important;
  }
}

@media(max-width:440px){
  .company-hero-media,
  .support-hero-visual{
    grid-template-columns:1fr !important;
    height:auto !important;
  }
  .company-hero-photo,
  .support-hero-img{
    min-height:220px !important;
  }
}
