/* ===================================================
   ANIMACIÓN HOVER PARA LAS CARACTERÍSTICAS (FEATURES)
   =================================================== */

/* 1. Estado inicial: El texto está oculto y un poco desplazado hacia abajo */
.price__items .price__features {
  opacity: 0;
  transform: translateY(15px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  will-change: opacity, transform;
}

/* 2. Efecto al pasar el mouse por la tarjeta completa (Recomendado)
      Esto hace que al poner el cursor en la tarjeta, aparezcan todas las líneas en cascada */
.card__item:hover .price__features {
  opacity: 1;
  transform: translateY(0);
}

/* 3. Opcional: Efecto de cascada (delay) para que aparezcan una por una */
.card__item:hover .price__features:nth-child(1) {
  transition-delay: 0.1s;
}
.card__item:hover .price__features:nth-child(2) {
  transition-delay: 0.2s;
}
.card__item:hover .price__features:nth-child(3) {
  transition-delay: 0.3s;
}

/* ==========================================================================
   📱 RESPONSIVE DESIGN COMPLETO (TODAS LAS PANTALLAS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PANTALLAS MUY PEQUEÑAS (Mobile XS: 0px a 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --padding-container: 40px 15px; /* Reducción de paddings drástica para no robar espacio */
  }

  body {
    padding-top: 80px; /* Ajuste por header más compacto */
  }

  /* Navegación */
  .nav {
    height: 80px;
    padding: 0 15px;
  }

  .brand-logo__img {
    height: 55px !important; /* Logo más pequeño */
  }

  /* Menú Hamburguesa obligatorio en estas pantallas */
  .nav__menu {
    display: block !important;
  }

  .nav__link {
    position: fixed;
    background-color: #000000;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    display: flex !important;
    flex-direction: column !important;
    justify-content: center;
    gap: 40px;
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
    padding: 20px;
  }

  /* Clase activa que pondrás con JavaScript al abrir el menú */
  .nav__link.is-active {
    transform: translateX(0);
  }

  /* Hero Section */
  .hero,
  .hero__container {
    height: auto !important;
    min-height: 100vh;
  }

  .hero__content-wrapper {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero__title {
    font-size: 1.8rem !important;
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: 1rem !important;
    padding: 8px 12px !important;
  }

  .hero__highlight {
    font-size: 1.1rem !important;
  }

  .hero__description {
    font-size: 1rem !important;
  }

  .cta {
    width: 95% !important;
    padding: 16px 20px !important;
    font-size: 18px !important;
  }

  /* Servicios (Carrusel) */
  .services .subtitle {
    font-size: 2.2rem !important;
  }

  .services__description {
    font-size: 16px !important;
    padding: 0 10px;
  }

  .services__slider-wrapper {
    padding: 0 10px;
  }

  .services__card {
    flex: 0 0 280px; /* Tarjetas más angostas en móviles pequeños */
    height: 320px;
  }

  /* Flechas del slider ocultas en móviles (se navega haciendo scroll de lado) */
  .slider-arrow {
    display: none !important;
  }

  /* Grids de Tarjetas e Identidad */
  .card__container,
  .identity__grid {
    grid-template-columns: 1fr !important;
    padding: 0 10px;
    gap: 20px;
  }

  .card__item,
  .identity__item {
    min-height: auto !important;
    padding: 30px 15px !important;
  }

  /* Forzar visibilidad de efectos hover en móviles */
  .price__items,
  .identity__items {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  /* Preguntas Frecuentes (FAQ) */
  .questions__title {
    font-size: 16px !important;
    padding: 20px 0;
  }

  .questions__copy {
    width: 90% !important;
  }

  .questions__offer {
    padding: 40px 20px !important;
    margin: 20px 10px 0 10px;
  }

  .questions__offer .subtitle {
    font-size: 1.6rem !important;
  }

  /* Footer */
  .footer__contact-grid {
    grid-template-columns: 1fr !important; /* Apilado vertical */
    text-align: center;
    gap: 30px;
  }

  .footer__identity-grid {
    grid-template-columns: 1fr !important; /* Apilado vertical */
    text-align: center;
    gap: 35px;
  }

  .footer__nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .nav-divider {
    display: none; /* Eliminar las barras / separadoras */
  }

  /* Botón flotante WhatsApp */
  .wpp-floating-container {
    bottom: 20px;
    right: 20px;
  }

  .wpp-menu-card {
    width: 280px;
    right: -10px;
  }
}

/* --------------------------------------------------------------------------
   2. PANTALLAS PEQUEÑAS (Móviles medianos/grandes y tablets: 481px a 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --padding-container: 50px 30px;
  }

  body {
    padding-top: 0 !important;
  }

  .nav {
    height: 90px;
  }

  .brand-logo__img {
    height: 65px !important;
  }

  /* Mostrar el icono de las 3 barras para abrir el menú */
  .nav__menu {
    display: block !important;
  }
  /* Transformar la lista en un menú desplegable de pantalla completa */
  .nav__link {
    position: fixed !important;
    background-color: #0c0c12 !important; /* Fondo oscuro idéntico al de tu diseño */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 35px !important;

    /* Efecto oculto/desplazado a la izquierda por defecto */
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 2147483647 !important;
    padding: 0;
  }
  /* FORZAR VISIBILIDAD DEL CONTENEDOR DE LA X */
  .nav__items-close {
    display: block !important;
    position: absolute !important;
    top: 30px !important;
    right: 30px !important;
    width: 30px !important;
    height: 30px !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
  }
  /* DIBUJO GEOMÉTRICO DE LA X EN EL SPAN */
  .nav__close {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
  }
  /* Línea diagonal 1 */
  .nav__close::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background-color: #ffffff !important; /* Línea Blanca */
    transform: rotate(45deg) !important;
  }
  /* Línea diagonal 2 */
  .nav__close::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background-color: #ffffff !important; /* Línea Blanca */
    transform: rotate(-45deg) !important;
  }
  /* Clase que activa el JavaScript para mostrar el menú */
  .nav__link.is-active {
    transform: translateX(0) !important;
  }

  .hero__title {
    font-size: 2.4rem !important;
  }

  .services .subtitle {
    font-size: 2.8rem !important;
  }

  .services__description {
    font-size: 18px !important;
  }

  .services__card {
    flex: 0 0 320px;
  }
  /* 1. Invertimos el orden para que la imagen quede arriba y el texto abajo */
  .knowledge__container {
    padding: 40px 20px !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 30px !important;
  }

  /* 2. Centramos todo el bloque de texto */
  .knowledge__texts {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* 3. Ajustamos el título (subtitle) para que no se corte feo */
  .knowledge__texts .subtitle {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
  }

  /* 4. Corregimos el párrafo */
  .knowledge__paragraph {
    font-size: 16px !important;
    line-height: 1.6 !important;
    width: 100% !important;
    margin-bottom: 25px !important;
  }

  /* 5. Centramos y estilizamos el botón como en la foto */
  .knowledge__btn {
    display: inline-block !important;
    width: 100% !important;
    max-width: 280px !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  /* 6. Hacemos que la imagen ocupe un tamaño óptimo en la parte superior */
  .knowledge__picture {
    width: 100% !important;
    max-width: 340px !important; /* Ajusta este valor si quieres la foto más grande o pequeña */
    margin: 0 auto !important;
  }

  /* Ajuste para el efecto de fondo (sombra/gradiente) en móvil */
  .knowledge__picture::before {
    inset: 10px -10px -10px 10px !important;
    border-radius: 24px !important;
  }
  /* ==========================================================================
   🚨 SOLUCIÓN DEFINITIVA PARA MÓVIL (FUERZA UNA SOLA COLUMNA Y QUITA EL ESPACIO LATERAL)
   ========================================================================== */

  .questions__copy {
    width: 80% !important;
  }

  .footer__contact-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
    text-align: center;
  }

  .footer__identity-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 40px;
  }
}

