/* ========== HERO MINISTÉRIOS — foto real + overlay leve ========== */
.ministerios-hero {
    position: relative;
    height: auto;
    height: calc(100vh - 71px);
    min-height: 500px;
    max-height: 760px;
    padding: 0;
    margin-top: 71px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
}

/* Foto de fundo — mesma lógica do hero do index */
.ministerios-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('images/ministerios_hero.png');
    background-size: cover;
    background-position: center 45%;
    filter: saturate(1.2) brightness(1.0) contrast(1.05);
    z-index: 1;
}

/* Overlay leve — escuro top/bottom, aberto no centro */
.ministerios-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 40, 0.55) 0%,
        rgba(5, 10, 40, 0.15) 40%,
        rgba(5, 10, 40, 0.15) 65%,
        rgba(5, 10, 40, 0.65) 100%
    );
    z-index: 2;
}

.ministerios-hero__content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

/* Tag acima do título */
.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fde68a;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Reutiliza .hero-title e .hero-subtitle do style.css */

/* Stats */
.hero-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    color: #fde68a;
}

.stat-item h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 6px 0;
    color: white;
}

.stat-item p {
    font-size: 0.82rem;
    margin: 0;
    opacity: 0.88;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ========== STATS STRIP ========== */
.stats-strip {
    background: linear-gradient(135deg, #0f2368 0%, #1e3a8a 100%);
    padding: 0;
    box-shadow: 0 4px 20px rgba(15,35,104,0.25);
}

.stats-strip__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.stats-strip__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 48px;
    transition: background 0.3s ease;
    cursor: default;
}

.stats-strip__item:hover {
    background: rgba(255,255,255,0.06);
}

.stats-strip__item i {
    font-size: 1.8rem;
    color: #fde68a;
    flex-shrink: 0;
}

.stats-strip__item strong {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    display: block;
}

.stats-strip__item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 2px;
}

.stats-strip__divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* ========== FILTRO ========== */
.filter-section {
    background: white;
    border-bottom: 1px solid #e8f0fe;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 26px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}

/* ========== GRID DE MINISTÉRIOS ========== */
.ministerios-section {
    background: #f1f5f9;
}

.ministerios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ========== CARD ========== */
.ministerio-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease backwards;
}

.ministerio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 55px rgba(0,0,0,0.14);
}

/* Imagem do card — altura maior, foto mais visível */
.card-image {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.ministerio-card:hover .card-image {
    transform: scale(1.04);
}

/* Overlay por categoria — sutil, só no bottom para legibilidade */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.05) 40%,
        rgba(0,0,0,0.45) 100%
    );
    transition: opacity 0.3s ease;
}

.card-overlay--adoracao {
    background: linear-gradient(
        to bottom,
        rgba(30, 58, 138, 0.08) 0%,
        rgba(30, 58, 138, 0.08) 40%,
        rgba(30, 58, 138, 0.55) 100%
    );
}

.card-overlay--familia {
    background: linear-gradient(
        to bottom,
        rgba(5, 100, 70, 0.06) 0%,
        rgba(5, 100, 70, 0.06) 40%,
        rgba(5, 100, 70, 0.48) 100%
    );
}

.card-overlay--servico {
    background: linear-gradient(
        to bottom,
        rgba(109, 40, 217, 0.06) 0%,
        rgba(109, 40, 217, 0.06) 40%,
        rgba(109, 40, 217, 0.48) 100%
    );
}

/* Badge de categoria — sobre a foto */
.card-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 3;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.badge--adoracao {
    background: rgba(30, 58, 138, 0.85);
    color: #bfdbfe;
    border: 1px solid rgba(191,219,254,0.3);
}

.badge--familia {
    background: rgba(5, 100, 70, 0.85);
    color: #a7f3d0;
    border: 1px solid rgba(167,243,208,0.3);
}

.badge--servico {
    background: rgba(109, 40, 217, 0.85);
    color: #e9d5ff;
    border: 1px solid rgba(233,213,255,0.3);
}

/* Ícone sobre a foto — canto inferior esquerdo */
.card-icon {
    position: absolute;
    bottom: -22px;
    left: 24px;
    width: 52px;
    height: 52px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 4;
    transition: transform 0.35s ease;
}

.ministerio-card:hover .card-icon {
    transform: scale(1.15);
}

.card-icon i {
    font-size: 1.4rem;
    color: #1e3a8a;
}

/* Conteúdo do card */
.card-content {
    padding: 36px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-description {
    color: #64748b;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.btn-saiba-mais {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    padding: 11px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    align-self: flex-start;
    box-shadow: 0 6px 18px rgba(59,130,246,0.28);
}

.btn-saiba-mais:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(59,130,246,0.38);
}

