:root {
  --text-color: #ffffff;
  --text-secondary: #a1a1aa;
  --bg-color: #0a0a0a;
  --bg-section: #111111;
  --primary-accent: #ffffff;
  --secondary-accent: #18181b;
  --accent-gradient: linear-gradient(135deg, #ffffff 0%, #d4d4d8 100%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --border-radius: 16px;
}

body {
  font-family: 'Tenor Sans', 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

h1, h2, p {
  margin: 0;
}

a {
  text-decoration: none;
}

/* ===== HORIZONTAL SCROLL SECTIONS - CORREGIDO ===== */
.horizontal-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-section);
}

.horizontal-container {
  position: relative; /* CAMBIO: de absolute a relative */
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.horizontal-content {
  display: flex;
  height: 100%;
  width: fit-content; /* CAMBIO: de fit-content a max-content para permitir scroll */
  will-change: transform;
  align-items: center; /* AÑADIDO: centrar verticalmente */
  min-width: 300vw; /* Para 3 elementos = 3 * 100vw */
}

.horizontal-item {
  flex: 0 0 100vw; /* Mantener el ancho fijo */
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  min-width: 100vw;
}

.horizontal-card {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 90vw;
  max-width: 1200px;
  background: #1c1c1c;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.horizontal-card.reverse {
  flex-direction: row-reverse;
}

/* ELIMINADO: reverse-direction conflictivo */
/* La clase .reverse-direction estaba causando problemas */

.horizontal-card > div,
.horizontal-card > video {
  flex: 1 1 50%;
  max-width: 50%;
}

.horizontal-video {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  cursor: pointer; /* AÑADIDO: indicar que es clickeable */
}

.section-title-fixed {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem; /* AÑADIDO: espacio antes del botón */
}

/* CTA Button */
.cta-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem; /* AÑADIDO: espacio superior */
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

/* Footer */
.footer-section {
  background: #000;
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.content-block {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-top: 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-item {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-icon {
  width: 20px;
  height: 20px;
  background: var(--accent-gradient);
  border-radius: 50%;
}

.feature-text a {
  color: #fff;
  text-decoration: underline;
}

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.video-modal video {
  width: 90%;
  max-height: 80%;
  border-radius: var(--border-radius);
}

.video-modal .close-button {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* ===== MOBILE RESPONSIVE - MEJORADO ===== */
@media (max-width: 768px) {
  .horizontal-section {
    height: auto !important;
    overflow: visible !important;
  }

  .horizontal-container {
    height: auto !important;
    overflow: visible !important;
  }

  .horizontal-content {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    min-width: auto !important;
  }

  .horizontal-item {
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    padding: 2rem 1rem !important;
    margin-bottom: 2rem !important;
    min-width: auto !important;
  }

  .horizontal-card {
    flex-direction: column !important;
    text-align: center !important;
    width: 100% !important;
  }

  .horizontal-card.reverse {
    flex-direction: column !important;
  }

  .horizontal-card > div,
  .horizontal-card > video {
    flex: none !important;
    max-width: 100% !important;
  }

  .horizontal-video {
    width: 100% !important;
    margin-bottom: 1rem !important;
  }
}
