/* =========================================================
   HIFEM — MEMÓRIA
   Galeria/carrossel de história e memória do grupo
   ========================================================= */

@import "./global.css";

/* =========================================================
   SEÇÃO DE MEMÓRIA
   ========================================================= */

.memoria-section {
    margin-top: 18px;
}

.memoria-intro {
    max-width: 880px;

    color: var(--text);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.65;
}

/* =========================================================
   GALERIA
   ========================================================= */

.memoria-galeria {
    margin-top: 38px;

    background:
        linear-gradient(
            135deg,
            rgba(250, 248, 242, 0.86),
            rgba(238, 232, 220, 0.66)
        );

    border: 1px solid rgba(184, 155, 96, 0.26);
    box-shadow: var(--shadow);

    overflow: hidden;
}

/* Janela visível do carrossel */
.memoria-viewport {
    width: 100%;
    overflow: hidden;

    touch-action: pan-y;
}

/* Faixa que desliza */
.memoria-track {
    display: flex;
    width: 100%;

    transition: transform 0.55s ease;
    will-change: transform;
}

/* Cada slide ocupa 100% da largura */
.memoria-slide {
    flex: 0 0 100%;
    min-width: 100%;

    padding: 34px;
}

/* =========================================================
   IMAGEM
   ========================================================= */

.memoria-figure {
    display: grid;
    gap: 20px;

    margin: 0;
}

.memoria-figure img {
    width: 100%;
    max-height: 620px;

    object-fit: contain;
    object-position: center;

    background: var(--paper-2);
    border: 1px solid rgba(184, 155, 96, 0.28);
    box-shadow: 0 18px 45px rgba(16, 47, 54, 0.08);

    filter: saturate(0.9) contrast(0.97);
}

/* =========================================================
   LEGENDA
   ========================================================= */

.memoria-caption {
    max-width: 860px;

    padding-left: 18px;
    border-left: 3px solid var(--gold);
}

.memoria-caption strong {
    display: block;

    color: var(--blue-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.05;
    font-weight: 600;

    margin-bottom: 8px;
}

.memoria-caption span {
    display: block;

    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.7;
}

/* =========================================================
   CONTROLES
   ========================================================= */

.memoria-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 20px 34px 28px;

    border-top: 1px solid rgba(184, 155, 96, 0.22);
}

.memoria-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.memoria-prev,
.memoria-next {
    width: 44px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid rgba(184, 155, 96, 0.58);

    color: var(--blue-dark);

    font-size: 22px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.memoria-prev:hover,
.memoria-prev:focus-visible,
.memoria-next:hover,
.memoria-next:focus-visible {
    background: var(--gold);
    color: var(--paper);
    border-color: var(--gold);
    transform: translateY(-2px);
    outline: none;
}

.memoria-counter {
    color: var(--gold);

    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;

    white-space: nowrap;
}

/* =========================================================
   PONTOS INDICADORES
   ========================================================= */

.memoria-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;
}

.memoria-dot {
    width: 9px;
    height: 9px;

    border-radius: 999px;
    border: 1px solid rgba(184, 155, 96, 0.72);
    background: transparent;

    cursor: pointer;

    transition:
        width 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.memoria-dot.active,
.memoria-dot[aria-current="true"] {
    width: 24px;
    background: var(--gold);
    border-color: var(--gold);
}

.memoria-dot:hover,
.memoria-dot:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
    outline: none;
}

/* =========================================================
   ESTADO VAZIO / ERRO
   ========================================================= */

.memoria-empty {
    padding: 36px;

    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;

    background: rgba(250, 248, 242, 0.78);
    border: 1px solid rgba(184, 155, 96, 0.22);
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 820px) {
    .memoria-slide {
        padding: 26px;
    }

    .memoria-figure img {
        max-height: 520px;
    }

    .memoria-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;

        padding: 20px 26px 26px;
    }

    .memoria-buttons {
        justify-content: space-between;
    }

    .memoria-counter {
        text-align: center;
    }
}

@media (max-width: 560px) {
    .memoria-slide {
        padding: 20px;
    }

    .memoria-figure img {
        max-height: 430px;
    }

    .memoria-caption {
        padding-left: 14px;
    }

    .memoria-caption strong {
        font-size: 30px;
    }

    .memoria-caption span {
        font-size: 15px;
    }

    .memoria-prev,
    .memoria-next {
        width: 42px;
        height: 42px;
    }

    .memoria-dots {
        gap: 7px;
    }
}

@media (max-width: 420px) {
    .memoria-figure img {
        max-height: 360px;
    }

    .memoria-caption strong {
        font-size: 27px;
    }
}