/* ===== PANEL ANUNCIO GESDEP 4.0 (solo index.html) =====
 * Réplica del panel de la tienda (shop.gestiondeportiva) adaptado a la web corporativa:
 * cabecera con título, carousel infinito de capturas, visor ampliado y sello "IA Gesdep".
 * La lógica del carousel/visor/sello vive en js/gesdep4.js.
 */

.gesdep4-panel {
  position: relative;
  /* Mismo fondo que el hero (foto del estadio fija) para que el panel parezca "transparente"
     y continúe la imagen de la parte superior */
  background-image: url("img/estadio.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #ffffff;
  padding: 4rem 0 3rem;
  overflow: hidden;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

/* Capa oscura sobre la foto, igual que en el hero, para que el texto siga legible */
.gesdep4-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.gesdep4-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.gesdep4-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c7d2fe;
  border: 1px solid rgba(199, 210, 254, 0.4);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.25rem;
}

.gesdep4-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 0.75rem;
  color: #ffffff;
  line-height: 1.1;
}

.gesdep4-version {
  background: conic-gradient(from 140deg at 55% 45%, #3b82f6, #6366f1, #a855f7, #7c3aed, #3b82f6 360deg);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gesdep4-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #e0e7ff;
  max-width: 1000px;
  margin: 0 auto;
}

/* Carousel infinito: la pista contiene las imágenes duplicadas y se desplaza en bucle.
   El movimiento (crucero + arrastre + inercia) lo lleva js/gesdep4.js vía requestAnimationFrame. */
.gesdep4-carousel {
  position: relative;
  z-index: 2;
  margin-top: 2.5rem;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gesdep4-carousel:active {
  cursor: grabbing;
}

.gesdep4-carousel-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.gesdep4-carousel-img {
  /* ~3-4 imágenes visibles: cada una ocupa algo más de 1/4 del ancho de pantalla */
  width: calc(28vw - 1.25rem);
  /* La foto se estira para llenar el marco (fill): nunca se recorta, como mucho se ensancha un poco */
  aspect-ratio: 1.8;
  object-fit: fill;
  border-radius: 12px;
  margin-right: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
}

/* Visor de imagen ampliada */
.gesdep4-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 12, 41, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.gesdep4-lightbox.is-open {
  display: flex;
}

.gesdep4-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.gesdep4-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gesdep4-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== SELLO PROMO "IA GESDEP" (estrella) ===== */
.ia-promo-badge {
  position: absolute;
  top: 50px;
  /* Pegado al borde derecho del contenido (1000px centrado), sin salirse en pantallas justas */
  right: max(2%, calc(50% - 640px));
  width: 180px;
  height: 180px;
  /* Brillo metálico (gloss) sobre el degradado cónico violeta/azul, igual que el sello de la tienda.
     El velo radial intermedio funde el punto donde convergen los colores del cónico para que no se note su centro. */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 32%, transparent 48%, rgba(30, 10, 80, 0.22) 100%),
    radial-gradient(circle at 55% 45%, #8b5cf6 0%, rgba(139, 92, 246, 0.9) 12%, rgba(139, 92, 246, 0.45) 32%, rgba(139, 92, 246, 0) 58%),
    conic-gradient(from 140deg at 55% 45%, #3b82f6, #6366f1, #a855f7, #d946ef, #7c3aed, #3b82f6 360deg);
  clip-path: polygon(50.00% 0.00%, 58.19% 8.81%, 69.13% 3.81%, 73.33% 15.08%, 85.36% 14.64%, 84.92% 26.67%, 96.19% 30.87%, 91.19% 41.81%, 100.00% 50.00%, 91.19% 58.19%, 96.19% 69.13%, 84.92% 73.33%, 85.36% 85.36%, 73.33% 84.92%, 69.13% 96.19%, 58.19% 91.19%, 50.00% 100.00%, 41.81% 91.19%, 30.87% 96.19%, 26.67% 84.92%, 14.64% 85.36%, 15.08% 73.33%, 3.81% 69.13%, 8.81% 58.19%, 0.00% 50.00%, 8.81% 41.81%, 3.81% 30.87%, 15.08% 26.67%, 14.64% 14.64%, 26.67% 15.08%, 30.87% 3.81%, 41.81% 8.81%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(8deg);
  z-index: 3;
  overflow: hidden;
}

/* Anillo interior de perlas (puntos) con halo suave, efecto "sello" */
.ia-promo-badge::before {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 3px dotted rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.12),
    inset 0 0 22px rgba(255, 255, 255, 0.22),
    0 0 0 3px rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

/* Destello que recorre el sello periódicamente */
.ia-promo-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(65deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%);
  transform: translateX(120%);
  animation: iaPromoShine 4.2s ease-in-out 1.4s infinite;
  pointer-events: none;
}

@keyframes iaPromoShine {
  0%, 55% { transform: translateX(120%); }
  75%, 100% { transform: translateX(-120%); }
}

.ia-promo-badge-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 1.5rem;
  gap: 0.15rem;
  text-shadow: 0 1px 2px rgba(30, 10, 80, 0.45), 0 0 10px rgba(255, 255, 255, 0.25);
}

.ia-promo-line1 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ia-promo-line2 {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.15;
}

.ia-promo-note {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.9;
}

/* "Prueba Gratis" en una sola línea dentro del sello (texto más largo que "Gratis 3 meses") */
.ia-promo-line2-trial {
  font-size: 0.95rem;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Variante del hero: "Prueba" arriba, "IAgo GRATIS" grande en medio (se respeta la grafía "IAgo") */
.ia-promo-line1-hero {
  font-size: 0.8rem;
  letter-spacing: 2px;
  opacity: 0.95;
}

.ia-promo-line2-hero {
  font-size: 1.12rem;
  font-weight: 900;
  text-transform: none;
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.1;
}

/* "go" de IAgo en naranja Gesdep (#f2964e, --primary-color de la tienda) */
.ia-promo-go {
  color: #f2964e;
  text-shadow: 0 1px 2px rgba(30, 10, 80, 0.55), 0 0 10px rgba(242, 150, 78, 0.45);
}

/* Fecha de la promo temporal (hasta 31/12/2026): algo más visible que la nota estándar */
.ia-promo-note-date {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 1;
  line-height: 1.2;
}

/* ===== PROMO CÓDIGO PROMOV4 (sello dorado + píldora con el código, espejo del sello de IA) ===== */
.launch-code-promo {
  position: absolute;
  top: 50px;
  /* Pegado al borde izquierdo del contenido, simétrico al sello de IA */
  left: max(2%, calc(50% - 640px));
  width: 180px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Estrella dorada */
.launch-code-badge {
  position: relative;
  width: 180px;
  height: 180px;
  /* Brillo metálico (gloss) sobre un degradado cónico dorado.
     El velo radial intermedio funde el punto donde convergen los colores del cónico para que no se note su centro. */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.10) 32%, transparent 48%, rgba(120, 70, 0, 0.14) 100%),
    radial-gradient(circle at 55% 45%, #f0c85a 0%, rgba(240, 200, 90, 0.9) 12%, rgba(240, 200, 90, 0.45) 32%, rgba(240, 200, 90, 0) 58%),
    conic-gradient(from 140deg at 55% 45%, #f9d976, #e2b13c, #b8860b, #ffd95a, #fff3b0, #d4a017, #f9d976 360deg);
  clip-path: polygon(50.00% 0.00%, 58.19% 8.81%, 69.13% 3.81%, 73.33% 15.08%, 85.36% 14.64%, 84.92% 26.67%, 96.19% 30.87%, 91.19% 41.81%, 100.00% 50.00%, 91.19% 58.19%, 96.19% 69.13%, 84.92% 73.33%, 85.36% 85.36%, 73.33% 84.92%, 69.13% 96.19%, 58.19% 91.19%, 50.00% 100.00%, 41.81% 91.19%, 30.87% 96.19%, 26.67% 84.92%, 14.64% 85.36%, 15.08% 73.33%, 3.81% 69.13%, 8.81% 58.19%, 0.00% 50.00%, 8.81% 41.81%, 3.81% 30.87%, 15.08% 26.67%, 14.64% 14.64%, 26.67% 15.08%, 30.87% 3.81%, 41.81% 8.81%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
  overflow: hidden;
}

/* Anillo interior punteado, efecto "sello" */
.launch-code-badge::before {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px dashed rgba(92, 61, 0, 0.45);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 220, 0.35);
  pointer-events: none;
}

/* Destello que recorre el sello periódicamente */
.launch-code-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.65) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: launchCodeShine 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes launchCodeShine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

.launch-code-badge-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #4a2f00;
  padding: 1.5rem;
  gap: 0;
  text-shadow: 0 1px 0 rgba(255, 250, 220, 0.6);
}

.launch-code-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  line-height: 1;
  opacity: 0.85;
  margin-bottom: 0.15rem;
}

.launch-code-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.1;
  white-space: nowrap;
}