/* --------------------------------------------------------------------------
   3. PANTALLAS MEDIANAS (Tablets en horizontal y Laptops: 769px a 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav__link {
    gap: 15px; /* Comprimir espacio del menú para que quepa en escritorio */
  }

  .nav__links {
    font-size: 13px;
  }

  .hero__title {
    font-size: 3rem !important;
  }

  .services .subtitle {
    font-size: 3.2rem !important;
  }

  .knowledge__container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "texts picture"; /* Texto izquierda, imagen derecha */
    gap: 4rem;
    padding: 0 40px;
  }
  .knowledge__texts {
    align-items: flex-start; /* Alinea a la izquierda en PC */
    text-align: left;
  }

  /* Forzamos al contenedor a usar flex en dirección inversa (imagen arriba, texto abajo) */
  section.knowledge div.knowledge__container {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 35px !important;
    padding: 40px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Centramos el bloque de texto por completo */
  div.knowledge__texts {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  /* Evitamos que el título se rompa en letras sueltas */
  div.knowledge__texts .subtitle {
    font-size: 26px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    margin-bottom: 15px !important;
  }

  /* Ajustamos el párrafo para que no se desborde */
  p.knowledge__paragraph {
    font-size: 16px !important;
    line-height: 1.6 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 25px !important;
    text-align: center !important;
  }

  /* Centramos y limitamos el ancho del botón */
  a.knowledge__btn {
    display: inline-block !important;
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Centramos la foto arriba del texto */
  figure.knowledge__picture {
    display: block !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    float: none !important;
  }

  img.knowledge__img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  figure.knowledge__picture::before {
    inset: 10px -10px -10px 10px !important;
  }
  .footer__identity-grid {
    grid-template-columns: 1fr 1fr 1fr !important; /* Forzar 3 columnas pero más estrechas */
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   4. PANTALLAS GRANDES (Escritorio Estándar / Full HD: 1025px a 1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1440px) {
  /* Tus estilos base nativos se comportan excelente en este rango */
  .hero__title {
    font-size: 3.5rem !important;
  }
}

/* --------------------------------------------------------------------------
   5. PANTALLAS GIGANTES (Monitores 2K, 4K y UltraWide: 1441px en adelante)
   -------------------------------------------------------------------------- */
@media (min-width: 1441px) {
  .container {
    max-width: 1600px; /* Amplía el margen de lectura */
  }

  .card__container {
    max-width: 1800px;
    grid-template-columns: repeat(
      4,
      1fr
    ) !important; /* Si tienes suficientes tarjetas, se verán 4 en línea */
  }

  .hero__title {
    font-size: 4.5rem !important; /* El texto no se ve huérfano en pantallas enormes */
  }

  .hero__content-wrapper {
    max-width: 1200px;
    margin: auto;
  }

  .services .subtitle {
    font-size: 4.5rem !important;
  }

  .services__description {
    max-width: 900px;
    font-size: 24px !important;
  }

  .knowledge__container {
    max-width: 1600px;
    gap: 6rem;
  }
}
/* ==========================================================================
   🚨 ANIQUILACIÓN DE LA LÍNEA BLANCA Y CONFIGURACIÓN BASE GLOBAL
   ========================================================================== */

/* 1. Eliminamos cualquier borde inferior del Header o del contenedor */
header.hero,
.hero,
.hero__container {
  border-bottom: 0px solid transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 2. Por si la línea viene de la barra de navegación que está arriba */
.nav {
  border-bottom: 0px solid transparent !important;
  box-shadow: none !important;
}

/* 3. Sellado de brecha por renderizado en pantallas */
header.hero + section,
header.hero + div,
section[id*="Misión"],
section[id*="Mision"] {
  margin-top: -3px !important; /* Absorbe cualquier línea fantasma */
  position: relative !important;
  z-index: 10 !important;
  background-color: var(
    --color-bg-main,
    #0f0f14
  ) !important; /* Mismo fondo oscuro */
}

/* 4. Eliminar espacio automático entre secciones consecutivas */
section + section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 5. Forzar a que los contenedores no tengan márgenes que rompan el diseño */
.section,
section,
.services,
.card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 50px !important;
  padding-bottom: 50px !important;
}

/* 6. Animación del botón flotante */
@keyframes whatsappPulse {
  0%,
  85%,
  100% {
    transform: scale(1);
  }
  90% {
    transform: scale(1.12);
  }
  95% {
    transform: scale(1);
  }
}

/* ==========================================================================
   📱 ADAPTACIÓN RESPONSIVA ABSOLUTA (TODAS LAS PANTALLAS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   RANGO 1: PANTALLAS MUY PEQUEÑAS (Dispositivos Móviles XS: 0px a 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --padding-container: 35px 15px;
  }

  body {
    padding-top: 75px;
    background-color: #0f0f14;
  }

  header.hero + section {
    margin-top: -4px !important;
  }
  /* Navegación Móvil */
  .nav {
    height: 75px;
    padding: 0 15px;
  }

  .brand-logo__img {
    height: 50px !important;
  }

  .nav__menu {
    display: block !important; /* Muestra las tres barras para abrir */
  }

  /* Menú desplegable móvil corregido */
  .nav__link {
    position: fixed !important;
    background-color: #0f0f14 !important;
    top: 0 !important; /* Empieza desde el borde superior absoluto */
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    /* Cambiamos a dirección de columna para que los textos bajen */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 30px !important;

    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
    padding: 20px;
    z-index: 2147483647 !important; /* Máxima prioridad sobre la barra nav */
    box-sizing: border-box !important;
  }

  .nav__link.is-active {
    transform: translateX(0) !important;
  }

  /* ==========================================
     🔥 DETECTOR Y ARREGLO DE LA X DE CERRAR
     ========================================== */
  .nav__items-close {
    display: block !important;
    position: absolute !important;
    top: 25px !important;
    right: 25px !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2147483647 !important;
    cursor: pointer !important;
  }

  .nav__close {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }
  /* Línea 1 de la X */
  .nav__close::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important; /* Grosor de la línea */
    background-color: #ffffff !important; /* Color blanco */
    transform: rotate(45deg) !important;
  }

  /* Línea 2 de la X */
  .nav__close::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important; /* Grosor de la línea */
    background-color: #ffffff !important; /* Color blanco */
    transform: rotate(-45deg) !important;
  }
  /* Contenido Hero en Móviles */
  .hero,
  .hero__container {
    height: auto !important;
    min-height: calc(100vh - 75px);
  }

  .hero__content-wrapper {
    padding-top: 80px;
    padding-bottom: 50px;
  }

  .hero__title {
    font-size: 1.75rem !important;
    line-height: 1.25;
  }

  .hero__subtitle {
    font-size: 0.95rem !important;
    padding: 6px 12px !important;
  }

  .hero__highlight {
    font-size: 1.05rem !important;
  }

  .hero__description {
    font-size: 0.95rem !important;
  }

  .cta {
    width: 100% !important;
    max-width: 320px;
    padding: 15px 18px !important;
    font-size: 16px !important;
  }

  /* Carrusel de Servicios */
  .services .subtitle {
    font-size: 2rem !important;
  }

  .services__description {
    font-size: 15px !important;
    padding: 0 10px;
  }

  .services__slider-wrapper {
    padding: 0 5px;
  }

  .services__card {
    flex: 0 0 270px;
    height: 310px;
  }

  .slider-arrow {
    display: none !important; /* Ocultar flechas pesadas, navegación vía swipe */
  }

  /* Conversión de Grids a una sola columna */
  .card__container,
  .identity__grid {
    grid-template-columns: 1fr !important;
    padding: 0 10px;
    gap: 15px;
  }

  .card__item,
  .identity__item {
    min-height: auto !important;
    padding: 25px 15px !important;
  }

  /* Activación táctil forzada (Evita la necesidad de hacer hover físico) */
  .price__items,
  .identity__items {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  /* Preguntas Frecuentes */
  .questions__title {
    font-size: 15px !important;
    padding: 18px 0;
  }

  .questions__copy {
    width: 95% !important;
  }

  .questions__offer {
    padding: 35px 15px !important;
    margin: 15px 5px 0 5px;
  }

  /* Footer */
  .footer__contact-grid,
  .footer__identity-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 25px;
  }

  .footer__nav-links {
    flex-direction: column;
    gap: 12px;
  }

  .nav-divider {
    display: none !important;
  }

  /* Botón e interfaz flotante de WhatsApp */
  .wpp-floating-container {
    bottom: 15px;
    right: 15px;
  }

  .wpp-menu-card {
    width: 275px;
    right: -5px;
  }
}

/* --------------------------------------------------------------------------
   RANGO 2: PANTALLAS PEQUEÑAS (Móviles grandes y Tablets verticales: 481px a 768px)
   -------------------------------------------------------------------------- */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --padding-container: 45px 25px;
  }

  body {
    padding-top: 85px;
  }

  .nav {
    height: 85px;
  }

  .brand-logo__img {
    height: 60px !important;
  }

  .nav__menu {
    display: block !important;
  }

  .nav__link {
    position: fixed;
    background-color: #0f0f14;
    top: 85px;
    left: 0;
    width: 100%;
    height: calc(100vh - 85px);
    display: flex !important;
    flex-direction: column !important;
    justify-content: center;
    gap: 30px;
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
  }

  .nav__link.is-active {
    transform: translateX(0);
  }
  .nav__close {
    display: block !important;
    position: absolute;
    top: 25px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000; /* Por encima de los enlaces */
  }
  .hero__title {
    font-size: 2.3rem !important;
  }

  .services .subtitle {
    font-size: 2.6rem !important;
  }

  .services__card {
    flex: 0 0 310px;
  }

  .knowledge__container {
    grid-template-columns: 1fr !important; /* Stack vertical */
    gap: 2.5rem;
  }

  .knowledge__texts {
    text-align: center;
  }

  .footer__contact-grid,
  .footer__identity-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 30px;
  }
}

