/* =============================================================================
   HERO CAROUSEL — hero-carousel.css
   Bloco:  blocks/hero-carousel.php
   Uso:    home.php, servicos/index.php (opcional)

   Funciona com CSS custom property --hc-duration definida pelo JS no
   elemento .hc__bar-fill para controlar a duração da barra de progresso.
   ============================================================================= */

/* ── Wrapper externo ───────────────────────────────────────────────────────── */
.hc-wrap {
    padding: var(--space-8) 0 0;
}

/* ── Container principal ───────────────────────────────────────────────────── */
.hc {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #0d1b2a;
    /* aspect-ratio preserva proporção — min-height protege telas muito largas */
    aspect-ratio: 16 / 6;
    min-height: 340px;
    max-height: 560px;
    user-select: none;
}

/* ── Track (contém todos os slides sobrepostos) ────────────────────────────── */
.hc__track {
    position: absolute;
    inset: 0;
}

/* ── Slide base ────────────────────────────────────────────────────────────── */
.hc__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.hc__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Imagem de fundo ───────────────────────────────────────────────────────── */
.hc__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03); /* margem para o efeito Ken Burns sem borda */
    transition: transform 6s ease;
}

.hc__slide.is-active .hc__bg {
    transform: scale(1);
}

/* ── Overlay gradiente ─────────────────────────────────────────────────────── */
.hc__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(10, 22, 40, 0.88) 0%,
        rgba(10, 22, 40, 0.55) 50%,
        rgba(10, 22, 40, 0.18) 100%
    );
}

/* ── Conteúdo textual ──────────────────────────────────────────────────────── */
.hc__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 5%, 3.5rem) clamp(1.5rem, 6%, 4rem);
    max-width: 640px;
    color: #fff;
    /* Entrada da esquerda */
    transform: translateX(-16px);
    opacity: 0;
    transition: transform 0.6s ease 0.15s, opacity 0.6s ease 0.15s;
}

.hc__slide.is-active .hc__content {
    transform: translateX(0);
    opacity: 1;
}

.hc__eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold, #f5a623);
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: 4px;
    padding: 0.25em 0.75em;
    margin-bottom: 1rem;
    width: fit-content;
}

.hc__title {
    font-family: var(--font-heading, sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 0.75rem;
}

.hc__desc {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.80);
    margin: 0 0 1.5rem;
    max-width: 440px;
}

/* ── Rodapé do slide: CTA + stat ───────────────────────────────────────────── */
.hc__footer {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

/* CTA herda .btn .btn--primary do b2w.css */
.hc__cta {
    white-space: nowrap;
}

/* Stat */
.hc__stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.hc__stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hc__stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.04em;
}

/* ── Controles (barra inferior) ────────────────────────────────────────────── */
.hc__controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.7) 0%, transparent 100%);
}

/* Barras de progresso */
.hc__bars {
    display: flex;
    flex: 1;
    gap: 0.5rem;
    align-items: center;
}

.hc__bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: height 0.2s ease;
}

.hc__bar:hover {
    height: 5px;
}

.hc__bar-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
    transform-origin: left;
}

/* Preenchimento total para slides já passados */
.hc__bar.is-done .hc__bar-fill {
    width: 100%;
}

/* ── Botões de navegação ───────────────────────────────────────────────────── */
.hc__nav {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.hc__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hc__btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ── Responsivo ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hc {
        aspect-ratio: 4 / 3;
        max-height: 400px;
        border-radius: 0.875rem;
    }

    .hc__title {
        font-size: 1.5rem;
    }

    .hc__desc {
        display: none; /* omite descrição em telas pequenas */
    }

    .hc__stat {
        display: none;
    }

    .hc__bar {
        height: 2px;
    }
}

@media (max-width: 400px) {
    .hc {
        aspect-ratio: 3 / 2;
    }
}
