:root {
  --primary: #ff2f92;      /* rosa del congreso */
  --primary-dark: #cc216f;
  --accent: #00b4e6;       /* celeste de las cintas */
  --accent-warm: #ffd54b;  /* amarillo fecha */
  --cta-outline: #ffb347;  /* naranja de botones secundarios */
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.8);
  --bg-overlay: rgba(0, 0, 0, 0.45);
  --card-bg: rgba(0, 0, 0, 0.60);
  --border-soft: rgba(255, 255, 255, 0.15);
  --radius-lg: 18px;
  --transition-fast: 0.2s ease-out;
  --max-width: 1080px;
}

/* Reset mínimo */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: #000;
  background-image: url("assets/fondo-mobile.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  position: relative;
}

/* Overlay para mejorar legibilidad */
.page-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 47, 146, 0.25), transparent 55%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75));
  pointer-events: none;
  z-index: -1;
}

@media (min-width: 768px) {
  body {
    background-image: url("assets/fondo-desktop.webp");
    background-attachment: fixed;
    background-position: center center;
  }
}

/* Layout principal */

.header {
  padding: 24px 16px 8px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.logo {
  max-width: min(100%, 620px);
  width: 100%;
  height: auto;
}

/* Contenido principal */

.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 16px 32px;
}

/* Hero */

.hero {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* Botones CTA (imagenes del kit de diseño) */

.cta-img {
  display: block;
  width: 100%;
  max-width: 320px;
  border-radius: 999px;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.cta-img img {
  display: block;
  width: 100%;
  height: auto;
}

.cta-img:hover,
.cta-img:focus-visible {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}

.cta-img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Botones de texto: ya no se usan en la home, quedan por si vuelve a hacer
   falta un CTA sin arte (los estilos no cuestan peso al no haber markup). */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0; /* <- sin borde por defecto */
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background-color var(--transition-fast), border-color var(--transition-fast),
              color var(--transition-fast);
  min-width: 220px;
  backdrop-filter: blur(6px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-warm));
  color: #1b0030;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-warm));
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

/* ahora sí los otros tienen borde explícito */
.btn.secondary,
.btn.outline {
  background-color: transparent;
  color: var(--cta-outline);
  border: 1px solid var(--cta-outline);
}

.btn.secondary:hover,
.btn.secondary:focus-visible,
.btn.outline:hover,
.btn.outline:focus-visible {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

/* Secciones */

.section-title {
  text-align: left;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Speakers (carrusel con autoplay) */

.speakers-section {
  position: relative;
  margin-bottom: 32px;
}

.speakers-track {
  --card-basis: 100%;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-left: 52px;
  padding: 2px 52px 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.speakers-track::-webkit-scrollbar {
  display: none;
}

.speaker-card {
  flex: 0 0 var(--card-basis);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background-color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.speaker-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Deja que la ultima tarjeta llegue al borde izquierdo. Sin esto el scroll
   termina con las ultimas 3 en pantalla y el contador nunca llega a 31. */
.speakers-track::after {
  content: "";
  flex: 0 0 calc(100% - var(--card-basis));
}

.speakers-counter {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) and (max-width: 959px) {
  .speakers-track {
    --card-basis: calc((100% - 14px) / 2);
  }
}

/* A diferencia del track de videos, este NO pasa a grid en desktop: el
   autoplay necesita algo que scrollear. */
@media (min-width: 960px) {
  .speakers-track {
    --card-basis: calc((100% - 28px) / 3);
  }
}

/* Video (carrusel horizontal compacto) */

.video-section {
  position: relative;
  margin-bottom: 32px;
}

.video-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px 52px 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.video-track::-webkit-scrollbar {
  display: none;
}

.video-wrapper {
  position: relative;
  display: block;
  flex: 0 0 calc(100% - 104px);
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.video-wrapper::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.video-wrapper iframe,
.video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-preview {
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: #0a0a0a;
  color: var(--text-main);
  text-align: left;
}

.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08) 54%, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.video-play-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.video-play-badge::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
  margin-left: 1px;
}

.video-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  z-index: 1;
}

.video-preview:hover .video-play-badge,
.video-preview:focus-visible .video-play-badge {
  transform: scale(1.06);
  border-color: var(--accent);
}

/* Flechas del carrusel */
.video-nav,
.speakers-nav {
  position: absolute;
  top: 56%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.video-nav:hover,
.video-nav:focus-visible,
.speakers-nav:hover,
.speakers-nav:focus-visible {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.04);
}

.video-nav:disabled,
.speakers-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.video-nav.prev,
.speakers-nav.prev {
  left: 10px;
}

.video-nav.next,
.speakers-nav.next {
  right: 10px;
}

/* La seccion de speakers tiene titulo arriba y contador abajo: corrijo el
   centro para que las flechas queden sobre las tarjetas. */
.speakers-nav {
  top: calc(50% + 8px);
}

@media (min-width: 960px) {
  .video-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 2px 10px 10px;
    overflow: visible;
  }

  .video-wrapper {
    flex: initial;
    width: 100%;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .video-wrapper {
    flex-basis: calc((100% - 14px - 104px) / 2);
  }
}

/* Sponsors */

.sponsors-section {
  margin-bottom: 32px;
}

/* Sponsors (transparent default, card style optional) */
.sponsors-wrapper {
  padding: 0;
  background-color: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Si mañana nos pasan sponsors transparentes, agregá esta clase en HTML: sponsors-wrapper sponsors-card */
.sponsors-wrapper.sponsors-card {
  padding: 14px 18px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-soft);
}

.sponsors-image {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* CTA final */

.final-cta-section {
  margin-bottom: 28px;
}

.final-cta-buttons {
  gap: 14px;
}

/* Contacto */

.contact-section {
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  gap: 14px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background-color: var(--card-bg);
  text-decoration: none;
  color: var(--text-main);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background-color: rgba(0, 0, 0, 0.78);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}

.contact-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Breakpoints */

@media (min-width: 600px) {
  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn {
    min-width: auto;
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .main-content {
    padding-bottom: 48px;
  }

  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .speakers-section,
  .video-section,
  .sponsors-section,
  .contact-section {
    margin-bottom: 40px;
  }
}

/* Movimiento reducido: sin autoplay (lo apaga el JS) y sin scroll animado. */
@media (prefers-reduced-motion: reduce) {
  .speakers-track {
    scroll-behavior: auto;
  }
}
