:root {
    --primary-color: #004B87;
    /* Azul Mariano / Institucional */
    --secondary-color: #C5A059;
    /* Dourado */
    --bg-light: #F9F6F0;
    /* Bege editorial */
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --transition: 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* =========================================
   HEADER & NAV (DESKTOP)
========================================= */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
    /* Altura do cabeçalho no desktop */
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    max-height: 85px;
    /* Logo grande no desktop */
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    font-size: 1.05rem;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* =========================================
   BOTÕES
========================================= */
.btn-primary {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #A38448;
    color: #fff;
}

/* =========================================
   HEROS / BANNERS
========================================= */
.hero,
.page-hero {
    /* Cor de fundo de segurança */
    background-color: var(--primary-color);

    /* O gradiente cria a camada azul transparente POR CIMA da imagem */
    background-image: linear-gradient(rgba(0, 75, 135, 0.85), rgba(0, 75, 135, 0.85)), url('../assets/nossa-senhora-bg.jpg');

    /* Ajustes para a imagem ficar perfeita */
    background-size: cover;
    background-position: center 20%;
    background-attachment: fixed;

    /* Cor do texto e alinhamento */
    color: var(--text-light);
    text-align: center;
    padding: 100px 20px;
}

.page-hero {
    padding: 80px 20px;
}

.hero h1,
.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* =========================================
   GRIDS E CARDS (COMUNIDADES, PASTORAIS)
========================================= */
.page-section {
    padding: 60px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
}

.card-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

/* =========================================
   REDES SOCIAIS (HOME E PÁGINA REDES)
========================================= */
.section-header {
    text-align: center;
    margin: 60px 0 30px;
}

.social-grid,
.social-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.social-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-bottom: 4px solid var(--secondary-color);
}

.social-card:hover {
    transform: translateY(-5px);
}

.social-icon-large svg {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
    margin-bottom: 15px;
}

/* Transmissões */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.video-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.video-placeholder {
    background: #e0e0e0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 15px;
    color: #666;
    font-weight: bold;
}

.video-card h3 {
    text-align: center;
    color: var(--primary-color);
}

/* =========================================
   PÁGINA DE CONTATO E NEWSLETTER
========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.newsletter-section {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.newsletter-form {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 250px;
}

/* =========================================
   FOOTER E TOAST
========================================= */
.footer {
    background-color: #1A1A1A;
    color: #F9F6F0;
    padding: 60px 0 20px;
    font-size: 0.9rem;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3,
.footer h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.footer-col.links a {
    display: block;
    margin-bottom: 8px;
}

.footer-col.links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-col p {
    margin-bottom: 8px;
    color: #ccc;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    transition: fill 0.3s;
}

.social-icons a:hover svg {
    fill: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    right: 30px;
    bottom: 30px;
    font-size: 17px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: visibility 0s, opacity 0.5s linear;
    opacity: 0;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

/* =========================================
   SELECT CUSTOMIZADO (FORMULÁRIO)
========================================= */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #757575;
    /* Cor cinza imitando placeholder */
    transition: border-color 0.3s;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
}

/* Criando a setinha do menu */
.custom-select-trigger::after {
    content: "▼";
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

/* Gira a setinha quando abre */
.custom-select-wrapper.open .custom-select-trigger::after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    /* Efeito de deslizar */
    transition: all 0.3s ease;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #f5f5f5;
    color: var(--text-dark);
}

.custom-option:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Onde a mágica acontece no visual */
.custom-option:hover {
    background-color: var(--primary-color);
    /* Fundo Azul Mariano */
    color: #fff;
    /* Texto branco */
}

.custom-option.selected {
    background-color: #f0f4f8;
    /* Azul bem clarinho quando selecionado */
    color: var(--primary-color);
    font-weight: bold;
}

/* =========================================
   RESPONSIVIDADE (MOBILE)
   Sempre no final do arquivo!
========================================= */
@media (max-width: 768px) {

    /* Ajustes do Cabeçalho e Logo para Celular */
    .header-content {
        height: 80px;
        /* Reduz o cabeçalho no celular */
    }

    .logo-img {
        max-height: 55px;
        /* Diminui a logo para caber perfeitamente */
    }

    .menu-toggle {
        display: block;
        /* Mostra o ícone de hambúrguer */
    }

    /* Comportamento do Menu Retrátil */
    .nav-menu {
        display: none;
        /* Esconde o menu por padrão */
        flex-direction: column;
        position: absolute;
        top: 80px;
        /* Abre logo abaixo do cabeçalho de 80px */
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
        /* Centraliza os itens no celular */
    }

    .nav-menu.active {
        display: flex;
        /* Mostra o menu quando clicado no JS */
    }

    /* Ajustes Gerais Mobile */
    .newsletter-form input {
        width: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ESTILIZAÇÃO DA AGENDA (FILTRO DE MESES)
========================================= */

/* Container do seletor */
.filter-container {
    text-align: center;
    margin: 40px auto;
    max-width: 600px;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Label acima do seletor */
.filter-container label {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    /* Azul Mariano */
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* O Select Moderno */
#mes-filtro {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 100%;
    max-width: 320px;
    padding: 14px 25px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-dark);
    background-color: #fff;

    /* Borda Dourada Suave */
    border: 2px solid #f0e6d2;
    border-radius: 50px;
    /* Estilo arredondado pill */

    /* Ícone da Seta (Dourado para combinar com a identidade) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efeito ao passar o mouse */
#mes-filtro:hover {
    border-color: var(--secondary-color);
    background-color: #fdfaf3;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.15);
}

/* Efeito ao clicar/focar */
#mes-filtro:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 75, 135, 0.1);
}

/* Estilo para quando não há eventos */
.no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    color: #999;
}

.no-events p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Ajuste específico para o select na página de eventos */
.filter-container .custom-select-wrapper {
    max-width: 300px;
    margin: 0 auto;
    /* Centraliza o select */
}

.custom-select-trigger {
    border-radius: 50px;
    /* Mantém o estilo arredondado que você gostou */
    border: 2px solid #eee;
    font-weight: 600;
}

/* Estilização das opções que ficam "dentro" da caixa */
.custom-options {
    border-radius: 15px;
    overflow: hidden;
    /* Garante que o hover não saia da borda arredondada */
}

.custom-option:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.custom-options {
    max-height: 250px; /* Limita a altura se a lista for longa */
    overflow-y: auto;  /* Adiciona scroll se necessário */
    z-index: 9999;     /* Garante que fique por cima de tudo */
}