/* Enquadramento previsível: panorâmico em desktop; legenda abaixo da foto em tablet/móvel. */
.service-carousel,.carousel-stage,.service-slide{min-width:0;max-width:100%}
.service-slide .slide-background{width:100%;height:100%;object-fit:cover;object-position:center}
@media(min-width:1101px){
 .service-carousel .carousel-stage{min-height:480px}
 .service-slide .slide-content{height:100%;min-height:0;padding-top:32px;padding-bottom:48px}
 .service-slide .slide-visual{inset:0;height:100%}
}
@media(max-width:1100px){
 .service-carousel{--hero-photo-height:56.25vw;background:#123a60}
 .service-carousel .carousel-stage{height:auto;min-height:0;background:#123a60}
 .service-slide .slide-visual{inset:0 0 auto;height:var(--hero-photo-height)}
 .service-slide .slide-content{display:block;height:auto;min-height:0;padding:calc(var(--hero-photo-height) + 22px) clamp(18px,4vw,36px) 28px}
 .service-slide .slide-content .eyebrow,.service-slide .slide-content>p,.service-slide .slide-content small{max-width:100%}
 .service-slide:after{background:linear-gradient(180deg,transparent 0,transparent calc(var(--hero-photo-height) - 40px),#123a60 var(--hero-photo-height),#123a60 100%)}
 .service-slide .hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}
 .service-slide .hero-actions .btn{flex:1 1 220px;width:auto;white-space:normal;justify-content:center;text-align:center}
 .carousel-controls{gap:6px;padding:12px 18px;max-width:100%}
 .carousel-dots{min-width:0;justify-content:center}
}
@media(max-width:600px){
 .grid-2,.grid-3,.proposal-grid,.service-choices,.team-grid{grid-template-columns:minmax(0,1fr)}
 .service-slide .hero-actions .btn{flex-basis:100%;min-height:48px}
 .carousel-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px}
 .carousel-controls>[data-carousel=pause]{grid-column:2;justify-self:center}
 .carousel-dots button{min-width:24px;padding:7px}
 .container{max-width:100%;min-width:0}
 .cartao,.servico-cartao,.proposal-form fieldset{min-width:0}
 .form-controlo{max-width:100%;min-width:0}
 .home-cta .btn{white-space:normal;text-align:center}
 .plano-cartao.destaque{transform:none}
 .tabela-wrap{max-width:100%;overflow-x:auto}
}
@media(max-width:360px){.carousel-controls{padding-inline:12px}.service-slide .slide-content{padding-inline:16px}}

/* V68: largura real do componente; fallback vw para navegadores antigos. */
.service-carousel{container-type:inline-size}
@supports(height:1cqw){@media(max-width:1100px){.service-carousel{--hero-photo-height:56.25cqw}}}
html{scrollbar-gutter:stable}
@media(max-width:1100px){.service-slide .slide-content{padding-bottom:max(28px,env(safe-area-inset-bottom))}.carousel-controls{padding-bottom:max(12px,env(safe-area-inset-bottom))}}

/* V69: manter as legendas e os controlos dentro da área visível no desktop. */
@media(min-width:1101px){
 .service-slide .slide-content{padding-top:28px;padding-bottom:32px;justify-content:flex-end}
 .service-slide .slide-content>p{max-width:48ch}
 .service-slide .hero-actions{margin-bottom:12px}
 .service-slide .slide-background{object-position:center center}
}

/* V70: preservar a parte superior durante todo o afastamento. */
.service-slide .slide-background{object-position:center top;transform-origin:center top}
.service-slide.is-active .slide-background{animation:hero-distance-v70 4.2s cubic-bezier(.2,.65,.3,1) .45s both}
@keyframes hero-distance-v70{from{transform:scale(1.14)}to{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.service-slide.is-active .slide-background{animation:none;transform:scale(1)}}

/* V71: enquadramento por serviço e controlos compactos. */
.service-slide .slide-background{object-position:center 35%;transform-origin:center 35%}
.service-slide[data-service-kind=cctv] .slide-background{object-position:center top;transform-origin:center top}
.service-slide[data-service-kind=vpn] .slide-background{object-position:center 42%;transform-origin:center 42%}
.service-slide[data-service-kind=sistemas] .slide-background,.service-slide[data-service-kind=biometria] .slide-background{object-position:center;transform-origin:center}
@media(min-width:1101px){.carousel-controls{padding-block:10px;gap:10px}.carousel-controls>button{min-height:44px;padding:8px 12px}.carousel-dots button{min-height:44px}.service-slide .slide-content{padding-bottom:28px}}

/* V73: proporção real por fotografia, sem recorte no fim do afastamento. */
@media(min-width:1101px){
 .service-carousel .carousel-stage{min-height:0;transition:height .45s ease}
 .service-slide .slide-content{justify-content:flex-start;padding-top:clamp(180px,25vh,300px);padding-bottom:36px}
}
@media(prefers-reduced-motion:reduce){.service-carousel .carousel-stage{transition:none}}

/* V74: cada fotografia mantém a sua proporção durante o fade. */
.service-slide .slide-visual{height:var(--slide-photo-height,var(--hero-photo-height,100%));bottom:auto}
@media(max-width:1100px){.service-slide .slide-content{padding-top:calc(var(--slide-photo-height,var(--hero-photo-height)) + 22px)}}

/* V75: descrição inferior, dentro da primeira área visível. */
@media(min-width:1101px){.service-slide .slide-content{padding-top:var(--caption-top,clamp(220px,34vh,360px));justify-content:flex-start}}
