/* =========================================================
   POP-UP DA HOME (publicado pelo painel em popup/admin.php)
   O conteúdo vem de popup/popup.json; quem monta tudo é js/popup.js
   ========================================================= */
.fb-popup {
    position: fixed;
    inset: 0;
    z-index: 2600;                 /* acima do menu, dos botões flutuantes e da guia da Ribeirinha */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 20, 20, .74);
    opacity: 0;
    transition: opacity .25s ease;
}

.fb-popup[hidden] {
    display: none;
}

.fb-popup.fb-popup-visivel {
    opacity: 1;
}

.fb-popup-caixa {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: min(320px, 100%);
    max-width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55);
    transform: translateY(14px) scale(.98);
    transition: transform .25s ease;
}

@supports (height: 100dvh) {
    .fb-popup-caixa {
        max-height: calc(100dvh - 32px);
    }
}

.fb-popup-visivel .fb-popup-caixa {
    transform: none;
}

.fb-popup-fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2c7a7b;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: .3s;
}

.fb-popup-fechar:hover,
.fb-popup-fechar:focus-visible {
    background: #4CAF50;
    transform: scale(1.08);
}

/* a foto assume o tamanho dela (sem faixas ao redor), limitada à tela */
.fb-popup-imagem {
    display: block;
    line-height: 0;
    flex: 0 0 auto;
}

.fb-popup-imagem img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 640px);
    margin: 0 auto;
}

a.fb-popup-imagem {
    cursor: pointer;
}

.fb-popup-corpo {
    padding: 20px 24px 24px;
    text-align: center;
}

.fb-popup-corpo h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    line-height: 1.25;
    color: #2c7a7b;
}

.fb-popup-corpo p {
    margin: 0;
    line-height: 1.65;
    color: #444;
    white-space: pre-line;          /* respeita as quebras de linha digitadas no painel */
}

.fb-popup-botao {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 28px;
    border-radius: 999px;
    background: #2c7a7b;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background .3s ease, transform .3s ease;
}

.fb-popup-botao:hover,
.fb-popup-botao:focus-visible {
    background: #4CAF50;
    transform: translateY(-2px);
}

/* pop-up só com foto: sem espaço extra embaixo */
.fb-popup-caixa.fb-popup-so-imagem .fb-popup-imagem img {
    border-radius: 18px;
}

body.fb-popup-aberto {
    overflow: hidden;
}

@media (max-width: 480px) {
    .fb-popup {
        padding: 12px;
    }

    .fb-popup-corpo {
        padding: 18px 18px 22px;
    }

    .fb-popup-corpo h2 {
        font-size: 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fb-popup,
    .fb-popup-caixa,
    .fb-popup-fechar,
    .fb-popup-botao {
        transition: none;
    }
}
