/* =====================================================================
   Botão dos slides do carrossel (página inicial + pré-visualização do BackOffice)

   O botão é posicionado em % DENTRO de uma moldura com as proporções da imagem
   (16:9). Assim fica sempre no mesmo sítio do desenho feito no Photoshop
   (ver o modelo em /assets/docs/carrossel-modelo-guia.png), em qualquer ecrã.

   Zonas (centro vertical): topo 18% · meio 50% · baixo 82%
   Esquerda: começa a 8% · Centro: centrado a 50% · Direita: acaba a 92%
   ===================================================================== */

.hero-frame { container-type: inline-size; }

.hero-btn {
    position: absolute;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    font-size: max(13px, 1vw);
    font-size: max(13px, 1cqw);         /* proporcional à largura da imagem */
    line-height: 1.2;
    letter-spacing: 0.02em;
    padding: 0.95em 2.1em;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.hero-btn[hidden] { display: none; }
.hero-btn:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); }
.hero-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Estilos */
.hero-btn--dark  { background: #000; color: #fff; }
.hero-btn--dark:hover  { background: #222; color: #fff; }
.hero-btn--light { background: #fff; color: #000; }
.hero-btn--light:hover { background: #f1efec; color: #000; }
.hero-btn--brand { background: #d4c4b5; color: #000; }
.hero-btn--brand:hover { background: #c6b3a1; color: #000; }

/* Posições (grelha 3x3) */
.hb-tl { left: 8%;  top: 18%; transform: translateY(-50%); }
.hb-tc { left: 50%; top: 18%; transform: translate(-50%, -50%); }
.hb-tr { right: 8%; top: 18%; transform: translateY(-50%); }
.hb-ml { left: 8%;  top: 50%; transform: translateY(-50%); }
.hb-mc { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hb-mr { right: 8%; top: 50%; transform: translateY(-50%); }
.hb-bl { left: 8%;  top: 82%; transform: translateY(-50%); }
.hb-bc { left: 50%; top: 82%; transform: translate(-50%, -50%); }
.hb-br { right: 8%; top: 82%; transform: translateY(-50%); }

/* Banner inteiro clicável (quando há link mas não há texto de botão) */
.hero-link { position: absolute; inset: 0; z-index: 4; }

/* Pré-visualização no BackOffice: tudo à escala, sem tamanho mínimo */
.hero-frame.is-preview { position: relative; aspect-ratio: 16 / 9; background: #eee; overflow: hidden; border-radius: 4px; }
.hero-frame.is-preview img, .hero-frame.is-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-frame.is-preview .hero-btn { font-size: 1vw; font-size: 1cqw; box-shadow: 0 0.3cqw 1cqw rgba(0, 0, 0, 0.2); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .hero-btn { transition: none; }
}
