/* ==========================================================
   Hero de portada American Carpas (reemplaza el slider Swiper)
   Propuesta 30/11/2026 — fondo foto + plano animado (canvas)
   + micro video a la izquierda + servicios a la derecha.
   Altura fija: nada se mueve ni se descuadra.
   ========================================================== */
.ac-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #041a38;
  color: #fff;
  min-height: clamp(600px, 88vh, 800px);
  display: flex;
  align-items: center;
  /* --ac-header lo mide ac-hero.js (la cabecera va encima del hero) */
  padding: calc(var(--ac-header, 120px) + 48px) 0 70px;
}
.ac-hero__fondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: -3;
  transform-origin: 60% 50%;
  animation: acHeroZoom 32s ease-in-out infinite alternate;
}
.ac-hero__velo {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 70% at 22% 55%, rgba(11, 108, 180, .45) 0%, rgba(11, 108, 180, 0) 70%),
    linear-gradient(100deg, rgba(3, 20, 44, .92) 0%, rgba(4, 30, 64, .86) 48%, rgba(3, 22, 48, .92) 100%);
}
.ac-hero__plano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.ac-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

/* ---------- Columna izquierda: micro video ---------- */
.ac-hero__marco {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0a2a57;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(140, 200, 255, .25);
}
.ac-hero__marco::before,
.ac-hero__marco::after {
  /* esquinas tipo plano técnico */
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid #4fb3ff;
  z-index: 2;
  pointer-events: none;
}
.ac-hero__marco::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.ac-hero__marco::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.ac-hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ac-hero__vercompleto,
.ac-hero__sonido {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(3, 20, 44, .78);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background .2s ease;
}
.ac-hero__vercompleto:hover,
.ac-hero__vercompleto:focus-visible,
.ac-hero__sonido:hover,
.ac-hero__sonido:focus-visible { background: #0b6cb4; color: #fff; }
.ac-hero__sonido {
  /* botón real: sin el borde ni el fondo por defecto del navegador */
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.ac-hero__sonido[aria-pressed="true"] { background: #0b6cb4; }
.ac-hero__marco .ac-hero__sonido { top: 16px; bottom: auto; left: 46px; }   /* arriba: no tapa los subtítulos del video */
.ac-hero__datos {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.ac-hero__datos li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #d6e9fb;
}
.ac-hero__datos strong {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* ---------- Columna derecha: texto y servicios ---------- */
.ac-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #7cc4ff;
}
.ac-hero__kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: #4fb3ff;
}
.ac-hero__titulo {
  margin: 0 0 18px;
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -.5px;
}
.ac-hero__sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Palabra que cambia: Diseñamos → Fabricamos → Instalamos.
   Las tres ocupan la misma celda, así el título nunca cambia de tamaño. */
.ac-hero__rot {
  display: grid;
  justify-items: start;
  padding-bottom: 8px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}
.ac-hero__rot > span {
  grid-area: 1 / 1;
  color: #7cc4ff;
  font-size: 1.22em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(55%);
  filter: blur(6px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1), filter .55s ease;
}
.ac-hero__rot > span.is-on { opacity: 1; transform: none; filter: none; }
.ac-hero__rot > span.is-out { opacity: 0; transform: translateY(-55%); filter: blur(6px); }
.ac-hero__rot::after {
  /* línea que se llena con cada palabra */
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 96px;
  background: linear-gradient(90deg, #4fb3ff, rgba(79, 179, 255, 0));
  transform-origin: left;
  animation: acHeroBarra 2.8s linear infinite;
}
@keyframes acHeroBarra {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.ac-hero__sub {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: #d6e9fb;
  max-width: 560px;
}
.ac-hero__servicios {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ac-hero__servicios a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(140, 200, 255, .45);
  border-radius: 999px;
  background: rgba(11, 108, 180, .18);
  color: #fff;
  font-size: 14.5px;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ac-hero__servicios a:hover,
.ac-hero__servicios a:focus-visible {
  background: #0b6cb4;
  border-color: #0b6cb4;
  color: #fff;
  transform: translateY(-2px);
}
.ac-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.ac-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: filter .2s ease, background .2s ease;
}
.ac-hero__btn--wa { background: #10c379; color: #fff; }
.ac-hero__btn--wa:hover,
.ac-hero__btn--wa:focus-visible { filter: brightness(1.08); color: #fff; }
.ac-hero__btn--sec {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
}
.ac-hero__btn--sec:hover,
.ac-hero__btn--sec:focus-visible { background: #fff; color: #0b3b6e; }

@keyframes acHeroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .ac-hero__grid { gap: 36px; }
}
@media (max-width: 991px) {
  .ac-hero { min-height: 0; padding: calc(var(--ac-header, 100px) + 32px) 0 56px; }
  .ac-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .ac-hero__texto, .ac-hero__media { min-width: 0; }
  .ac-hero__texto { order: 1; }
  .ac-hero__media { order: 2; }
  .ac-hero__sub { max-width: none; }
}
@media (max-width: 575px) {
  .ac-hero { padding: calc(var(--ac-header, 90px) + 24px) 0 44px; }
  .ac-hero__titulo { font-size: 30px; }
  .ac-hero__sub { font-size: 16px; }
  /* servicios en una sola fila deslizable para que el video suba */
  .ac-hero__servicios {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -15px;
    padding-right: 15px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ac-hero__servicios::-webkit-scrollbar { display: none; }
  .ac-hero__servicios li { flex: 0 0 auto; }
  .ac-hero__servicios a { font-size: 13.5px; padding: 8px 13px; white-space: nowrap; }
  .ac-hero__btn { flex: 1 1 100%; justify-content: center; }
  .ac-hero__datos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
  }
  .ac-hero__datos li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12.5px;
    line-height: 1.25;
  }
  .ac-hero__datos strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-hero__fondo { animation: none; }
  .ac-hero__servicios a { transition: none; }
  .ac-hero__rot > span, .ac-hero__rot > span.is-out { transform: none; filter: none; }
  .ac-hero__rot::after { animation: none; transform: scaleX(1); }
}
