/* --- Variables y Reset --- */
:root {
  --bg-page: #03070b; /* Fondo oscuro de toda la página */
  --bg-box: #0a1118; /* Fondo de la caja central */
  --text-light: #ffffff;
  --primary-blue: #328af1;
  --primary-blue-hover: #2270cc;
  --cyan: #26c6da;
  --font-main: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --knc-blue: #1ea0fb; /* El azul brillante de tu marca */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-light);
  padding: 1.5rem 0;
  /* Imagen para el fondo exterior absoluto */
  background: url("ImagenesFondos/FondoT2.jpg") no-repeat center center fixed;
  background-size: cover;

  /* ================= RESPONSIVE: NAVBAR ================= */
  @media screen and (max-width: 850px) {
    .menu-toggle {
      display: block !important; /* Fuerza a que aparezcan las 3 rayitas */
    }

    .nav-links {
      display: none !important; /* Fuerza a que el menú esté oculto por defecto */
      flex-direction: column;
      position: absolute;
      top: 80px; /* Ajusta este valor si tu barra de arriba es más alta o baja */
      left: 0;
      width: 100%;
      background-color: #04101e;
      padding: 20px 0;
      box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
      z-index: 999;
    }

    .nav-links a {
      padding: 15px 20px;
      text-align: center;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Esta clase se activa con el JavaScript al hacer clic */
    .nav-links.activo {
      display: flex !important; /* Fuerza a que aparezca SOLO cuando haces clic */
      flex-direction: column !important;
    }
  }

  /* --- Caja Central --- */
  .central-box {
    max-width: 1700px;
    margin: 0 auto;
    background-color: var(--bg-box);
    border-radius: 20px;
    overflow: hidden; /* Mantiene las imágenes dentro de los bordes curvos */
    /*box-shadow: 0 0 80px 30px rgba(0, 0, 0, 0.8); /* Desvanecimiento hacia el fondo */
    position: relative;
    background-color: #0a1118; /* Color azul oscuro sólido */
  }

  /* 1. Añade esta nueva clase para el brillo del texto */
  .resplandor-azul {
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
  }
  /* --- Botones Globales --- */
  .btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  /* 4. Reemplaza .btn-primary para pasar del color sólido al degradado brillante */
  .btn-primary {
    background: linear-gradient(90deg, #0055ff 0%, #00d4ff 100%);
    color: var(--text-light);
    border: none;
    box-shadow: 0 8px 20px rgba(0, 150, 255, 0.4);
  }
  .btn-primary:hover {
    background: linear-gradient(90deg, #0044cc 0%, #00b8e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 150, 255, 0.6);
  }
  .btn-pill {
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
  }
  .btn-block {
    width: 100%;
    max-width: 380px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.05rem;
  }

  /* --- 1. Navegación --- */
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background-color: rgba(6, 17, 24, 0.95);
    position: absolute; /* Superpuesto al hero */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
  }
  /* Estilos para el contenedor del logo (opcional, para centrar verticalmente) */
  .logo-navbar {
    display: flex;
    align-items: center;
    text-decoration: none;
  }

  /* Estilos específicos para la imagen del logo en el menú */
  .nav-logo-img {
    height: 52px; /* Ajusta este valor (entre 30px y 50px suele ser ideal) */
    width: auto; /* Mantiene la proporción original del logo sin deformarlo */
    object-fit: contain;
  }
  .logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .nav-links {
    display: flex;
    gap: 2rem;
  }
  .nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
  }
  .nav-links a:hover {
    color: var(--primary-blue);
  }
  .menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
  }

  /* --- 1. Portada (Hero) --- */
  .hero-section {
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url("ImagenesFondos/FondoPrincipal.jpeg") no-repeat center
      center/cover;
    /*padding-top: 80px; /* Espacio para el navbar */
    margin-bottom: 2rem;
  }

  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 12, 20, 0.7);
    z-index: 1;
  }

  /* 2. Modifica .hero-content: quita el background-color para que el texto flote limpio sobre el fondo general */
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 4rem 4rem;
    background-color: transparent; /* Eliminamos el rgba(10, 17, 40, 0.6) que oscurecía la caja */
  }

  .hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    padding: 1rem;
  }
  .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.3rem;
    color: #e0e0e0;
  }
  .texto-portada {
    font-size: 1.2rem;
    margin-bottom: 2.3rem;
    color: #e0e0e0;
  }
  .play-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 3rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .play-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: scale(1.05);
  }
  .play-icon {
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #ffffff;
    margin-left: 5px;
  }
  .cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }
  .btn-secondary {
    background-color: transparent;
    color: var(--text-light);
  }
  .btn-secondary:hover {
    text-decoration: underline;
  }

  /* --- Video Central en Portada --- */
  .hero-video-wrapper {
    margin: 0 auto 3rem auto;
    max-width: 800px; /* Un ancho generoso para el rectángulo horizontal */
    aspect-ratio: 16 / 9; /* ESTA ES LA CLAVE: fuerza el rectángulo horizontal fijo */
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow:
      0 0 30px rgba(0, 150, 255, 0.3),
      inset 0 0 20px rgba(0, 150, 255, 0.1);
    background-color: #000;
    transition: box-shadow 0.3s ease;
    position: relative; /* Necesario para que el video no se escape */
  }

  .hero-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que tanto el poster como el video llenen el marco sin deformarse */
    display: block;
  }

  .hero-video-wrapper:hover {
    box-shadow:
      0 0 45px rgba(0, 212, 255, 0.4),
      inset 0 0 25px rgba(0, 212, 255, 0.2);
  }

  /* Ajuste para pantallas móviles */
  @media (max-width: 768px) {
    .hero-video-wrapper {
      margin-bottom: 2rem;
      border-radius: 8px;
    }
  }

  /* Ocultar el icono de hamburguesa en computadoras por defecto */
  .menu-toggle {
    display: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
  }
}
