/* ==================================================
   TRASTEOS YA — MEGA HERO premium (v3)
   Slider full-width · 5 servicios · parallax + Ken Burns
   Tarjetas flotantes · contadores · transiciones Apple/Tesla
   ================================================== */

.mega-hero {
  position: relative;
  height: 92vh;
  min-height: 680px;
  max-height: 1100px;
  overflow: hidden;
  isolation: isolate;
  background: var(--brand-navy-darker);
  margin-top: 0;
}

/* ---------- SLIDES ---------- */

.mega-hero__slides { position: absolute; inset: 0; z-index: 1; }

.mega-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s cubic-bezier(0.4,0,0.2,1);
  z-index: 1;
}
.mega-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.mega-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 9s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.mega-hero__slide.is-active .mega-hero__bg { transform: scale(1.18); }

/* Placeholder (cuando no hay imagen aun) */
.mega-hero__bg--placeholder {
  background:
    radial-gradient(circle at 25% 30%, rgba(227,6,19,0.20) 0%, transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(59,130,246,0.18) 0%, transparent 50%),
    linear-gradient(135deg, #0A1845 0%, #050E2D 100%);
}

/* Overlay oscuro elegante con glow rojo */
.mega-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(5,14,45,0.78) 0%, rgba(10,24,69,0.55) 45%, rgba(5,14,45,0.92) 100%),
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(5,14,45,0.65) 100%);
}
.mega-hero__overlay::before {
  content: '';
  position: absolute;
  top: 15%;
  right: -8%;
  width: 55%;
  height: 85%;
  background: radial-gradient(circle at 70% 50%, rgba(227,6,19,0.30) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

/* ---------- CONTENIDO ---------- */

.mega-hero__content {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--space-2xl) 240px;
  max-width: 1320px;
  margin: 0 auto;
  color: white;
}
@media (min-width: 1024px) {
  .mega-hero__content { padding: 100px var(--space-3xl) 220px; }
}
/* Hero mobile · fotos amplias + dots al borde inferior + texto encima de dots */
@media (max-width: 767px) {
  .mega-hero {
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
  }
  /* NO ocultar slides - el JS rota entre ellos */
  .mega-hero__slide:not(:first-child) { display: block !important; }

  /* CONTENIDO (tag + titulo + lead + CTA) anclado al fondo de la foto, encima de los dots */
  .mega-hero__content {
    padding: 0 18px 130px !important;
    justify-content: flex-end !important;
  }
  /* Animacion mas lenta del contenido al cambiar de slide */
  .mega-hero__slide.is-active .mega-hero__slide-content {
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
                transform 2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s !important;
  }

  /* TABS = SOLO DOTS ROJOS centrados al borde inferior de la foto */
  .mega-hero__nav {
    bottom: 88px !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    gap: 14px !important;
    padding: 0 !important;
    justify-content: center !important;
    background: transparent !important;
  }
  .mega-hero__nav button {
    /* Boton invisible - solo el ::before (dot) cuenta */
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 6px !important;
    font-size: 0 !important;             /* Oculta el texto */
    color: transparent !important;
    overflow: hidden;
    width: auto;
    height: auto;
  }
  .mega-hero__nav button::before {
    width: 11px !important;
    height: 11px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.45) !important;
    border: 1px solid rgba(255,255,255,0.30);
    box-shadow: 0 1px 4px rgba(0,0,0,0.30);
    margin: 0 !important;
  }
  .mega-hero__nav button.is-active::before {
    background: #FF2638 !important;
    border-color: rgba(255,255,255,0.90) !important;
    box-shadow: 0 0 14px #FF2638, 0 0 4px white, 0 1px 4px rgba(0,0,0,0.30) !important;
    transform: scale(1.15);
  }

  /* STATS abajo, compactos */
  .mega-hero__stats {
    grid-template-columns: repeat(4, 1fr) !important;
    padding: 12px 8px 16px !important;
    gap: 0 !important;
  }
  .mega-stat { padding: 4px 4px !important; }
  .mega-stat__num { font-size: 16px !important; }
  .mega-stat__lbl { font-size: 9px !important; line-height: 1.2 !important; }

  /* Tamanos del texto del slide */
  .mega-hero__title { font-size: clamp(24px, 7vw, 32px) !important; line-height: 1.12 !important; margin-bottom: 8px !important; }
  .mega-hero__lead { font-size: 13px !important; line-height: 1.4 !important; margin-bottom: 14px !important; }
  .mega-hero__tag { font-size: 10px !important; padding: 4px 9px !important; margin-bottom: 10px !important; }
  .mega-hero__ctas .btn { padding: 11px 22px !important; font-size: 14px !important; }
}

.mega-hero__slide-content { max-width: 880px; }