/* Delay animações */
.ministerio-card:nth-child(1) { animation-delay: 0.05s; }
.ministerio-card:nth-child(2) { animation-delay: 0.10s; }
.ministerio-card:nth-child(3) { animation-delay: 0.15s; }
.ministerio-card:nth-child(4) { animation-delay: 0.20s; }
.ministerio-card:nth-child(5) { animation-delay: 0.25s; }
.ministerio-card:nth-child(6) { animation-delay: 0.30s; }
.ministerio-card:nth-child(7) { animation-delay: 0.35s; }
.ministerio-card:nth-child(8) { animation-delay: 0.40s; }
.ministerio-card:nth-child(9) { animation-delay: 0.45s; }

/* ========== CTA SECTION ========== */
.cta-section {
    background: linear-gradient(135deg, #0f2368 0%, #1e3a8a 50%, #3b82f6 100%);
    color: white;
}

.cta-title {
    font-size: 2.4rem;
    font-weight: 800;
}

.cta-text {
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.92;
    line-height: 1.7;
}

/* ========== MODAL DE GALERIA ========== */
.modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 22px 28px;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-title {
    font-weight: 700;
    font-size: 1.6rem;
}

.modal-description {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.8;
    padding: 18px 22px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #1e3a8a;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 1.8rem;
    color: white;
}

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #1e3a8a;
    color: white;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    padding: 8px 22px;
    border-radius: 25px;
    font-weight: 600;
    color: #1e3a8a;
    font-size: 0.9rem;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .ministerios-hero {
        height: auto;
        min-height: 55vh;
        padding: 30px 0;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .stats-strip__inner {
        flex-direction: column;
    }

    .stats-strip__item {
        padding: 16px 24px;
        width: 100%;
        justify-content: center;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .stats-strip__divider {
        display: none;
    }

    .hero-stats {
        gap: 12px;
    }

    .stat-item {
        min-width: 110px;
        padding: 14px 18px;
    }

    .ministerios-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 576px) {
    .card-content {
        padding: 30px 18px 18px;
    }

    .card-icon {
        width: 46px;
        height: 46px;
        bottom: -20px;
    }

    .card-icon i {
        font-size: 1.2rem;
    }
}
/* ========== BACKGROUND IMAGES DOS CARDS (sem inline style) ========== */
.card-image--louvor      { background-image: url('images/ministerios/louvor/capa.jpg'); }
.card-image--intercessao { background-image: url('images/ministerios/intercessao/capa.jpg'); }
.card-image--recepcao    { background-image: url('images/ministerios/recepcao/capa.jpg'); }
.card-image--jovens      { background-image: url('images/ministerios/jovens/capa.jpg'); }
.card-image--juniores    { background-image: url('images/ministerios/juniores/capa.jpg'); }
.card-image--mulheres    { background-image: url('images/ministerios/mulheres/capa.jpg'); }
.card-image--discipulado { background-image: url('images/ministerios/discipulado/capa.jpg'); }
.card-image--homens      { background-image: url('images/ministerios/homens/capa.jpg'); }
.card-image--casais      { background-image: url('images/ministerios/casais/capa.jpg'); }
/* ========== MODAL MEMBRESIA ========== */
.membresia-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 40, 0.75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.membresia-modal.active {
    opacity: 1;
    pointer-events: all;
}

.membresia-modal__box {
    background: white;
    border-radius: 18px;
    padding: 24px 24px 20px;
    max-width: 380px;
    width: 100%;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    animation: modalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.membresia-modal.active .membresia-modal__box {
    animation: modalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.membresia-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.membresia-modal__close:hover {
    background: #1e3a8a;
    color: white;
    transform: rotate(90deg);
}

.membresia-modal__icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.membresia-modal__icon i {
    font-size: 1.4rem;
    color: white;
}

.membresia-modal__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.membresia-modal__subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.membresia-modal__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.membresia-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.membresia-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
}

.membresia-input {
    padding: 9px 13px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease;
    outline: none;
    width: 100%;
}

.membresia-input:focus {
    border-color: #3b82f6;
    background: white;
}

.membresia-btn-enviar {
    margin-top: 6px;
    padding: 11px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(59,130,246,0.3);
}

.membresia-btn-enviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59,130,246,0.4);
}

@media (max-width: 480px) {
    .membresia-modal__box {
        padding: 22px 18px;
    }

    .membresia-modal__title {
        font-size: 1rem;
    }
}