/* =========================================================
   Be Sober Ministry Page - Hero Section
   ========================================================= */
.besober-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center; /* Centraliza verticalmente */
    justify-content: center;
    background-color: var(--dark-navy, #1a2a3a); /* Fundo noturno de fallback */
}

/* --- Background com Efeito "Night Awaken" --- */
.besober-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center bottom; /* Mantém a roda de oração sempre visível */
    z-index: 1;
    /* Inicia mais escuro/com zoom e revela lentamente, dando foco */
    animation: nightAwaken 12s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes nightAwaken {
    0% { transform: scale(1.15); filter: brightness(0.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* --- Máscara (Scrim) Radial Superior --- */
.besober-hero-scrim {
    position: absolute;
    inset: 0;
    /* Gradiente radial (círculo) focado no topo central, exatamente onde o texto vai ficar */
    background: radial-gradient(ellipse at center 35%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%);
    z-index: 2;
}

/* --- Container dos Textos --- */
.besober-hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px; /* Mais contido para forçar a quebra do subtítulo como na arte */
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    /* Move o bloco de texto um pouco para cima (35% da tela), deixando o centro/base livre para os rostos */
    margin-top: -15vh; 
}

/* --- Tipografia do Título com "Glow Vigilante" --- */
.besober-hero-title {
    font-family: var(--font-display), 'Montreal', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    /* Pulso suave de luz na sombra do texto */
    animation: watchfulGlow 4s infinite alternate ease-in-out;
}

@keyframes watchfulGlow {
    0% { text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 10px rgba(255,255,255,0.1); }
    100% { text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 25px rgba(255,255,255,0.4); }
}

/* --- Tipografia da Citação --- */
.besober-hero-subtitle {
    font-family: var(--font-body), 'Google Sans', sans-serif;
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin: 0 auto;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Customizando a animação de entrada (Drop-in e Slide-up) */
.besober-hero-title.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.besober-hero-subtitle.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.besober-hero-title.reveal-on-scroll.revealed,
.besober-hero-subtitle.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Responsividade (Telas Menores)
   ========================================================= */
@media (max-width: 992px) {
    .besober-hero-subtitle br {
        display: none; /* Remove a quebra de linha forçada no tablet/mobile para o texto fluir naturalmente */
    }
}

@media (max-width: 768px) {
    .besober-hero-scrim {
        /* No mobile, expandimos a sombra pois o texto ocupará mais linhas */
        background: radial-gradient(ellipse at center 40%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0) 90%);
    }

    .besober-hero-container {
        margin-top: -10vh; /* Ajuste para equilibrar o texto com os rostos no celular */
    }
}

/* =========================================================
   Be Sober Ministry Page - Pastoral Work Section (Sessão 2)
   ========================================================= */
.besober-work {
    background-color: var(--site-bg, #F8F8F7);
    padding: 120px 20px; /* Espaço para a imagem vazar confortavelmente */
    overflow: hidden;
}

.besober-work-container {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
}

/* --- O Card Principal --- */
.besober-work-card {
    display: flex;
    align-items: center; /* Centraliza verticalmente a imagem e o texto */
    background-color: var(--dark-navy, #122235);
    border-radius: 2px;
    margin: 40px 0; /* Compensa as margens negativas da imagem */
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    position: relative;
    transition: box-shadow 0.4s ease;
}

.besober-work-card:hover {
    box-shadow: 0 35px 60px rgba(18, 34, 53, 0.25); /* Sombra cresce no hover geral */
}

/* --- A Mágica da Imagem Vazando --- */
.besober-work-image {
    width: 45%;
    /* Margens negativas puxam a imagem para fora (top e bottom) */
    margin-top: -60px;
    margin-bottom: -60px;
    margin-left: -20px; /* Leve vazamento à esquerda para quebrar a geometria */
    position: relative;
    z-index: 2;
}

.besober-work-image .img-wrapper {
    width: 100%;
    height: 100%;
    min-height: 500px; /* Garante boa altura para a foto */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 15px 15px 40px rgba(0,0,0,0.3);
    /* Transição suave para o efeito de levitação */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.6s ease;
}

.besober-work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Interação "Fora da Caixinha": Levitação do Wrapper + Zoom na Imagem */
.besober-work-card:hover .besober-work-image .img-wrapper {
    transform: translateY(-15px); /* Levita */
    box-shadow: 15px 30px 50px rgba(0,0,0,0.4); /* Sombra aprofunda */
}

.besober-work-card:hover .besober-work-image img {
    transform: scale(1.05); /* Zoom sutil interno */
}

/* --- Lado Direito: Textos --- */
.besober-work-text {
    width: 55%;
    padding: 60px 80px 60px 50px; /* Topo, Direita, Baixo, Esquerda */
    color: #fff;
}

.besober-work-text p {
    font-family: var(--font-body), 'Google Sans', sans-serif;
    font-size: clamp(1.05rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.85); /* Tom levemente suave para descanso visual */
}

.besober-work-text p:last-child {
    margin-bottom: 0;
}

/* Animação personalizada de entrada do texto (Desliza da direita) */
.besober-work-text .reveal-on-scroll {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.besober-work-text .reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================================
   Responsividade (Telas Menores)
   ========================================================= */
@media (max-width: 992px) {
    .besober-work-card {
        flex-direction: column; /* Empilha no tablet */
        margin: 60px 0 0 0;
    }
    
    .besober-work-image {
        width: 85%; /* Mantém charme da quebra de borda */
        margin-top: -40px;
        margin-bottom: 0;
        margin-left: 0;
    }
    
    .besober-work-image .img-wrapper {
        min-height: 400px;
    }
    
    .besober-work-text {
        width: 100%;
        padding: 50px 40px;
    }
}

@media (max-width: 576px) {
    .besober-work {
        padding: 80px 20px;
    }
    
    .besober-work-image {
        width: 100%; /* No mobile ocupa tudo */
        margin-top: -30px;
    }
    
    .besober-work-image .img-wrapper {
        box-shadow: 0 10px 25px rgba(0,0,0,0.25);
        border-radius: 0;
    }
    
    .besober-work-text {
        padding: 40px 20px;
    }

    /* Ajusta animação no celular para vir de baixo em vez do lado */
    .besober-work-text .reveal-on-scroll {
        transform: translateY(20px);
    }
    .besober-work-text .reveal-on-scroll.revealed {
        transform: translateY(0);
    }
}

/* =========================================================
   Be Sober Ministry Page - Support & Community Section (Sessão 3)
   ========================================================= */
.besober-community {
    background-color: var(--site-bg, #F8F8F7);
    padding-top: 60px;
    /* Sem padding-bottom para que as imagens da galeria fiquem coladas no rodapé/próxima sessão */
}

.besober-community-container {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Área de Textos --- */
.besober-community-text {
    max-width: 850px; /* Mantém o texto blocadinho no meio */
    margin: 0 auto 80px auto;
    text-align: center;
}

.besober-community-text p {
    font-family: var(--font-body), 'Google Sans', sans-serif;
    font-size: clamp(1.05rem, 1.2vw, 1.15rem);
    color: #4a4a4a;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.besober-community-text h3 {
    font-family: var(--font-display), 'Montreal', sans-serif;
    font-size: clamp(1.3rem, 1.8vw, 1.55rem);
    color: var(--primary-brown-dark, #412f22);
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 2.5rem;
}

/* Frase final de esperança */
.community-hope {
    font-family: var(--font-display), 'Montreal', sans-serif !important;
    font-size: clamp(1.15rem, 1.5vw, 1.3rem) !important;
    color: var(--primary-brown-dark, #412f22) !important;
    margin-top: 3.5rem;
    margin-bottom: 0 !important;
}

/* --- Quadro Azul de Informações (Info Card) --- */
.besober-info-card {
    display: inline-flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: var(--dark-navy, #122235);
    padding: 35px 50px;
    border-radius: 2px;
    box-shadow: 0 15px 35px rgba(18, 34, 53, 0.15); /* Sombra 3D */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    cursor: default;
    text-align: left; /* Mantém o texto dentro do card alinhado à esquerda */
}

/* Interação "Fora da Caixinha": Levitação */
.besober-info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(18, 34, 53, 0.3);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
}

.info-item svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

/* Interação Mágica nos Ícones */
.besober-info-card:hover .info-item:nth-child(1) svg {
    animation: bouncePin 1s ease infinite alternate; /* O mapa dá um "pulinho" */
}

.besober-info-card:hover .info-item:nth-child(2) svg {
    transform: rotate(15deg) scale(1.1); /* O relógio gira levemente */
}

@keyframes bouncePin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

.info-item span {
    font-family: var(--font-body), 'Google Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.4;
}

/* --- Galeria Spotlight (Efeito de Foco) --- */
.besober-gallery {
    display: flex;
    width: 100%;
    height: 400px;
    background-color: #000; /* Fundo preto por trás para potencializar o efeito escuro no hover */
}

.bs-gallery-item {
    flex: 1; /* Divide as 3 imagens em partes iguais */
    position: relative;
    overflow: hidden;
}

.bs-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Transições suaves para opacidade e zoom */
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease, filter 0.5s ease;
}

/* 1. Ao passar o mouse na galeria, diminui a luz das vizinhas e deixa levemente preto e branco */
.besober-gallery:hover .bs-gallery-item img {
    opacity: 0.6;
    filter: grayscale(40%);
}

/* 2. A imagem em foco volta a brilhar 100% e dá aquele zoom dramático */
.besober-gallery .bs-gallery-item:hover img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* =========================================================
   Responsividade (Telas Menores)
   ========================================================= */
@media (max-width: 992px) {
    .besober-gallery {
        height: 300px; /* Diminui a altura no tablet para não esticar demais */
    }
}

@media (max-width: 768px) {
    .besober-community {
        padding-top: 60px;
    }
    
    .besober-info-card {
        padding: 30px;
        width: 100%; /* Ocupa a tela toda */
        align-items: center; /* Centraliza tudo no celular */
        text-align: center;
    }
    
    .info-item {
        flex-direction: column; /* Empilha ícone e texto */
        gap: 10px;
    }

    /* Galeria vira coluna no celular */
    .besober-gallery {
        flex-direction: column;
        height: auto;
    }
    
    .bs-gallery-item {
        height: 300px;
        width: 100%;
    }
    
    /* Remove o efeito de escurecer as vizinhas no touch do celular */
    .besober-gallery:hover .bs-gallery-item img {
        opacity: 1; 
        filter: none;
    }
}