/*
 * LAFER / Mobile portraits and detail-layout correction, Nov 2026
 * Last-layer override. Keeps six immersive heroes and their real photographs,
 * removes duplicate controls and prevents the 300+ px empty transition.
 */
@media (max-width: 1199px) {
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-explorer.is-detail-open {
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    height:auto!important;
    min-height:0!important;
    padding:calc(var(--lf-nav-mobile-h,66px) + 15px) 0 12px!important;
    overflow:visible!important;
    background:linear-gradient(180deg,#03113f 0%,#031445 88%,#eaf1f9 100%)!important;
    isolation:isolate;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open::before,
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open::after {
    display:none!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-intro {
    display:none!important; /* The chosen category has its OWN title inside the card. */
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-stage {
    display:block!important;
    position:relative!important;
    height:clamp(320px,39svh,370px)!important;
    min-height:0!important;
    max-height:none!important;
    padding:0 13px!important;
    overflow:hidden!important;
    scroll-snap-type:none!important;
    flex:0 0 auto!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillars-track {
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    gap:0!important;
    display:flex!important;
    grid-template-columns:none!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar {
    display:none!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar.is-active {
    display:block!important;
    height:100%!important;
    width:100%!important;
    min-width:0!important;
    flex:1 1 100%!important;
    position:relative!important;
    margin:0!important;
    overflow:hidden!important;
    border-radius:clamp(23px,5vw,32px)!important;
    scroll-snap-align:none!important;
    box-shadow:0 16px 36px rgba(0,6,51,.25)!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar.is-active::after{
    display:block!important;
    background:linear-gradient(90deg,rgba(0,6,51,.73),rgba(0,6,51,.47) 43%,rgba(0,6,51,.06) 82%)!important;
    opacity:1!important;
    pointer-events:none!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-copy{
    position:absolute!important;
    z-index:22!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:flex-start!important;
    top:65px!important;
    bottom:8px!important;
    left:clamp(16px,4vw,24px)!important;
    width:clamp(200px,61%,330px)!important;
    max-width:calc(100% - 31px)!important;
    padding:0!important;
    opacity:1!important;
    transform:none!important;
    pointer-events:auto!important;
    gap:0!important;
    text-align:left!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-kicker {
    margin:0 0 7px!important;
    font-size:10px!important;
    line-height:1!important;
    letter-spacing:.13em!important;
    color:#ffdd8e!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-title {
    margin:0 0 9px!important;
    max-width:100%!important;
    font-size:clamp(24px,3vw,34px)!important;
    line-height:1.04!important;
    letter-spacing:-.045em!important;
    text-wrap:balance;
    overflow-wrap:break-word!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-copy p {
    margin:0 0 10px!important;
    max-width:100%!important;
    font-size:clamp(13.5px,1.6vw,16px)!important;
    line-height:1.42!important;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    color:rgba(255,255,255,.94)!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-chips {
    max-width:100%!important;
    margin:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    overflow:hidden;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-chips button {
    display:inline-flex;
    align-items:center;
    width:auto!important;
    max-width:100%!important;
    white-space:normal!important;
    min-height:31px!important;
    height:auto!important;
    margin:0!important;
    padding:6px 10px!important;
    border:1px solid rgba(255,255,255,.32)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.17)!important;
    color:white!important;
    font-size:clamp(11.5px,1.4vw,13px)!important;
    line-height:1.3!important;
    text-align:left!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    box-shadow:inset 0 1px rgba(255,255,255,.1);
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-back{
    position:absolute!important;
    top:-55px!important;
    left:0!important;
    z-index:24!important;
    display:inline-flex!important;
    margin:0!important;
    padding:0 13px!important;
    min-height:40px!important;
    max-width:calc(100vw - 46px)!important;
    font-size:clamp(12px,1.5vw,14px)!important;
    line-height:1.15!important;
    color:#0b255b!important;
    background:rgba(255,255,255,.97)!important;
    border-radius:99px!important;
    box-shadow:0 6px 20px rgba(0,6,51,.16)!important;
    white-space:nowrap;
  }
  /* No overlapping duplicate fixed "Back to categories" above the hero. */
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-switch-line {
    display:none!important;
    visibility:hidden!important;
    position:static!important;
  }
  /* Both text and portrait are readable. Portrait is 100% CONTAIN, not 144% wide. */
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-visual-wrap,
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar[data-line] .lfseg-visual-wrap {
    position:absolute!important;
    z-index:7!important;
    left:48%!important;
    right:0!important;
    top:43px!important;
    bottom:0!important;
    width:auto!important;
    height:auto!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:flex-end!important;
    overflow:hidden!important;
    opacity:1!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-visual-scene,
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-character-picture {
    position:relative!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:flex-end!important;
    overflow:hidden!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar[data-line] .lfseg-character {
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:right bottom!important;
    transform:none!important;
    filter:drop-shadow(0 10px 19px rgba(0,0,8,.23))!important;
    opacity:1;
    transition:opacity .3s ease!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar.lfseg-photo-pending .lfseg-character {
    opacity:0!important; /* No pixelated tiny-image preview while the real photo downloads. */
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-panorama-ghost{
    right:12%!important;
    opacity:.65!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-section{
    display:block!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border-radius:25px 25px 0 0!important;
    box-shadow:none!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-shell{
    width:calc(100% - 32px)!important;
    margin:0 auto!important;
    padding:20px 0 54px!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-head {
    margin:0 0 18px!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:3px!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-head span{
    margin:0 0 6px!important;
    font-size:12px!important;
    line-height:1.3!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-head h2{
    margin:0!important;
    font-size:clamp(28px,5vw,37px)!important;
    line-height:1.09!important;
    letter-spacing:-.04em!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-head p{
    margin:8px 0 0!important;
    font-size:15px!important;
    line-height:1.53!important;
  }
}
/* Small phones, 320–540px: show the actual insurance products quickly. */
@media(max-width:540px){
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-explorer.is-detail-open{
    padding-top:calc(var(--lf-nav-mobile-h,66px) + 12px)!important;
    padding-bottom:10px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-stage{
    height:clamp(292px,36svh,328px)!important;
    max-height:328px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-copy{
    top:60px!important;
    left:16px!important;
    width:64%!important;
    bottom:6px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-title{
    font-size:clamp(21px,6vw,26px)!important;
    margin-bottom:6px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-copy p{
    font-size:13px!important;
    -webkit-line-clamp:2;
    margin-bottom:8px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-kicker{
    font-size:9px!important;
    margin-bottom:6px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-chips button:nth-child(n+3){
    display:none!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-chips button{
    font-size:11.5px!important;
    min-height:30px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-back {
    top:-50px!important;
    min-height:38px!important;
    font-size:12px!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-visual-wrap,
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar[data-line] .lfseg-visual-wrap {
    left:49%!important;
    right:0!important;
    top:39px!important;
    bottom:0!important;
  }
  html body.lafer-enterprise.page-seguros.lfseg-unlocked .lfseg-products-shell{
    padding-top:17px!important;
  }
  /* Long category names break gracefully rather than sitting behind photos. */
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-selected-title{
    max-width:230px!important;
  }
}
/* The original compact grid also keeps every portrait inside its own cell. */
@media(max-width:900px){
  html body.lafer-enterprise.page-seguros .lfseg-explorer:not(.is-detail-open) .lfseg-pillar[data-line] .lfseg-visual-wrap{
    left:46%!important;
    right:0!important;
    top:0!important;
    bottom:0!important;
    overflow:hidden!important;
    opacity:1!important;
  }
  html body.lafer-enterprise.page-seguros .lfseg-explorer:not(.is-detail-open) .lfseg-pillar[data-line] .lfseg-character{
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:right bottom!important;
    transform:none!important;
  }
}
/* Never expand a 240px preview in a large selected hero, on ANY device.
   While the 768px image decodes, the real category gradient remains visible. */
html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar.lfseg-photo-pending .lfseg-character{
 opacity:0!important;
}
html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar:not(.lfseg-photo-pending) .lfseg-character{
 transition:opacity .3s ease!important;
}
/* Paola should breathe inside her territory, not fill it edge-to-edge. */
html body.lafer-enterprise.page-seguros .lfseg-pillar[data-line="asesoria-consultoria"] .lfseg-character{
  transform:scale(.89)!important;
  transform-origin:right bottom!important;
}
@media(max-width:1199px){
  html body.lafer-enterprise.page-seguros .lfseg-explorer.is-detail-open .lfseg-pillar[data-line="asesoria-consultoria"] .lfseg-character{
    transform:scale(.88)!important;
    transform-origin:right bottom!important;
  }
}
