/*
 * PyMESPRESS CMS · 171B60
 * Corrección final de la portada en teléfonos y tabletas.
 * Se carga al final para neutralizar únicamente las reglas móviles heredadas.
 */

@media (max-width:900px){
  .page-home .home-carousel-hero{
    height:clamp(500px,70svh,580px)!important;
    min-height:500px!important;
    max-height:580px!important;
    overflow:hidden!important;
  }

  .page-home .home-carousel-track,
  .page-home .home-carousel-slide{
    height:100%!important;
    min-height:0!important;
  }

  /* Evita que durante la transición asomen botones de otra diapositiva. */
  .page-home .home-carousel-slide:not(.is-active){
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  .page-home .home-carousel-slide.is-active{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }

  .page-home .home-carousel-media{
    object-position:center center!important;
  }

  .page-home .home-carousel-shade{
    background:linear-gradient(
      180deg,
      rgba(7,20,40,.10) 0%,
      rgba(7,20,40,.16) 44%,
      rgba(7,20,40,.34) 100%
    )!important;
  }

  .page-home .home-carousel-inner{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:24px 18px 54px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  .page-home .home-carousel-copy{
    width:min(100%,620px)!important;
    max-width:620px!important;
    margin:0!important;
    padding:20px!important;
    border-radius:20px!important;
    background:rgba(7,20,40,.58)!important;
    box-shadow:0 14px 34px rgba(7,20,40,.18)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    overflow:hidden!important;
  }

  .page-home .home-carousel-badge{
    min-height:34px!important;
    padding:7px 14px!important;
    font-size:12px!important;
    line-height:1.1!important;
  }

  .page-home .home-carousel-copy h1{
    max-width:100%!important;
    margin:14px 0 12px!important;
    font-size:clamp(34px,7.2vw,46px)!important;
    line-height:1.02!important;
    letter-spacing:-.035em!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    text-wrap:balance!important;
  }

  .page-home .home-carousel-copy p{
    max-width:100%!important;
    margin:0 0 17px!important;
    font-size:16px!important;
    line-height:1.42!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  .page-home .home-carousel-actions{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  .page-home .home-carousel-btn{
    width:100%!important;
    min-height:48px!important;
    padding:10px 16px!important;
    border-radius:11px!important;
    font-size:15px!important;
    line-height:1.2!important;
  }

  .page-home .home-carousel-btn::before{
    content:""!important;
    display:inline-block!important;
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    margin-right:9px!important;
    background-position:center!important;
    background-repeat:no-repeat!important;
    background-size:18px 18px!important;
  }

  .page-home .home-carousel-btn.primary::before{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14v16H5z'/%3E%3Cpath d='M8 2v4M16 2v4M8 11h8M8 15h5'/%3E%3C/svg%3E")!important;
  }

  .page-home .home-carousel-btn.secondary::before{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1734' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.5 9.5 9.5 0 0 1-4-.9L3 21l1.7-4.6A8.5 8.5 0 1 1 21 11.5Z'/%3E%3C/svg%3E")!important;
  }

  .page-home .home-carousel-dots{
    bottom:15px!important;
  }

  .page-home .features-overlap{
    margin-top:0!important;
    padding-top:20px!important;
  }

  /* En la portada móvil ya existe “Hablar por WhatsApp” dentro del héroe. */
  .page-home .floating-whatsapp{
    display:none!important;
  }
}

@media (max-width:640px){
  .page-home .home-carousel-hero{
    height:540px!important;
    min-height:540px!important;
    max-height:540px!important;
  }

  .page-home .home-carousel-inner{
    padding:18px 12px 48px!important;
  }

  .page-home .home-carousel-copy{
    width:100%!important;
    padding:18px!important;
    border-radius:18px!important;
  }

  .page-home .home-carousel-copy h1{
    font-size:clamp(32px,9.2vw,38px)!important;
    line-height:1.01!important;
  }

  .page-home .home-carousel-copy p{
    font-size:15.5px!important;
    line-height:1.4!important;
  }
}

@media (max-width:380px){
  .page-home .home-carousel-hero{
    height:525px!important;
    min-height:525px!important;
    max-height:525px!important;
  }

  .page-home .home-carousel-inner{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .page-home .home-carousel-copy{
    padding:16px!important;
  }

  .page-home .home-carousel-copy h1{
    font-size:31px!important;
  }
}