/* --------------------------------------------------------------------------
   RANGO 3: PANTALLAS MEDIANAS (Tablets horizontales y Laptops: 769px a 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav__link {
    gap: 12px; /* Reducción de tracking para mantener la barra horizontal sin romperse */
  }

  .nav__links {
    font-size: 13px;
  }

  .hero__title {
    font-size: 2.85rem !important;
  }

  .services .subtitle {
    font-size: 3rem !important;
  }

  .knowledge__container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__identity-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px;
  }
}

/* --------------------------------------------------------------------------
   RANGO 4: PANTALLAS GRANDES (Escritorio Estándar / Pro: 1025px a 1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1440px) {
  /* Su comportamiento hereda las propiedades base optimizadas */
  .hero__title {
    font-size: 3.5rem !important;
  }
}

/* --------------------------------------------------------------------------
   RANGO 5: PANTALLAS GIGANTES (Monitores de Alta Resolución, 2K, 4K y UltraWide: 1441px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1441px) {
  .container,
  .knowledge__container {
    max-width: 1550px;
    margin: 0 auto;
  }

  .card__container {
    max-width: 1750px;
    grid-template-columns: repeat(
      4,
      1fr
    ) !important; /* Expansión a 4 columnas limpias */
    margin: 0 auto;
  }

  .hero__title {
    font-size: 4.2rem !important;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__content-wrapper {
    max-width: 1250px;
    margin: 0 auto;
  }

  .services .subtitle {
    font-size: 4.2rem !important;
  }

  .services__description {
    max-width: 850px;
    font-size: 22px !important;
    margin-left: auto;
    margin-right: auto;
  }
}
