/* ========= HOME ========= */

/* Hero */
.hero {
  border-bottom: 1px solid var(--border);
  background: #0a121d;
}
.hero-wrap {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 20px;
  padding: 36px 0;
  align-items: start;
}
.hero-text h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 44px);
}
.hero-text p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 18px;
}
.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   PROMO HERO — “stickers” (Nuevo curso de IA)
   ========================================================= */
:root {
  --promo-red: #ff3b3b;
  --promo-red-2: #e22a2a;
  --promo-yellow: #ffd233;
  --promo-yellow-2: #ffb300;
  --promo-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Contenedor principal del promo */
.promo-ia {
  display: grid;
  grid-template-columns: 1fr 280px; /* texto | stickers */
  gap: 16px;
  align-items: center;
}

.promo-ia .promo-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.promo-ia .promo-main h3 {
  margin: 4px 0 8px;
}

/* pill NUEVO */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid var(--border);
}
.pill.new {
  background: linear-gradient(135deg, var(--promo-red), var(--promo-red-2));
  color: #fff;
  border-color: #7a1010;
  box-shadow: var(--promo-shadow);
}

/* CTA del promo */
.promo-ia .promo-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Lado derecho: stickers decorativos */
.promo-ia .promo-stickers {
  position: relative;
  height: 240px;
  width: 280px;
  pointer-events: none; /* decorativos */
}

/* Estrella/estallido tipo “sale” usando clip-path */
.burst {
  --bg1: var(--promo-yellow);
  --bg2: var(--promo-yellow-2);
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px 12px;
  font-weight: 900;
  line-height: 1.05;
  color: #241d00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  background: radial-gradient(100% 100% at 50% 50%, var(--bg1), var(--bg2));
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: var(--promo-shadow);
  clip-path: polygon(
    50% 0%,
    61% 18%,
    78% 9%,
    71% 29%,
    100% 33%,
    78% 44%,
    95% 62%,
    71% 58%,
    78% 82%,
    61% 67%,
    50% 100%,
    39% 67%,
    22% 82%,
    29% 58%,
    5% 62%,
    22% 44%,
    0% 33%,
    29% 29%,
    22% 9%,
    39% 18%
  );
}

/* Posiciones/variaciones */
.b1 {
  left: 6px;
  top: -4px;
  transform: rotate(-6deg);
  width: 116px;
}
.b2 {
  right: 0;
  top: 12px;
  transform: rotate(8deg);
  width: 110px;
  --bg1: #ffcfcf;
  --bg2: #ff8f8f;
  color: #2a0b0b;
}
.b3 {
  left: 18px;
  bottom: 22px;
  transform: rotate(5deg);
  width: 120px;
}
.b4 {
  right: 12px;
  bottom: -8px;
  transform: rotate(-10deg);
  width: 126px;
}

.tag-drop {
  position: absolute;
  left: 92px;
  top: 86px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--promo-red), var(--promo-red-2));
  border: 1px solid #7a1010;
  box-shadow: var(--promo-shadow);
  transform: rotate(-3deg);
}
.tag-drop svg {
  width: 20px;
  height: 20px;
}

/* Tema claro/oscuro para buen contraste en stickers */
html[data-theme="dark"] .burst {
  color: #1b1600;
}
html[data-theme="light"] .burst {
  color: #1b1600;
}

/* micro-animación sutil */
.burst,
.tag-drop {
  transition: transform 0.2s ease;
}
.promo-ia:hover .b1 {
  transform: rotate(-8deg) translateY(-2px);
}
.promo-ia:hover .b2 {
  transform: rotate(10deg) translateY(-2px);
}
.promo-ia:hover .b3 {
  transform: rotate(7deg) translateY(-2px);
}
.promo-ia:hover .b4 {
  transform: rotate(-12deg) translateY(-2px);
}
.promo-ia:hover .tag-drop {
  transform: rotate(-4deg) translateY(-1px);
}

/* Responsive del promo */
@media (max-width: 980px) {
  .promo-ia {
    grid-template-columns: 1fr;
  }
  .promo-ia .promo-stickers {
    height: 200px;
    width: 100%;
  }
  .promo-ia .promo-stickers .b4 {
    display: none;
  }
}

/* =========================================================
   (Opcional) estilos antiguos del panel de la maestría
   — ya no se usan si migraste a .promo-ia, se dejan por compat
   ========================================================= */
.hero-summary {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 18px;
}
.mini-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
.mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--hero-pill-bg);
  border: 1px solid var(--hero-pill-bd);
}
.mini span {
  color: var(--hero-pill-label);
  font-size: 13px;
  font-weight: 600;
}
.mini strong {
  color: var(--hero-pill-value);
  font-size: 14px;
  font-weight: 700;
}

/* Secciones */
.section {
  padding: 20px 0 4px;
}
.section p {
  color: var(--muted);
  margin: 6px 0 0;
}