.mega-hero__slide .mega-hero__slide-content {
  opacity: 0;
  transform: translateY(50px);
}
.mega-hero__slide.is-active .mega-hero__slide-content {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s,
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.mega-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(227,6,19,0.16);
  border: 1px solid rgba(227,6,19,0.42);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFC9CE;
  margin-bottom: 26px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 8px 24px rgba(227,6,19,0.25);
}
.mega-hero__tag::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF2638;
  box-shadow: 0 0 12px #FF2638;
  animation: dot-blink 1.6s ease-in-out infinite;
}
@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* TODO EL TITULO en AZUL ESPEJO METALICO (mirror chrome) */
.mega-hero__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(40px, 6.5vw, 88px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  background: linear-gradient(180deg,
    #E8F4FF 0%,
    #7BB8FF 16%,
    #2D6FE0 38%,
    #0A1845 50%,
    #2D6FE0 62%,
    #7BB8FF 84%,
    #E8F4FF 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 20px rgba(10,24,69,0.70)) drop-shadow(0 1px 0 rgba(232,244,255,0.50));
}
/* STRONG vuelve a ROJO dimensional (como estaba antes) */
.mega-hero__title strong {
  display: inline-block;
  font-weight: 900;
  background: linear-gradient(140deg,
    #FF4B5C 0%,
    #FF2638 25%,
    #E30613 50%,
    #B0050F 75%,
    #8E0410 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(227,6,19,0.55)) drop-shadow(0 1px 0 rgba(255,255,255,0.30));
  letter-spacing: -0.04em;
}

.mega-hero__lead {
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.55;
  max-width: 640px;
  color: rgba(255,255,255,0.90);
  margin-bottom: 36px;
  font-weight: 400;
}

.mega-hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.mega-hero__ctas .btn {
  padding: 18px 36px;
  font-size: 17px;
  font-weight: 700;
}

/* ---------- TARJETAS FLOTANTES ---------- */

.mega-hero__floats {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
/* OBJETOS 3D FLOTANTES (sin texto, sin tarjeta, solo PNG girando) */
.float-obj {
  position: absolute;
  pointer-events: none;
  filter:
    drop-shadow(0 30px 60px rgba(0,0,0,0.55))
    drop-shadow(0 12px 20px rgba(10,24,69,0.45))
    drop-shadow(0 0 32px rgba(93,168,255,0.30));
  animation:
    obj-3d-spin 14s linear infinite,
    obj-fade 18s ease-in-out infinite,
    obj-bob 7s ease-in-out infinite;
  opacity: 0;
  will-change: transform, opacity;
}
.float-obj img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* Giro 3D continuo */
@keyframes obj-3d-spin {
  0%   { transform: perspective(800px) rotateY(0deg)   rotateX(8deg); }
  50%  { transform: perspective(800px) rotateY(180deg) rotateX(-8deg); }
  100% { transform: perspective(800px) rotateY(360deg) rotateX(8deg); }
}
/* Fade in/out random staggered */
@keyframes obj-fade {
  0%, 100% { opacity: 0; }
  10%, 85% { opacity: 1; }
}
/* Flota arriba y abajo */
@keyframes obj-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -22px; }
}

/* Posiciones, tamaños y delays · randomizados para cada objeto */
.float-obj--1 { top:  8%; right:  5%; width: 130px; animation-delay: 0s,   0s,   0s; animation-duration: 14s, 18s, 7s; }
.float-obj--2 { top: 24%; right: 18%; width: 110px; animation-delay: 0s,   3s,   1s; animation-duration: 18s, 22s, 8s; }
.float-obj--3 { top: 44%; right:  8%; width: 140px; animation-delay: 0s,   6s,   2s; animation-duration: 16s, 20s, 6s; }
.float-obj--4 { top: 18%; right: 36%; width: 100px; animation-delay: 0s,   9s,   0s; animation-duration: 20s, 24s, 7.5s; }
.float-obj--5 { top: 60%; right: 14%; width: 120px; animation-delay: 0s,  12s,   1.5s; animation-duration: 12s, 18s, 8.5s; }
.float-obj--6 { top: 36%; right: 38%; width: 105px; animation-delay: 0s,  15s,   0.5s; animation-duration: 17s, 21s, 6.5s; }
.float-obj--7 { top: 70%; right: 32%; width: 115px; animation-delay: 0s,   2.5s, 2.5s; animation-duration: 15s, 19s, 7s; }

/* Reverse de los pares para que no todos giren igual */
.float-obj--2, .float-obj--4, .float-obj--6 {
  animation-direction: reverse, normal, normal;
}

@media (max-width: 1024px) {
  .float-obj { width: 90px !important; }
  .float-obj--2,
  .float-obj--4,
  .float-obj--6 { display: none; }
}
@media (max-width: 640px) {
  .float-obj { display: none; }
  .float-obj--1, .float-obj--3 { display: block; width: 80px !important; }
  .float-obj--1 { top: 12%; right: 6%; }
  .float-obj--3 { top: 56%; right: 8%; }
}
.float-card__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.30);
  animation: dot-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.float-card__icon { font-size: 16px; line-height: 1; }

