/* ========================================================================== 
   SaltaConectada 1.0.172 / V272 · STABILITY PASS
   APP = autoridad visual.
   Alcance: Regiones Home + slider premium + Footer/TabBar.
   V271 queda fuera del runtime, por lo tanto NO se fuerzan tamaños en las
   tarjetas Descubrí/otras tarjetas del Home.
   ========================================================================== */

/* ========================================================================== 
   A) FOOTER / TABBAR · MISMO CONTRATO COMPACTO QUE JC
   ========================================================================== */
@media (max-width:760px){
  html,body{
    --jc-tabbar-v2-base-height:60px!important;
    --jc-footer-real-height:calc(60px + env(safe-area-inset-bottom,0px))!important;
    --jc-app-fixed-footer-height:60px!important;
  }
  body:not(.wp-admin){
    padding-bottom:var(--jc-footer-real-height)!important;
    margin-bottom:0!important;
  }
  body:not(.wp-admin) .jc-web-footer-v2{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:10030!important;
    width:100%!important;
    height:var(--jc-footer-real-height)!important;
    min-height:var(--jc-footer-real-height)!important;
    max-height:var(--jc-footer-real-height)!important;
    margin:0!important;
    padding:0 0 env(safe-area-inset-bottom,0px)!important;
    overflow:visible!important;
    border:0!important;
    border-top:1px solid rgba(23,105,224,.12)!important;
    background:rgba(255,255,255,.985)!important;
    color:#8e8e93!important;
    box-shadow:0 -6px 22px rgba(18,48,82,.09)!important;
    backdrop-filter:saturate(1.2) blur(12px)!important;
    -webkit-backdrop-filter:saturate(1.2) blur(12px)!important;
  }
  body:not(.wp-admin) .jc-web-footer-v2__main{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
  }
  body:not(.wp-admin) :is(
    .jc-web-footer-v2__brand,
    .jc-footer-nav-webwin,
    .jc-footer-webwin-install,
    .jc-web-footer-v2__menu,
    .jc-web-footer-v2__bottom,
    .jc-web-footer-v2__mobile-meta
  ){
    display:none!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    width:100%!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    gap:0!important;
    margin:0!important;
    padding:0 4px!important;
    overflow:visible!important;
    background:transparent!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2>.jc-tabbar-item{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#8e8e93!important;
    box-shadow:none!important;
    font-size:0!important;
    line-height:1!important;
    text-decoration:none!important;
    transform:none!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2>.jc-tabbar-item.is-current{color:#1769e0!important}
  body:not(.wp-admin) .jc-tabbar-icon{
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    height:44px!important;
    flex:0 0 44px!important;
    margin:0!important;
    color:inherit!important;
  }
  body:not(.wp-admin) .jc-tabbar-icon svg{display:block!important;width:24px!important;height:24px!important}
  body:not(.wp-admin) .jc-tabbar-publish{overflow:visible!important;z-index:2!important}
  body:not(.wp-admin) .jc-tabbar-fab{
    position:relative!important;
    top:-8px!important;
    display:grid!important;
    place-items:center!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    border:3px solid #fff!important;
    border-radius:50%!important;
    background:#ff8500!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(255,133,0,.30),0 2px 7px rgba(13,43,75,.12)!important;
  }
  body:not(.wp-admin) .jc-tabbar-fab svg{
    width:25px!important;
    height:25px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2.8!important;
    stroke-linecap:round!important;
  }
}

/* Windows / tablet-web: la misma TabBar APP dentro del frame 768. */
@media (min-width:761px){
  html,body{--jc-footer-real-height:60px!important;--jc-app-fixed-footer-height:60px!important}
  body:not(.wp-admin){padding-bottom:60px!important;margin-bottom:0!important}
  body:not(.wp-admin) .jc-web-footer-v2{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:0!important;
    z-index:10030!important;
    width:min(768px,100vw)!important;
    max-width:768px!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    margin:0!important;
    padding:0!important;
    transform:translateX(-50%)!important;
    overflow:visible!important;
    border:0!important;
    border-top:1px solid rgba(23,105,224,.12)!important;
    background:rgba(255,255,255,.985)!important;
    color:#8e8e93!important;
    box-shadow:0 -6px 22px rgba(18,48,82,.09)!important;
  }
  body:not(.wp-admin) .jc-web-footer-v2__main{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    margin:0!important;
    padding:0!important;
  }
  body:not(.wp-admin) :is(
    .jc-web-footer-v2__brand,
    .jc-footer-nav-webwin,
    .jc-footer-webwin-install,
    .jc-web-footer-v2__menu,
    .jc-web-footer-v2__bottom,
    .jc-web-footer-v2__mobile-meta
  ){
    display:none!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    width:100%!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    gap:0!important;
    margin:0!important;
    padding:0 4px!important;
    overflow:visible!important;
    background:transparent!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2>.jc-tabbar-item{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#8e8e93!important;
    box-shadow:none!important;
    font-size:0!important;
    line-height:1!important;
    text-decoration:none!important;
    transform:none!important;
  }
  body:not(.wp-admin) .jc-mobile-tabbar-v2>.jc-tabbar-item.is-current{color:#1769e0!important}
  body:not(.wp-admin) .jc-tabbar-icon{
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:42px!important;
    flex:0 0 42px!important;
    margin:0!important;
    color:inherit!important;
  }
  body:not(.wp-admin) .jc-tabbar-icon svg{display:block!important;width:23px!important;height:23px!important}
  body:not(.wp-admin) .jc-tabbar-publish{overflow:visible!important;z-index:2!important}
  body:not(.wp-admin) .jc-tabbar-fab{
    position:relative!important;
    top:-7px!important;
    display:grid!important;
    place-items:center!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    border:3px solid #fff!important;
    border-radius:50%!important;
    background:#ff8500!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(255,133,0,.30),0 2px 7px rgba(13,43,75,.12)!important;
  }
  body:not(.wp-admin) .jc-tabbar-fab svg{width:24px!important;height:24px!important}
}

/* ========================================================================== 
   B) SLIDER PREMIUM · MISMO ANCHO VISUAL QUE JC
   ========================================================================== */
/* APP / móvil: protagonista más ancho, escenario sigue edge-to-edge. */
@media (max-width:520px){
  body.home .sc-premium-v236{
    width:100vw!important;
    max-width:100vw!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:calc(50% - 50vw)!important;
    overflow:hidden!important;
  }
  body.home .sc-premium-v236__stage,
  body.home .sc-premium-v236__slide{width:100vw!important;max-width:100vw!important}
  body.home .sc-premium-v236__item:nth-child(2){
    width:min(82vw,340px)!important;
    max-width:min(82vw,340px)!important;
    left:50%!important;
  }
  body.home .sc-premium-v236__item:nth-child(1){left:-7%!important}
  body.home .sc-premium-v236__item:nth-child(3){left:80%!important}
  body.home .sc-premium-v236__item:nth-child(4){left:92%!important}
  body.home .sc-premium-v236__item:nth-child(5){left:100%!important}
}
@media (min-width:521px) and (max-width:900px){
  body.home .sc-premium-v236{width:min(calc(100% - 24px),744px)!important;max-width:744px!important}
  body.home .sc-premium-v236__item:nth-child(2){width:58%!important}
}
/* Windows: V236 había recortado el escenario a 372px. Se vuelve al frame útil 744. */
@media (min-width:901px){
  body.home .sc-premium-v236{
    width:744px!important;
    max-width:744px!important;
    min-width:744px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    overflow:hidden!important;
  }
  body.home .sc-premium-v236__stage,
  body.home .sc-premium-v236__slide{
    width:744px!important;
    max-width:744px!important;
    min-width:744px!important;
    overflow:hidden!important;
  }
  body.home .sc-premium-v236__item:nth-child(2){width:80%!important;left:50%!important}
}

/* ========================================================================== 
   C) REGIONES · APP CONGELADA / RESTO COMPACTO SIN AIRE MUERTO
   ========================================================================== */
body.home .sc-home-v224__regions{overflow:visible!important}
body.home .sc-home-v224__regions > .jc-container{
  position:relative!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  height:270px!important;
  min-height:270px!important;
  max-height:270px!important;
  aspect-ratio:auto!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background-color:#dbe9f8!important;
  background-image:url('../images/home/regiones-v272/fondo-final-home-regiones.webp')!important;
  background-repeat:no-repeat!important;
  background-position:center top!important;
  background-size:100% auto!important;
  box-shadow:0 8px 22px rgba(12,67,135,.12)!important;
}
body.home .sc-home-v224__regions > .jc-container > .sc-home-v224__heading,
body.home .sc-home-v224__regions > .jc-container > .sc-home-v224__regions-banner,
body.home .sc-home-v224__regions > .jc-container > details,
body.home .sc-home-v224__regions > .jc-container > .sc-region-credits,
body.home .sc-home-v224__regions > .jc-container > .jc-region-credits{display:none!important}

body.home .sc-home-v224__regions .sc-home-v249__region-rows{
  position:absolute!important;
  z-index:3!important;
  top:31%!important;
  left:2.2%!important;
  right:2.2%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:7px!important;
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  scroll-snap-type:none!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail--bottom{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:76%!important;
  max-width:76%!important;
  align-self:center!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card{
  position:relative!important;
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  aspect-ratio:16/10!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:2px solid rgba(255,255,255,.94)!important;
  border-radius:11px!important;
  background:#dbe7f3!important;
  box-shadow:0 4px 11px rgba(7,48,101,.22)!important;
  transform:none!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card > span{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card > span::after{
  content:""!important;
  position:absolute!important;
  inset:45% 0 0!important;
  z-index:1!important;
  background:linear-gradient(180deg,rgba(0,0,0,0),rgba(2,13,28,.78))!important;
  pointer-events:none!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
  transform:none!important;
}
body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card strong{
  position:absolute!important;
  left:5px!important;
  right:4px!important;
  bottom:4px!important;
  z-index:3!important;
  display:block!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  color:#fff!important;
  font-size:6.2px!important;
  line-height:1.04!important;
  font-weight:900!important;
  text-align:left!important;
  text-shadow:0 2px 4px rgba(0,0,0,.78)!important;
}

/* APP/PWA/NATIVE: exactamente el contrato visual aprobado en V271. */
@media (max-width:760px){
  html.jc-pwa-standalone body.home .sc-home-v224__regions > .jc-container,
  html.jc-native-app body.home .sc-home-v224__regions > .jc-container{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1372/1147!important;
    background-size:100% 100%!important;
    border-radius:18px!important;
  }
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rows,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rows{
    top:31.8%!important;
    left:2.2%!important;
    right:2.2%!important;
    gap:8px!important;
  }
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rail,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rail{
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    align-self:stretch!important;
    margin:0!important;
    padding:1px 1px 3px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    scroll-snap-type:x mandatory!important;
  }
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rail::-webkit-scrollbar,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rail::-webkit-scrollbar{display:none!important}
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rail--bottom,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rail--bottom{
    width:100%!important;
    max-width:100%!important;
    align-self:stretch!important;
  }
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card{
    flex:0 0 40.5%!important;
    width:40.5%!important;
    min-width:40.5%!important;
    max-width:40.5%!important;
    aspect-ratio:16/10!important;
    height:auto!important;
    border-radius:14px!important;
    scroll-snap-align:start!important;
    scroll-snap-stop:always!important;
  }
  html.jc-pwa-standalone body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card strong,
  html.jc-native-app body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card strong{
    left:8px!important;
    right:7px!important;
    bottom:7px!important;
    font-size:9.8px!important;
    line-height:1.08!important;
  }
}

/* Browser móvil normal: 4 + 3, sin tarjeta cortada. */
@media (max-width:520px){
  html:not(.jc-pwa-standalone) body:not(.jc-native-app).home .sc-home-v224__regions > .jc-container{
    height:270px!important;
    min-height:270px!important;
    max-height:270px!important;
  }
}

/* 720/tablet: misma composición 4 + 3, fondo recortado abajo y sin hueco muerto. */
@media (min-width:521px) and (max-width:900px){
  body.home .sc-home-v224__regions > .jc-container{
    height:390px!important;
    min-height:390px!important;
    max-height:390px!important;
    aspect-ratio:auto!important;
    background-size:100% auto!important;
    border-radius:20px!important;
  }
  body.home .sc-home-v224__regions .sc-home-v249__region-rows{top:30%!important;left:2.4%!important;right:2.4%!important;gap:10px!important}
  body.home .sc-home-v224__regions .sc-home-v249__region-rail{gap:10px!important}
  body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card{border-radius:14px!important}
  body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card strong{left:8px!important;bottom:7px!important;font-size:9.2px!important}
}

/* Windows: 744 ancho, 400 alto útil. El lienzo se recorta abajo; no se deforma. */
@media (min-width:901px){
  body.home .sc-home-v224__regions > .jc-container{
    width:744px!important;
    max-width:744px!important;
    height:400px!important;
    min-height:400px!important;
    max-height:400px!important;
    aspect-ratio:auto!important;
    background-size:100% auto!important;
    border-radius:22px!important;
  }
  body.home .sc-home-v224__regions .sc-home-v249__region-rows{
    top:30%!important;
    left:2.5%!important;
    right:2.5%!important;
    gap:10px!important;
  }
  body.home .sc-home-v224__regions .sc-home-v249__region-rail{gap:10px!important}
  body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card{border-radius:15px!important}
  body.home .sc-home-v224__regions .sc-home-v249__region-rail .sc-home-v224__region-card strong{
    left:9px!important;
    right:7px!important;
    bottom:8px!important;
    font-size:10.5px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  .jc-mobile-tabbar-v2 *, .jc-mobile-tabbar-v2 *::before, .jc-mobile-tabbar-v2 *::after{transition:none!important;animation:none!important}
}