.launch-code-percent {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

/* Fecha de la promo temporal (hasta 31/12/2026), igual que en el sello de IA */
.launch-code-note {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* Píldora con el código: grande, bajo el sello y solapando ligeramente su borde inferior */
.launch-code-pill {
  position: relative;
  z-index: 2;
  margin-top: -1.1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #4a2f00 0%, #2a1900 100%);
  border: 2px solid #ffe08a;
  color: #ffe08a;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(34, 20, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

/* Contenedor de los sellos: en escritorio no genera caja (los sellos se posicionan de forma absoluta) */
.hero-promo-badges {
  display: contents;
}

/* Por debajo de 1200px los sellos anclados a los bordes pisarían el subtítulo (1000px de ancho),
   así que pasan al flujo normal, centrados bajo el texto */
@media (max-width: 1199px) {
  .hero-promo-badges {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem 1.5rem;
    margin-top: 1.5rem;
    padding: 0 20px;
  }

  .ia-promo-badge,
  .launch-code-promo {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin: 0;
    transform: rotate(0deg);
    width: 160px;
    height: auto;
  }

  .ia-promo-badge,
  .launch-code-badge {
    width: 160px;
    height: 160px;
  }

  .launch-code-badge {
    transform: rotate(0deg);
  }
}

@media (max-width: 768px) {
  .gesdep4-panel {
    padding: 3rem 0 2.5rem;
  }

  .gesdep4-title {
    font-size: 2.5rem;
  }

  .gesdep4-carousel-img {
    /* En móvil caben 2 imágenes a la vez */
    width: calc(50vw - 1.25rem);
  }

  .gesdep4-lightbox {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-code-badge::after,
  .ia-promo-badge::after {
    animation: none;
  }
}

/* El JS oculta los sellos a partir del 1/1/2027 (fin de promo 31/12/2026); [hidden] debe ganar al display:flex */
.ia-promo-badge[hidden],
.launch-code-promo[hidden] {
  display: none;
}
