/* Ajustes finales de experiencia móvil. No afecta al diseño de escritorio. */
@media (max-width:950px){
  html body .header .menu-toggle{
    width:44px !important;
    min-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    padding:7.5px 9px !important;
  }

  html body .header .nav{
    gap:0 !important;
    align-items:stretch !important;
    padding:10px 22px 18px !important;
    max-height:calc(100vh - 78px) !important;
    max-height:calc(100dvh - 78px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
  }
  html body .header .nav > a:not(.pill){
    display:block !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:12px 4px !important;
    line-height:1.35 !important;
  }
  html body .header .nav > a.pill{
    display:flex !important;
    width:100% !important;
    min-height:43px !important;
    height:auto !important;
    margin:7px 0 0 !important;
    padding:12px 4px !important;
  }
  html body .header .nav-dropdown{
    display:block !important;
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    align-self:auto !important;
  }
  html body .header .nav-dropdown-toggle{
    display:block !important;
    width:100% !important;
    min-height:43px !important;
    height:auto !important;
    margin:0 !important;
    padding:12px 4px !important;
    text-align:left !important;
    line-height:1.35 !important;
    transform:none !important;
  }
  html body .header .nav-dropdown-menu,
  html body .header .nav-dropdown:hover .nav-dropdown-menu,
  html body .header .nav-dropdown:focus-within:not(.open) .nav-dropdown-menu{
    position:static !important;
    left:auto !important;
    top:auto !important;
    display:none !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:0 0 0 14px !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transform:none !important;
  }
  html body .header .nav-dropdown.open .nav-dropdown-menu,
  html body .header .nav-dropdown.open:hover .nav-dropdown-menu,
  html body .header .nav-dropdown.open:focus-within .nav-dropdown-menu{
    display:block !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transform:none !important;
  }
  html body .header .nav-dropdown-menu a{
    display:block !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:9px 4px !important;
    line-height:1.3 !important;
  }
}

@media (max-width:600px){
  body.corporate-shell .hero-icons{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:8px !important;
    width:100% !important;
    max-width:none !important;
  }
  body.corporate-shell .hero-icons>div{
    width:auto !important;
    min-width:0 !important;
  }

  /* Empresas y Viviendas: lectura completa sobre toda la anchura del texto. */
  body.corporate-shell #inicio.hero:not(.hero-360) .hero-overlay{
    background:linear-gradient(180deg,
      rgba(255,255,255,.99) 0%,
      rgba(255,255,255,.97) 52%,
      rgba(255,255,255,.88) 70%,
      rgba(255,255,255,.42) 87%,
      rgba(255,255,255,0) 100%) !important;
  }

  /* Contacto: mantiene la fotografía visible, subordinada al mensaje. */
  html body.corporate-shell #inicio-contacto.contact-hero .hero-overlay{
    background:linear-gradient(90deg,
      rgba(255,255,255,.97) 0%,
      rgba(255,255,255,.94) 58%,
      rgba(255,255,255,.88) 100%) !important;
  }

  /* Gestión 360º: cuatro líneas de título y bloque inicial más compacto. */
  body.corporate-shell #inicio.hero.hero-360{
    min-height:0 !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-content{
    padding:106px 18px 32px !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-overlay{
    background:linear-gradient(180deg,
      rgba(255,255,255,.99) 0%,
      rgba(255,255,255,.97) 54%,
      rgba(255,255,255,.86) 73%,
      rgba(255,255,255,.44) 89%,
      rgba(255,255,255,.08) 100%) !important;
  }
  body[data-version="360-empresas-clean"] #inicio.hero.hero-360{
    background-position:68% center !important;
  }
  body[data-version="360-viviendas-clean"] #inicio.hero.hero-360{
    background-position:72% center !important;
  }
  body.corporate-shell #inicio.hero.hero-360 h1{
    max-width:none !important;
    margin-bottom:14px !important;
    font-size:28px !important;
    line-height:1.05 !important;
    letter-spacing:-.55px !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-break-desktop{
    display:none !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-copy{
    margin-bottom:16px !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-icons{
    gap:8px !important;
    margin:8px 0 18px !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-icons img{
    width:40px !important;
    height:40px !important;
    margin:0 auto 6px !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-icons span{
    font-size:9.5px !important;
    line-height:1.2 !important;
  }
  body.corporate-shell #inicio.hero.hero-360 .hero-cta{
    margin:0 !important;
  }

  /* Colabora: elimina altura residual sin alterar contenido ni fotografía. */
  body .colab-hero,
  body .colab-hero .hero-content{
    min-height:540px !important;
  }
  body .colab-hero .hero-content{
    padding-top:110px !important;
    padding-bottom:40px !important;
  }

  /* Las líneas acompañan al bloque de título, incluso cuando ocupa dos líneas. */
  html body .section-heading h2{
    justify-content:center !important;
    gap:10px !important;
  }
  html body .section-heading h2::before,
  html body .section-heading h2::after{
    flex:0 0 26px !important;
    width:26px !important;
    max-width:26px !important;
    margin:0 !important;
    transform:none !important;
  }

  html body .whatsapp-float{
    right:12px !important;
    bottom:12px !important;
    bottom:max(12px,env(safe-area-inset-bottom)) !important;
    width:50px !important;
    height:50px !important;
  }
  html body .whatsapp-float svg{
    width:29px !important;
    height:29px !important;
  }
}
