/* -----------------------------------------------------------
           1. VARIABLES & RESET
        ----------------------------------------------------------- */
:root {
  --color-light-blue: #8ecae6;
  --color-med-blue: #219ebc;
  --color-dark-blue: #023047;
  --color-yellow: #ffb703;
  --color-orange: #fb8500;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Rubik", sans-serif;

  --border-radius: 2rem;
  --transition-speed: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: #ffffff;
  background-color: var(--color-dark-blue);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-speed);
}

/* -----------------------------------------------------------
           2. ANIMACIONES (NUEVO)
        ----------------------------------------------------------- */

/* Animación de entrada (Fade In + Slide Up con rebote) */
@keyframes fadeInUpBounce {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px); /* El pequeño rebote hacia arriba */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación del Subrayado (Efecto Highlight) */
@keyframes expandHighlight {
  0% {
    background-size: 0% 100%;
    color: var(--color-light-blue); /* Color inicial del texto */
  }
  100% {
    background-size: 100% 100%;
    color: var(
      --color-dark-blue
    ); /* El texto cambia a oscuro para leerse sobre el fondo claro */
  }
}

/* -----------------------------------------------------------
           3. COMPONENTES REUTILIZABLES
        ----------------------------------------------------------- */
.container {
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--color-orange);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 1rem 1rem;
}

.btn-primary:hover {
  background-color: var(--color-yellow);
  color: var(--color-dark-blue);
  transform: translateY(-0.25rem);
}

/* Botón Circular (WhatsApp) */
.btn-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--color-light-blue);
  background-color: rgba(2, 48, 71, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-circle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.btn-circle:hover {
  /* background-color: var(--color-light-blue); */
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 15px rgba(142, 202, 230, 0.4);
}

/* -----------------------------------------------------------
           3. HEADER
        ----------------------------------------------------------- */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10; /* Header por encima de todo */
  padding: 1.5rem 0;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  color: #ffffff;
  letter-spacing: -1px;
}

.header__logo span {
  color: var(--color-light-blue);
}

/* -----------------------------------------------------------
           4. HERO SECTION (CON VIDEO)
        ----------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden; /* Importante para recortar el video si sobra */
  background-color: var(--color-dark-blue); /* Fallback por si el video falla */
}

/* 1. EL VIDEO DE FONDO */
.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 0; /* Al fondo del todo */
  transform: translate(-50%, -50%); /* Centrado perfecto */
  object-fit: cover; /* Asegura que cubra toda el área sin deformarse */
}

/* 2. EL DEGRADADO OSCURO (OVERLAY) */
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Encima del video, debajo del texto */
  background: linear-gradient(
    to bottom,
    rgba(2, 48, 71, 0.85),
    /* Color oscuro semi-transparente arriba */ rgba(2, 48, 71, 0.75)
      /* Color oscuro semi-transparente abajo */
  );
}

/* 3. EL CONTENIDO (TEXTO) */
.hero__content {
  position: relative;
  z-index: 2; /* Encima del overlay */
  max-width: 800px;
  margin: 0 auto;
  margin-top: 10rem;
}

/* TÍTULO ANIMADO */
.hero__title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.2;

  /* Aplicamos la animación de entrada */
  opacity: 0; /* Empieza invisible */
  animation: fadeInUpBounce 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.2s; /* Pequeña pausa antes de empezar */
}

/* ESTILO DEL HIGHLIGHT */
.highlight {
  display: inline-block;
  position: relative;
  text-decoration: none;
  padding: 0 0.2em; /* Un poco de aire a los lados */
  border-radius: var(--border-radius);

  /* Configuramos el gradiente pero con tamaño 0 al inicio */
  background-image: linear-gradient(
    to right,
    var(--color-light-blue),
    var(--color-light-blue)
  );
  background-repeat: no-repeat;
  background-size: 0% 100%; /* Empieza sin ancho */
  background-position: left center;

  /* Animación del highlight */
  animation: expandHighlight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 1s; /* Se activa DESPUÉS de que el título haya aparecido */
}

.hero__subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: #e0e0e0;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;

  /* Animación sutil para el subtítulo también */
  opacity: 0;
  animation: fadeInUpBounce 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.6s;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  /* Animación para los botones */
  opacity: 0;
  animation: fadeInUpBounce 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.8s;
}

.hero__guarantee {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-yellow);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* -----------------------------------------------------------
           5. MEDIA QUERIES
        ----------------------------------------------------------- */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  .hero__title {
    font-size: 3rem;
  }
  .hero__subtitle {
    font-size: 1.25rem;
  }
  .btn-circle {
    width: 56px;
    height: 56px;
  }
  .btn-circle img {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1140px;
  }
  .header {
    padding: 2rem 0;
  }
  .hero__title {
    font-size: 3rem;
  }
  .hero__subtitle {
    font-size: 1.5rem;
  }
  .btn-primary {
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
  }
}
