/* ================================
   ESTILOS RESPONSIVE (max-width: 430px)
   ================================ */
@media (max-width: 430px) {

  /* --------------------------------
     GALERÍA — ARREGLO COMPLETO
  ----------------------------------- */
  .modulos .gallery {
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .gallery-wrapper {
    width: 100%;
    overflow: hidden;
  }

  .gallery-container {
    display: flex;
    transition: transform 0.35s ease;
  }

  .gallery-container img {
    width: 100%; max-width: 100vw;          /* Imagen ocupa todo el ancho del móvil */
    height: auto;          /* Mantiene proporción */
    object-fit: contain;   /* No recorta NADA */
    flex-shrink: 0;        /* Evita compresión */
    max-height: 75vh;      /* Evita imágenes demasiado altas */
  }

  .gallery-btn {
    width: 36px;
    height: 36px;
    top: 50%;
    transform: translateY(-50%);
  }

  .gallery-btn.prev { 
    left: 5px; 
  }

  .gallery-btn.next { 
    right: 5px; 
  }

  /* --------------------------------
     GRID INFO (versión base)
  ----------------------------------- */
  .info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* --------------------------------
     VIDEOS (base que se mantiene)
  ----------------------------------- */
  .videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .video-card {
    max-width: 100%;
  }

  /* --------------------------------
     ARREGLO IMAGEN DEL MÓDULO X-01
  ----------------------------------- */
  .module-header img,
  .module-title img {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
  }

  .module-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}


/* 🔧 Arreglo definitivo — prioridad máxima */
@media (max-width: 430px) {
  .gallery-container img {
    min-height: auto !important;
    height: auto !important;
    width: 100%; max-width: 100vw !important;
    object-fit: contain !important;
    max-height: 75vh !important;
  }
}


@media (max-width: 430px) {

    .info-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;

        /* 🎯 ARREGLO CRÍTICO */
        padding: 0 20px !important;      /* añade margen interno */
        box-sizing: border-box !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .info-item {
        text-align: center;
        padding: 15px 12px;
        width: 100%;
        box-sizing: border-box;

        /* 💡 centra el contenido REAL */
        display: flex;
        flex-direction: column;
        align-items: center;             /* centra horizontalmente */
        justify-content: center;
    }

    .info-item h3,
    .info-item p {
        text-align: center !important;   /* FORZADO */
        margin-left: auto;
        margin-right: auto;
    }
}



/* ============================================================
   📱 VIDEOS — GRID 2×2 EXACTO
   ============================================================ */
@media (max-width: 430px) {

    .videos {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, auto) !important;
        gap: 10px !important;
        max-width: 430px;
        margin: 0 auto;
    }

    .videos .video-card {
        width: 100%;
    }

    .videos video {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }
}

@media (max-width:430px){html,body{overflow-x:hidden!important;width:100%!important;}}
