/* ================================================================
   GALERIA - ESTILOS COMPLETOS
   ================================================================ */

/* ================================================================
   PÁGINA DE UPLOAD
   ================================================================ */

.pagina-galeria-upload {
    background: linear-gradient(180deg, #FDF8F0 0%, #F5F5F5 100%);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* ----------------------------------------------------------------
   TELA DE ERRO DO QR CODE
---------------------------------------------------------------- */
.tela-erro-qr {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--vermelho-escuro), #5a0000);
}

.erro-qr-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 45px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.erro-qr-icone {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.erro-qr-icone i {
    font-size: 2.5rem;
    color: #E65100;
}

.erro-qr-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--vermelho-escuro);
    margin-bottom: 12px;
}

.erro-qr-msg {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ----------------------------------------------------------------
   HEADER DA GALERIA
---------------------------------------------------------------- */
.header-galeria {
    background: linear-gradient(135deg, var(--vermelho-escuro), #5a0000);
    color: #FFFFFF;
    padding: 25px 20px 30px;
    padding-top: max(25px, calc(env(safe-area-inset-top, 0px) + 15px));
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-galeria-info {
    max-width: 600px;
    margin: 0 auto;
}

.ambiente-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    color: #FFD700;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.header-galeria-titulo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 5vw, 2rem);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header-galeria-titulo i {
    color: #FFD700;
}

/* ----------------------------------------------------------------
   CONTAGEM REGRESSIVA
---------------------------------------------------------------- */
.contagem-regressiva {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-left: 5px solid var(--dourado);
    padding: 14px 20px;
    margin: 20px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contagem-regressiva.urgente {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border-left-color: #C62828;
    animation: pulseUrgente 2s ease-in-out infinite;
}

@keyframes pulseUrgente {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.contagem-icone {
    width: 44px;
    height: 44px;
    background: var(--dourado);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contagem-regressiva.urgente .contagem-icone {
    background: #C62828;
}

.contagem-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contagem-label {
    font-size: 0.75rem;
    color: #8B7355;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.contagem-valor {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--vermelho-escuro);
    font-weight: 700;
    line-height: 1.2;
}

.contagem-regressiva.urgente .contagem-valor {
    color: #C62828;
}

/* ----------------------------------------------------------------
   FORMULÁRIO DE UPLOAD
---------------------------------------------------------------- */
.galeria-upload-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 15px 60px;
}

#form-upload-galeria {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-etapa {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.upload-etapa-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--vermelho-escuro);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}

.upload-etapa-titulo small {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #999;
    font-style: italic;
}

.etapa-numero {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--dourado), var(--dourado-claro));
    color: #FFFFFF;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'Lato', sans-serif;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    padding: 13px 15px;
    border: 2px solid var(--cinza-claro);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    background: #FAFAFA;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dourado);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.campo-contador {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
    margin-top: 4px;
}

/* ----------------------------------------------------------------
   ÁREA DE UPLOAD DE FOTO
---------------------------------------------------------------- */
.foto-upload-area {
    position: relative;
}

.foto-placeholder {
    border: 2px dashed var(--dourado);
    border-radius: 14px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #FFFDF7, #FFF8E1);
    -webkit-tap-highlight-color: transparent;
}

.foto-placeholder:active,
.foto-placeholder:hover {
    border-color: var(--vermelho);
    background: linear-gradient(135deg, #FFF5F7, #FFEBEE);
    transform: scale(1.01);
}

.foto-placeholder i {
    font-size: 2.8rem;
    color: var(--dourado);
    margin-bottom: 12px;
    display: block;
}

.foto-placeholder p {
    font-size: 1rem;
    color: var(--vermelho-escuro);
    margin-bottom: 6px;
}

.foto-instrucoes {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.5;
}

.foto-preview {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.foto-preview img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: #000;
}

.btn-remover-foto {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(196, 30, 58, 0.95);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}

.btn-remover-foto:hover,
.btn-remover-foto:active {
    background: #8B0000;
    transform: scale(1.1);
}

/* ----------------------------------------------------------------
   MISSÕES
---------------------------------------------------------------- */
.missoes-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.missao-opcao {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #FAFAFA;
    border: 2px solid #E8E8E8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.missao-opcao:hover {
    border-color: var(--dourado);
    background: #FFFDF7;
}

.missao-opcao input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.missao-opcao input:checked ~ .missao-radio {
    border-color: var(--vermelho);
    background: var(--vermelho);
}

.missao-opcao input:checked ~ .missao-radio::after {
    opacity: 1;
}

.missao-opcao:has(input:checked) {
    border-color: var(--vermelho);
    background: #FFF5F7;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.12);
}

.missao-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #CCC;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.missao-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.missao-icone {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--dourado), var(--dourado-claro));
    color: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.missao-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.missao-info strong {
    font-size: 0.9rem;
    color: var(--vermelho-escuro);
    line-height: 1.3;
}

.missao-info small {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.3;
}

.missao-pontos {
    background: #FFF8E1;
    color: #E65100;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    flex-shrink: 0;
    white-space: nowrap;
}

.missao-nenhuma .missao-info {
    justify-content: center;
}

/* ----------------------------------------------------------------
   BOTÃO ENVIAR
---------------------------------------------------------------- */
.btn-enviar-grande {
    width: 100%;
    background: linear-gradient(135deg, var(--vermelho), var(--vermelho-claro));
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    font-family: 'Lato', sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.35);
    letter-spacing: 0.5px;
}

.btn-enviar-grande:active {
    transform: scale(0.98);
}

.btn-enviar-grande:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (hover: hover) {
    .btn-enviar-grande:hover:not(:disabled) {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(196, 30, 58, 0.5);
    }
}

.upload-rodape-info {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.upload-rodape-info i {
    color: #2E7D32;
}

/* ----------------------------------------------------------------
   MODAL DE SUCESSO
---------------------------------------------------------------- */
.modal-sucesso {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-sucesso-content {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlide {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.sucesso-animacao {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #FFF0F3, #FFE0E8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulseHeart 1.5s ease-in-out infinite;
}

.sucesso-animacao i {
    font-size: 2.5rem;
    color: var(--vermelho);
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-sucesso-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--vermelho-escuro);
    margin-bottom: 10px;
}

.modal-sucesso-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.pontos-ganhos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    color: #E65100;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid var(--dourado);
}

.pontos-ganhos i {
    color: var(--dourado);
}

.sucesso-acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sucesso-acoes .btn-modal {
    flex: 1 1 auto;
    min-width: 140px;
}

/* ----------------------------------------------------------------
   RODAPÉ
---------------------------------------------------------------- */
.rodape-galeria {
    background: var(--vermelho-escuro);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 25px 20px;
    padding-bottom: max(25px, calc(env(safe-area-inset-bottom, 0) + 20px));
    border-top: 3px solid var(--dourado);
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.rodape-galeria strong {
    color: var(--dourado-claro);
}

/* ----------------------------------------------------------------
   RESPONSIVIDADE
---------------------------------------------------------------- */
@media (max-width: 480px) {
    .upload-etapa {
        padding: 18px 15px;
    }
    .upload-etapa-titulo {
        font-size: 1.05rem;
    }
    .contagem-valor {
        font-size: 1.15rem;
    }
    .btn-enviar-grande {
        font-size: 1rem;
        padding: 16px 20px;
    }
    .missao-opcao {
        padding: 12px;
        gap: 10px;
    }
    .missao-icone {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    .missao-pontos {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ================================================================
   PÁGINA DE VISUALIZAÇÃO DA GALERIA
   ================================================================ */

.pagina-galeria {
    background: var(--branco-fumaca);
    min-height: 100vh;
}

/* ---------- Header da Galeria Pública ---------- */
.header-galeria-publica {
    background: linear-gradient(135deg, var(--vermelho-escuro), #5a0000);
    color: #FFFFFF;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-galeria-publica .btn-voltar {
    background: rgba(255,255,255,0.15);
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.header-galeria-publica .titulo-pagina {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Hero ---------- */
.hero-galeria {
    background: linear-gradient(180deg, #FFFFFF 0%, #FDF8F0 100%);
    padding: 45px 0 35px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.hero-galeria h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 5vw, 2.3rem);
    color: var(--vermelho-escuro);
    margin-bottom: 12px;
    padding: 0 15px;
}

.hero-galeria p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.6;
    font-style: italic;
    font-size: clamp(0.9rem, 3vw, 1.05rem);
}

/* ---------- Filtros ---------- */
.filtros-galeria {
    background: #FFFFFF;
    padding: 15px 0;
    border-bottom: 1px solid var(--cinza-claro);
    position: sticky;
    top: 74px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filtros-galeria-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 15px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.filtros-galeria-wrapper::-webkit-scrollbar { display: none; }

.filtro-galeria-btn {
    background: var(--branco-fumaca);
    color: #666;
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-height: 40px;
    font-family: 'Lato', sans-serif;
}

.filtro-galeria-btn:hover {
    background: #FFFFFF;
    border-color: var(--dourado);
    color: var(--vermelho-escuro);
}

.filtro-galeria-btn.ativo {
    background: linear-gradient(135deg, var(--vermelho), var(--vermelho-claro));
    color: #FFFFFF;
    border-color: var(--vermelho);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* ---------- Grid Masonry ---------- */
.grid-galeria {
    padding: 30px 0 60px;
    column-count: 3;
    column-gap: 15px;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 900px) {
    .grid-galeria { column-count: 2; column-gap: 12px; }
}

@media (max-width: 480px) {
    .grid-galeria { column-count: 2; column-gap: 8px; padding: 20px 10px 40px; }
}

.galeria-foto-card {
    break-inside: avoid;
    margin-bottom: 15px;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
}

@media (max-width: 480px) {
    .galeria-foto-card { margin-bottom: 8px; border-radius: 10px; }
}

.galeria-foto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.galeria-foto-imagem {
    width: 100%;
    height: auto;
    display: block;
    background: #F5F5F5;
}

.galeria-foto-info {
    padding: 12px 14px;
}

@media (max-width: 480px) {
    .galeria-foto-info { padding: 8px 10px; }
}

.galeria-foto-autor {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--vermelho-escuro);
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 480px) {
    .galeria-foto-autor { font-size: 0.8rem; }
}

.galeria-foto-legenda {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .galeria-foto-legenda { font-size: 0.75rem; }
}

.galeria-foto-acoes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
}

.btn-curtir {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.btn-curtir:hover {
    background: #FFF0F3;
    color: var(--vermelho);
}

.btn-curtir.curtido {
    color: var(--vermelho);
}

.btn-curtir.curtido i {
    animation: pulseHeart 0.6s ease;
}

.btn-denunciar {
    background: none;
    border: none;
    cursor: pointer;
    color: #BBB;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-denunciar:hover {
    background: #F5F5F5;
    color: var(--vermelho);
}

.btn-denunciar.denunciado {
    color: var(--vermelho);
}

/* Selo de missão */
.foto-missao-selo {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(139, 0, 0, 0.85);
    color: #FFFFFF;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estado vazio */
.galeria-vazia {
    text-align: center;
    padding: 70px 20px;
    color: #999;
}

.galeria-vazia i {
    font-size: 3.5rem;
    color: var(--dourado);
    margin-bottom: 20px;
    display: block;
}

.galeria-vazia h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--vermelho-escuro);
    margin-bottom: 10px;
}

/* Botão flutuante "Enviar" */
.btn-flutuante-enviar {
    position: fixed;
    bottom: max(20px, calc(env(safe-area-inset-bottom, 0) + 20px));
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--vermelho), var(--vermelho-claro));
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.5);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 90;
    animation: pulseFloat 3s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

@keyframes pulseFloat {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(196, 30, 58, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(196, 30, 58, 0.7); }
}

.btn-flutuante-enviar:hover,
.btn-flutuante-enviar:active {
    transform: scale(1.1);
    background: var(--vermelho-escuro);
}

/* Lightbox */
.lightbox-galeria {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.lightbox-galeria.ativo {
    display: flex;
}

.lightbox-conteudo {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    animation: modalSlide 0.4s ease;
}

.lightbox-imagem {
    max-height: 65vh;
    width: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.lightbox-info {
    padding: 15px 20px;
    background: #FFFFFF;
}

.lightbox-info h3 {
    font-family: 'Playfair Display', serif;
    color: var(--vermelho-escuro);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.lightbox-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.lightbox-acoes {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.lightbox-fechar {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-fechar:hover {
    background: var(--vermelho);
    transform: rotate(90deg);
}

/* ---------- Modal de Denúncia ---------- */
.modal-denuncia {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}

.modal-denuncia.ativo {
    display: flex;
}

.modal-denuncia-content {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px 25px;
    max-width: 400px;
    width: 100%;
    animation: modalSlide 0.4s ease;
}

.modal-denuncia-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--vermelho-escuro);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.modal-denuncia-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.opcoes-denuncia {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.opcao-denuncia {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #FAFAFA;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.opcao-denuncia:hover {
    border-color: var(--vermelho);
    background: #FFF5F7;
}

.opcao-denuncia input {
    position: absolute;
    opacity: 0;
}

.opcao-denuncia:has(input:checked) {
    border-color: var(--vermelho);
    background: #FFF0F3;
}

.opcao-denuncia span {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

/* ================================================================
   UTILITÁRIOS
   ================================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ================================================================
   GALERIA — VISUALIZAÇÃO (Fase 5)
   ================================================================ */

/* ----------------------------------------------------------------
   STATS RÁPIDAS
---------------------------------------------------------------- */
.stats-galeria {
    background: #FFFFFF;
    padding: 25px 0;
    border-bottom: 1px solid var(--cinza-claro);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 15px 10px;
    background: linear-gradient(180deg, #FDF8F0, #FFFFFF);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-item i {
    font-size: 1.4rem;
    color: var(--dourado);
    margin-bottom: 8px;
    display: block;
}

.stat-numero {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 5vw, 2rem);
    color: var(--vermelho-escuro);
    font-weight: 700;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    display: block;
}

@media (max-width: 400px) {
    .stats-grid { gap: 10px; }
    .stat-item { padding: 12px 6px; }
}

/* ----------------------------------------------------------------
   SEÇÃO DA GALERIA
---------------------------------------------------------------- */
.secao-galeria {
    background: var(--branco-fumaca);
    padding: 30px 0 80px;
    min-height: 400px;
}

/* ----------------------------------------------------------------
   MELHORIAS NOS CARDS
---------------------------------------------------------------- */
.galeria-foto-card {
    cursor: pointer;
}

.galeria-foto-imagem {
    transition: transform 0.6s ease;
}

.galeria-foto-card:hover .galeria-foto-imagem {
    transform: scale(1.03);
}

/* Botão de curtir */
.btn-curtir {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #999;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
    -webkit-tap-highlight-color: transparent;
    min-height: 36px;
}

.btn-curtir:hover {
    background: #FFF0F3;
    color: var(--vermelho);
}

.btn-curtir.curtido {
    color: var(--vermelho);
}

.btn-curtir.curtido i {
    font-weight: 900;
    animation: pulseHeart 0.6s ease;
}

.btn-curtir i {
    transition: transform 0.3s ease;
}

@keyframes pulseHeart {
    0% { transform: scale(1); }
    25% { transform: scale(1.4); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.btn-denunciar {
    background: none;
    border: none;
    color: #CCC;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-denunciar:hover {
    background: #F5F5F5;
    color: var(--vermelho);
}

.btn-denunciar.denunciado {
    color: var(--vermelho);
    background: #FFF0F3;
}

/* ----------------------------------------------------------------
   MODAL DE DENÚNCIA
---------------------------------------------------------------- */
.modal-denuncia {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal-denuncia.ativo {
    display: flex;
}

.modal-denuncia-content {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 30px 25px;
    max-width: 420px;
    width: 100%;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 92vh;
    overflow-y: auto;
}

@keyframes modalSlide {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-denuncia-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--vermelho-escuro);
    font-size: 1.3rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-denuncia-content > p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.opcoes-denuncia {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.opcao-denuncia {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #FAFAFA;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
}

.opcao-denuncia:hover,
.opcao-denuncia:has(input:checked) {
    border-color: var(--vermelho);
    background: #FFF5F7;
}

.opcao-denuncia input {
    width: 18px;
    height: 18px;
    accent-color: var(--vermelho);
    margin: 0;
    flex-shrink: 0;
}

.opcao-denuncia span {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

.modal-denuncia-acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-denuncia-acoes .btn-modal {
    flex: 1 1 auto;
    min-width: 120px;
}

/* ----------------------------------------------------------------
   LIGHTBOX MELHORADO
---------------------------------------------------------------- */
.lightbox-galeria {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.lightbox-galeria.ativo {
    display: flex;
}

.lightbox-conteudo {
    max-width: 900px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-imagem {
    max-height: 65vh;
    width: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.lightbox-info {
    padding: 18px 22px;
    background: #FFFFFF;
}

.lightbox-info h3 {
    font-family: 'Playfair Display', serif;
    color: var(--vermelho-escuro);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.lightbox-info > p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    font-style: italic;
}

.lightbox-acoes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
}

.lightbox-acoes .btn-curtir {
    font-size: 1rem;
    padding: 10px 18px;
    background: #FFF0F3;
    color: var(--vermelho);
}

.lightbox-acoes .btn-curtir.curtido {
    background: var(--vermelho);
    color: #FFFFFF;
}

.lightbox-acoes .btn-curtir.curtido i {
    color: #FFFFFF;
}

.lightbox-fechar {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-fechar:hover {
    background: var(--vermelho);
    transform: rotate(90deg);
}

/* ----------------------------------------------------------------
   RESPONSIVIDADE
---------------------------------------------------------------- */
@media (max-width: 480px) {
    .lightbox-info {
        padding: 14px 16px;
    }
    .lightbox-info h3 {
        font-size: 1rem;
    }
    .lightbox-info > p {
        font-size: 0.85rem;
    }
    .lightbox-fechar {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
    .modal-denuncia-content {
        padding: 22px 18px;
    }
    .modal-denuncia-content h3 {
        font-size: 1.15rem;
    }
}

/**
*
*/

.contagem-destaque {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-left: 5px solid #D4AF37;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 20px auto;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.2);
}

.contagem-destaque-icone {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.4rem;
    flex-shrink: 0;
    animation: pulseAmpulheta 2s ease-in-out infinite;
}

@keyframes pulseAmpulheta {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

.contagem-destaque-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.contagem-destaque-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8B7355;
    font-weight: 700;
}

.contagem-destaque-valor {
    font-family: 'Courier New', monospace;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    color: #8B0000;
    letter-spacing: 1px;
}

.contagem-destaque.urgente {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border-left-color: #C62828;
}

.contagem-destaque.urgente .contagem-destaque-icone {
    background: linear-gradient(135deg, #C62828, #8B0000);
}

.contagem-destaque.urgente .contagem-destaque-valor {
    color: #C62828;
}

/* ================================================================
   CORREÇÃO CRÍTICA DE SCROLL — PÁGINA DE UPLOAD
   Força o scroll a funcionar, sobrescrevendo regras globais
   ================================================================ */

html:has(body.pagina-galeria-upload),
html {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
}

body.pagina-galeria-upload {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* Espaço extra no final para o botão ficar acessível */
body.pagina-galeria-upload .galeria-upload-main {
    padding-bottom: 140px !important;
}

/* Botão enviar com margem extra */
body.pagina-galeria-upload .btn-enviar-grande {
    margin-bottom: 30px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Quando um modal abre, bloqueia o scroll (intencional) */
body.pagina-galeria-upload.modal-aberto {
    overflow: hidden !important;
}

/* ================================================================
   CORREÇÃO CRÍTICA DE SCROLL — PRIORIDADE MÁXIMA
   Sobrescreve qualquer regra de overflow:hidden em qualquer arquivo
   ================================================================ */

/* Força scroll em html e body com prioridade máxima */
html,
html body,
html body.pagina-galeria-upload,
body.pagina-galeria-upload {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overflow: auto !important;
    position: static !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
}

/* Permite scroll em todos os containers intermediários */
body.pagina-galeria-upload main,
body.pagina-galeria-upload .galeria-upload-main,
body.pagina-galeria-upload form,
body.pagina-galeria-upload .upload-etapa {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Exceção: bloqueia o scroll APENAS quando um modal está aberto */
body.pagina-galeria-upload.modal-aberto,
body.modal-aberto {
    overflow: hidden !important;
}

/* Espaço extra no final para o botão ser acessível */
body.pagina-galeria-upload .galeria-upload-main {
    padding-bottom: 150px !important;
}

/* Rodapé fica visível com margem extra */
body.pagina-galeria-upload .rodape-galeria {
    margin-bottom: 0 !important;
    padding-bottom: 40px !important;
}

/* Botão enviar com espaço extra */
body.pagina-galeria-upload .btn-enviar-grande {
    margin-bottom: 40px !important;
}

/* ================================================================
   CORREÇÃO DE RODAPÉ E SCROLL — GALERIA PÚBLICA
   ================================================================ */

body.pagina-galeria,
body.pagina-galeria-publica,
body.pagina-galeria.conteudo-aberto {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* Espaço extra antes do rodapé */
body.pagina-galeria .rodape-galeria,
body.pagina-galeria-publica .rodape-galeria {
    margin-top: 40px !important;
    padding-bottom: 40px !important;
}

/* Grid masonry com espaço inferior suficiente */
body.pagina-galeria .secao-galeria {
    padding-bottom: 60px !important;
    min-height: calc(100vh - 300px) !important;
}

/* Evita que o grid masonry corte o conteúdo */
body.pagina-galeria .grid-galeria {
    padding-bottom: 40px !important;
}

