/* ============================================================================
   CDI Learning — Ajuste de texto y apilado de botones del Hero en móviles
   ========================================================================== */

:root {
  --cdi-naranja: #ec7522;
  --cdi-naranja-hover: #d46417;
  --cdi-blanco: #ffffff;
}

@media (max-width: 768px) {
  .hero .hero__in,
  .hero--video .hero__in {
    padding-inline: 20px !important;
  }

  .hero .hero__txt,
  .hero--video .hero__txt {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Ajuste del título y texto descriptivo en móvil */
  .hero h1,
  .hero--video h1,
  .hero .hero__tit,
  .hero--video .hero__tit {
    font-size: clamp(1.5rem, 6.8vw, 2rem) !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }

  .hero .hero__lead,
  .hero--video .hero__lead,
  .hero .hero__txt p:not(:last-child),
  .hero--video .hero__txt p:not(:last-child) {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }

  /* Contenedor de botones: uno sobre otro (columna vertical) */
  .hero .hero__acciones,
  .hero--video .hero__acciones,
  .hero .hero__txt > div:last-child,
  .hero--video .hero__txt > div:last-child,
  .hero .hero__in > div > div:last-child,
  .hero--video .hero__in > div > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 340px !important;
    margin-inline: auto !important;
  }

  /* Cada botón en su propia fila y sin traslapes */
  .hero .hero__acciones > *,
  .hero--video .hero__acciones > *,
  .hero .hero__txt > div:last-child > *,
  .hero--video .hero__txt > div:last-child > *,
  .hero .hero__in > div > div:last-child > *,
  .hero--video .hero__in > div > div:last-child > * {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
  }
}