/* --- VARIABLES Y TOKENS DE DISEÑO --- */
:root {
  /* Paleta de Colores Premium / Dark Mode */
  --color-bg-main: #0B1120;
  --color-bg-secondary: #0F172A;
  --color-surface: rgba(30, 41, 59, 0.6);
  --color-surface-hover: rgba(30, 41, 59, 0.8);
  --color-border: rgba(255, 255, 255, 0.1);

  --color-primary-text: #F8FAFC;
  --color-secondary-text: #94A3B8;

  --color-accent: #F59E0B;
  /* Dorado/Ambar elegante */
  --color-accent-hover: #D97706;
  --color-accent-glow: rgba(245, 158, 11, 0.3);

  /* Tipografías Modernas */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BASIC STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

body {
  background-color: var(--color-bg-main);
  color: var(--color-primary-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* --- TIPOGRAFÍA --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
  color: var(--color-secondary-text);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* --- COMPONENTES GLOBALES --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: 8rem 0;
}

/* Utils: Glassmorphism */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Texto resaltado */
.text-accent {
  color: var(--color-accent);
}

.text-gradient {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #000;
  box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--color-accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- ANIMACIONES ON SCROLL --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- NAVBAR --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition-normal);
  background: linear-gradient(to bottom, rgba(11, 17, 32, 0.9) 0%, rgba(11, 17, 32, 0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

header.scrolled {
  padding: 0.75rem 0;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo {
  height: 150px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-fast);
}

.logo-brand i {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--color-primary-text);
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary-text);
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  /* offset navbar */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transform: scale(1.05);
  /* previene bordes blancos en blur */
}

/* Overlay gradient radial superior e inferior oscuro */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--color-bg-main) 100%),
    linear-gradient(to bottom, transparent 60%, var(--color-bg-main) 100%);
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease forwards;
}

.hero-content p {
  font-size: 1.25rem;
  color: #E2E8F0;
  margin-bottom: 2.5rem;
  animation: fadeUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeUp 1s ease 0.4s forwards;
  opacity: 0;
}

/* --- SECCIÓN VIDEOS --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.video-card {
  padding: 1.5rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-10px);
  background: var(--color-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.video-thumbnail {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(4px);
  transition: var(--transition-normal);
}

.video-card:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.video-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
  color: var(--color-secondary-text);
  flex-grow: 1;
}

/* --- SECCIONES SPLIT CONTENIDO --- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-image {
  border-radius: 24px;
  position: relative;
}

.split-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.split-image img {
  border-radius: 24px;
  object-fit: cover;
  height: 500px;
  width: 100%;
}

.split-text h2 {
  margin-bottom: 1.5rem;
}

.split-text .badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* --- CTA SECTION --- */
.cta-section {
  position: relative;
  text-align: center;
  padding: 8rem 0;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
}

/* --- NOSOTROS (TIMELINE / HISTORIA) --- */
.history-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  position: relative;
}

/* Línea conectora virtual */
.history-grid::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
  opacity: 0.3;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-left: 3rem;
  position: relative;
}

@media(min-width: 768px) {
  .history-grid::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .history-item {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding-left: 0;
    align-items: center;
  }

  .history-item:nth-child(even) .history-content {
    order: -1;
    text-align: right;
  }

  .history-item::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    border: 4px solid var(--color-bg-main);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent-glow);
  }
}

.history-img-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.history-img-wrapper img {
  height: 400px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.history-img-wrapper:hover img {
  transform: scale(1.05);
}

/* --- FORMULARIO DE CONTACTO --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-text h4 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.contact-form {
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-primary-text);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-primary-text);
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 4rem;
}

/* --- FOOTER --- */
footer {
  background-color: var(--color-bg-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary-text);
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--color-secondary-text);
  transition: var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-accent);
}

.social-icons-footer {
  display: flex;
  gap: 1rem;
}

.social-icons-footer a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: 50%;
  color: var(--color-primary-text);
  border: 1px solid var(--color-border);
  transition: var(--transition-fast);
}

.social-icons-footer a:hover {
  background: var(--color-accent);
  color: #000;
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-secondary-text);
  font-size: 0.875rem;
}

/* Whatsapp Flotante */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #128C7E;
}

/* --- CARRUSELES INFINITOS CSS --- */
.carousel-container {
  overflow: hidden;
  width: 100%;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mb-4 {
  margin-bottom: 2rem;
}

.carousel-container::before,
.carousel-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 10%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.carousel-container::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg-main) 0%, transparent 100%);
}

.carousel-container::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg-main) 0%, transparent 100%);
}

.carousel-track {
  display: flex;
  width: calc(400px * 6);
  /* 3 imgs + 3 copias */
}

.carousel-track img {
  width: 400px;
  height: 250px;
  object-fit: cover;
  flex-shrink: 0;
  border-right: 5px solid var(--color-bg-main);
  transition: transform 0.5s ease;
}

.carousel-container:hover img {
  opacity: 0.8;
}

.carousel-container img:hover {
  opacity: 1;
  transform: scale(1.02);
}

.track-left {
  animation: scrollLeft 25s linear infinite;
}

.track-right {
  animation: scrollRight 25s linear infinite;
}

.carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

/* --- KEYFRAMES --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-400px * 3));
  }
}

@keyframes scrollRight {
  0% {
    transform: translateX(calc(-400px * 3));
  }

  100% {
    transform: translateX(0);
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .split-section.reverse .split-image {
    order: -1;
    /* image on top on mobile */
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Ajuste Carrusel MD */
  .carousel-track {
    width: calc(300px * 6);
  }

  .carousel-track img {
    width: 300px;
    height: 200px;
  }

  @keyframes scrollLeft {
    0% {
      transform: translateX(0);
    }

    100% {
      transform: translateX(calc(-300px * 3));
    }
  }

  @keyframes scrollRight {
    0% {
      transform: translateX(calc(-300px * 3));
    }

    100% {
      transform: translateX(0);
    }
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-bg-secondary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  /* Ajuste Carrusel SM */
  .carousel-track {
    width: calc(220px * 6);
  }

  .carousel-track img {
    width: 220px;
    height: 160px;
  }

  @keyframes scrollLeft {
    0% {
      transform: translateX(0);
    }

    100% {
      transform: translateX(calc(-220px * 3));
    }
  }

  @keyframes scrollRight {
    0% {
      transform: translateX(calc(-220px * 3));
    }

    100% {
      transform: translateX(0);
    }
  }
}