/* Proyectos destacados (mapeo vertical/horizontal) */
.projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Thumb por defecto (horizontal: 16:9 arriba, texto abajo) */
.project-card .thumb {
  aspect-ratio: 16 / 9;
  background: #0e1622;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Variante VERTICAL: imagen 9:16 a la izquierda + texto a la derecha */
.project-card.vertical {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 14px;
}
.project-card.vertical .thumb {
  aspect-ratio: 9 / 16;
  margin: 0; /* sin margen inferior, va a la izquierda */
}
.project-card .body h3 {
  margin: 0 0 6px;
}

/* Videos */
.videos {
  padding: 20px 0;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0e1622;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Vinculación */
.vinculacion p {
  color: var(--muted);
}

/* Patrocinadores */
.sponsor-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tier {
  position: relative;
  padding-left: 64px;
}
.medal {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0b0f14;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.4), 0 6px 14px rgba(0, 0, 0, 0.3);
}
.medal svg {
  width: 70%;
  height: 70%;
  opacity: 0.9;
}
.medal-plata {
  background: linear-gradient(135deg, #d9dfe7, #a1a9b3);
}
.medal-oro {
  background: linear-gradient(135deg, #ffe066, #d4a60a);
}
.medal-platino {
  background: linear-gradient(135deg, #e9ecf1, #bfc6d1);
}
.tier .price {
  font-weight: 800;
}

/* Secciones antiguas */
.home-sections {
  padding: 28px 0 60px;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-cards .card {
  padding: 16px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.grid-cards .card:hover {
  transform: translateY(-2px);
  background: #0e1622;
}
.grid-cards h3 {
  margin: 4px 0 6px;
}
.grid-cards p {
  margin: 0;
  color: var(--muted);
}

/* Responsive general */
@media (max-width: 980px) {
  .hero-wrap {
    grid-template-columns: 1fr;
  }
  .projects .projects-grid {
    grid-template-columns: 1fr;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .sponsor-tiers {
    grid-template-columns: 1fr;
  }

  /* En móvil, las tarjetas verticales se apilan */
  .project-card.vertical {
    grid-template-columns: 1fr;
  }
  .project-card.vertical .thumb {
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
  }
}

/* ===== Promo en el hero (estilo “estallido”) ===== */
.hero-wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr; /* texto | promo */
  align-items: center;
  gap: 22px;
}

.hero-promo {
  align-self: start;
  display: grid;
  gap: 10px;
}

.hero-promo .promo-lead {
  margin: 0;
  color: var(--muted);
}

/* Estallido */
.burst {
  position: relative;
  width: clamp(180px, 36vw, 260px);
  aspect-ratio: 1;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}
.burst svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px; /* suaviza pequeñas esquinas del trazo */
}
/* Texto encima del estallido */
.burst-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  line-height: 1.1;
  color: #2a1b00; /* alto contraste sobre amarillo */
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.burst-text .kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4c5;
  color: #3a2200;
  margin-bottom: 6px;
  border: 1px solid rgba(58, 34, 0, 0.15);
}
.burst-text strong {
  font-size: clamp(16px, 2.3vw, 22px);
}
.burst-text small {
  display: block;
  margin-top: 6px;
  opacity: 0.85;
}

/* Efecto de pulso suave (opcional) */
.burst::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 3px solid rgba(255, 193, 7, 0.25);
  animation: promoPulse 2.4s ease-in-out infinite;
}
@keyframes promoPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.65;
  }
  60% {
    transform: scale(1.05);
    opacity: 0;
  }
  100% {
    transform: scale(1.05);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-wrap {
    grid-template-columns: 1fr; /* apila */
  }
  .hero-promo {
    justify-items: start;
  }
}

/* === Sticker del Taller de IA en el hero === */
.sticker-cta {
  align-self: center; /* se alinea dentro del grid del hero */
  justify-self: end; /* empuja hacia la derecha en desktop */
  display: grid;
  place-items: center;
  width: clamp(180px, 28vw, 360px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  text-decoration: none;
  position: relative;
  transform: rotate(-8deg) scale(1);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
  animation: sticker-bob 4s ease-in-out infinite; /* pulso suave */
}

.sticker-cta img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

/* halo animado para hacerlo más “pop” */
.sticker-cta::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 219, 88, 0.4);
  animation: sticker-glow 2.6s ease-out infinite;
}

/* hover/focus: giro y zoom */
.sticker-cta:hover,
.sticker-cta:focus-visible {
  transform: rotate(6deg) scale(1.5);
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
  outline: 0;
}

/* accesibilidad foco visible */
.sticker-cta:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-2) 60%, transparent);
  border-radius: 50%;
}

/* animación: leve vaivén */
@keyframes sticker-bob {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(-2deg) translateY(-4px);
  }
}

/* animación: halo que se expande y desvanece */
@keyframes sticker-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 219, 88, 0.45);
    opacity: 0.9;
  }
  70% {
    box-shadow: 0 0 0 18px rgba(255, 219, 88, 0);
    opacity: 0;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 219, 88, 0);
    opacity: 0;
  }
}

/* responsive: en pantallas angostas centramos el sticker */
@media (max-width: 980px) {
  .sticker-cta {
    justify-self: center;
    margin-top: 16px;
  }
}