@keyframes float-bob {
  0%, 100% { transform: translateY(0) rotate(-0.3deg); }
  50% { transform: translateY(-14px) rotate(0.3deg); }
}
@keyframes float-fade {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.30); }
  50% { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
}

/* Posiciones para 8 tarjetas + diferentes delays */
.float-card:nth-child(1) { top: 10%; right: 4%;  animation-delay: 0s,    0s; }
.float-card:nth-child(2) { top: 22%; right: 18%; animation-delay: 1.0s,  2.0s; }
.float-card:nth-child(3) { top: 36%; right: 6%;  animation-delay: 2.0s,  4.0s; }
.float-card:nth-child(4) { top: 50%; right: 22%; animation-delay: 3.0s,  6.0s; }
.float-card:nth-child(5) { top: 18%; right: 36%; animation-delay: 4.0s,  8.0s; }
.float-card:nth-child(6) { top: 62%; right: 10%; animation-delay: 5.0s, 10.0s; }
.float-card:nth-child(7) { top: 44%; right: 38%; animation-delay: 6.0s, 12.0s; }
.float-card:nth-child(8) { top: 70%; right: 32%; animation-delay: 1.5s, 14.0s; }

@media (max-width: 1024px) {
  .float-card { font-size: 12px; padding: 10px 14px; }
  .float-card:nth-child(2),
  .float-card:nth-child(4),
  .float-card:nth-child(5),
  .float-card:nth-child(7),
  .float-card:nth-child(8) { display: none; }
}
@media (max-width: 640px) {
  .float-card { display: none; }
}

/* ---------- NAV SLIDER ---------- */

.mega-hero__nav {
  position: absolute;
  bottom: 130px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 var(--space-md);
  pointer-events: none;
}
.mega-hero__nav button {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.70);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.35s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mega-hero__nav button::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.35s ease;
  flex-shrink: 0;
}
.mega-hero__nav button.is-active {
  background: rgba(227,6,19,0.18);
  border-color: rgba(227,6,19,0.55);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 28px rgba(227,6,19,0.30);
}
.mega-hero__nav button.is-active::before {
  background: #FF2638;
  box-shadow: 0 0 12px #FF2638;
}
.mega-hero__nav button:hover { color: white; transform: translateY(-1px); }

/* ---------- STATS STRIP ---------- */

.mega-hero__stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 24px var(--space-2xl) 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(5,14,45,0.80) 50%, rgba(5,14,45,0.96) 100%);
  border-top: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(4px);
}
.mega-stat {
  text-align: center;
  padding: 4px 12px;
  border-right: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.mega-stat:last-child { border-right: none; }
.mega-stat__num {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, #FFFFFF 0%, #5DA8FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
  text-shadow: 0 4px 12px rgba(93,168,255,0.20);
}
.mega-stat__lbl {
  display: block;
  margin-top: 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  .mega-hero { height: auto; min-height: 88vh; max-height: none; }
  .mega-hero__content {
    padding: 60px 20px 260px;
    justify-content: flex-end;
  }
  .mega-hero__title { font-size: clamp(34px, 9vw, 52px); }
  .mega-hero__lead { font-size: 16px; }
  .mega-hero__ctas .btn { padding: 14px 22px; font-size: 15px; flex: 1; min-width: 140px; }
  .mega-hero__nav {
    bottom: 180px;
    padding: 0 12px;
    gap: 6px;
  }
  .mega-hero__nav button { font-size: 11px; padding: 6px 12px 6px 10px; }
  .mega-hero__nav button::before { width: 6px; height: 6px; }
  .mega-hero__stats {
    padding: 14px 8px 18px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .mega-stat { padding: 4px 6px; border-right: none; }
  .mega-stat:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.08); }
  .mega-stat:nth-child(-n+2) {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 6px;
  }
  .mega-stat__num { font-size: 26px; }
  .mega-stat__lbl { font-size: 10px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .mega-hero__slide,
  .mega-hero__bg,
  .mega-hero__overlay::before,
  .float-card,
  .float-card__dot,
  .mega-hero__tag::before {
    animation: none !important;
    transition: opacity 0.3s ease !important;
  }
  .mega-hero__slide.is-active .mega-hero__bg { transform: scale(1.06); }
}
