/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Palette Variables */
:root {
    --bege-luz: #F5F5DC;      /* Cor de fundo (acolhimento e clareza) */
    --marrom-raiz: #3E2723;    /* Textos e títulos (tradição e autoridade) */
    --verde-vida: #2E7D32;     /* Botões de ação e destaques (crescimento) */
    --marrom-escuro: #2a1c19;  /* Para hovers e sombras mais escuras */
    --verde-escuro: #1b5e20;    /* Tom escuro de verde para hovers */
    --bege-claro: #f9f9ef;     /* Base clara para seções */
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--marrom-raiz);
    background-color: var(--bege-luz);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Navbar */
.navbar {
    background-color: var(--bege-luz);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*
 * Marca personalizada
 * Para substituir a imagem estática da marca Primícias por uma combinação de ícone e texto,
 * adicionamos classes auxiliares. A âncora `.brand-link` agrupa o ícone de cruz dourada e o
 * nome da igreja. Ajuste as dimensões do ícone via `.brand-icon` e aplique um peso alto e
 * cor marrom ao texto com `.brand-text`. Essas classes serão usadas em todas as páginas
 * (header) para remover referências a logotipos antigos que não se enquadram no portal.
 */
.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--marrom-raiz);
    text-transform: uppercase;
    line-height: 1;
}

/* Brand logo image styling */
.brand img {
    height: 50px;
    width: auto;
    display: block;
}
.nav-list {
    display: flex;
    gap: 1.5rem;
}
.nav-list a {
    padding: 0.5rem;
    transition: color 0.3s;
    font-weight: 600;
    color: var(--marrom-raiz);
}
.nav-list a:hover {
    color: var(--verde-vida);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    background-color: var(--verde-vida);
    color: var(--bege-luz);
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}
.btn:hover {
    background-color: var(--verde-escuro);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: var(--marrom-raiz);
    color: var(--bege-luz);
}
.btn-secondary:hover {
    background-color: var(--marrom-escuro);
}
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Hero section */
/* Use a wheat field landscape at the top of the portal as requested. An overlay ensures text legibility. */
.hero {
    background-image: linear-gradient(rgba(62, 39, 35, 0.65), rgba(62, 39, 35, 0.65)), url('../img/hero-wheat.png');
    background-size: cover;
    background-position: center;
    color: var(--bege-luz);
    padding: 6rem 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--bege-luz);
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--bege-luz);
}
.hero-buttons .btn {
    margin: 0 0.5rem;
}

/* Features section */
.features {
    padding: 3rem 0;
    background-color: var(--bege-claro);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.feature {
    padding: 2rem;
    border-radius: 8px;
    /* Os textos dos cartões de visão/ministerios/etc. devem contrastar com o fundo pastel. */
    color: var(--marrom-raiz);
    text-align: center;
}
.feature h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}
.feature p {
    font-size: 0.95rem;
}

/* Adjust feature card colors to align with palette */
/*
 * As caixas de destaque (Visão, Ministérios, Discipulado, Eventos) devem seguir a paleta oficial
 * da IPB Primícias. Em vez de tons azulados ou vermelhos alheios, utilizamos cores suaves
 * derivadas do verde‑vida (46,125,50), marrom‑raiz (62,39,35) e do bege‑luz (245,245,220).
 * As cores RGBA abaixo aplicam transparências para que o texto branco permaneça legível
 * enquanto respeitam a identidade visual da igreja.
 */
/* Ajustamos as transparências para melhorar o contraste dos textos com o fundo */
.feature-blue { background-color: rgba(46, 125, 50, 0.20); }
.feature-green { background-color: rgba(62, 39, 35, 0.15); }
.feature-yellow { background-color: rgba(245, 245, 220, 0.55); }
.feature-red { background-color: rgba(62, 39, 35, 0.25); }

/* Sermon series */
.sermon-series {
    background-color: var(--bege-claro);
    padding: 3rem 0;
}
.sermon-series h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--marrom-raiz);
}
.sermon-card {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}
.sermon-card img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    object-fit: cover;
}
.sermon-info {
    flex: 1;
}
.sermon-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--marrom-raiz);
}
.sermon-info p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--marrom-raiz);
}

/* Events */
.events {
    padding: 3rem 0;
    background-color: var(--bege-claro);
}
.events h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--marrom-raiz);
}
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.event-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.event-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.event-info {
    padding: 1rem;
}
.event-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    /* Use church palette instead of blue for event titles */
    color: var(--marrom-raiz);
}
.event-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.event-info .event-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    color: #fff;
}
.cat-ensino {
    background-color: var(--verde-vida);
}
.cat-jovens {
    background-color: var(--marrom-raiz);
}
.cat-retreat {
    /* A categoria "Retiro" usa o mesmo marrom raiz para manter a paleta coesa */
    background-color: var(--marrom-raiz);
}
.center {
    text-align: center;
    margin-top: 1.5rem;
}

/* Info & Connect sections */
.info-section,
.connect-section {
    padding: 3rem 0;
    background-color: #ffffff;
}
.info-section h2,
.connect-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    /* Update headings to use our palette */
    color: var(--marrom-raiz);
}
.info-section p,
.connect-section p {
    margin-bottom: 0.75rem;
    max-width: 800px;
    font-size: 1rem;
}
.connect-list {
    margin-top: 1rem;
    list-style: disc inside;
    padding-left: 1rem;
    max-width: 800px;
}
.connect-list li {
    margin-bottom: 0.5rem;
}
.connect-list a {
    color: #0d47a1;
    text-decoration: underline;
}
.connect-list a:hover {
    color: #083b82;
}

/* Footer */
.footer {
    background-color: var(--marrom-raiz);
    color: var(--bege-luz);
    padding: 2.5rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--bege-luz);
}
.footer p,
.footer a,
.footer form {
    font-size: 0.9rem;
    color: var(--bege-luz);
}
.footer input[type="email"] {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 0.5rem;
}
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--bege-luz);
}

/* Social list */
.social-list {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}
.social-list a {
    color: var(--bege-luz);
    opacity: 0.8;
    transition: opacity 0.3s;
}
.social-list a:hover {
    opacity: 1;
}

/* Social icons support */
.social-list img {
    width: 20px;
    height: 20px;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* Estilo para links de redes sociais sem ícone específico (ex.: YouTube como texto).
   Mantém alinhamento e aplicabilidade de cores da paleta. */
.social-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bege-luz);
    opacity: 0.8;
    transition: opacity 0.3s;
}
.social-text:hover {
    opacity: 1;
}

/* Footer links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.3rem;
}
.footer-links a {
    color: var(--bege-luz);
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s;
    text-decoration: none;
}
.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Form section */
.form-section {
    padding: 3rem 0;
    background-color: #eef2f8;
}
.form-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    /* Use marrom for headings in forms */
    color: var(--marrom-raiz);
}
.connect-form {
    max-width: 600px;
}
.connect-form h3 {
    margin-bottom: 0.5rem;
    color: var(--marrom-raiz);
    font-size: 1.3rem;
}
.connect-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}
.connect-form input[type="text"],
.connect-form input[type="email"],
.connect-form input[type="tel"],
.connect-form input[type="date"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.connect-form .checkbox-group {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.connect-form .checkbox-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.connect-form button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    background-color: var(--verde-vida);
    color: var(--bege-luz);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}
.connect-form button:hover {
    background-color: var(--verde-escuro);
}

/* Quick Links / Call‑to‑Action Section */
.cta-section {
    padding: 3rem 0;
    background-color: var(--bege-claro);
}
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.cta-card {
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    color: var(--marrom-raiz);
}
.cta-card:hover {
    transform: translateY(-4px);
}
.cta-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
}

/* When using image icons inside CTA cards */
.cta-icon {
    /* Reduce call‑to‑action icon container for balanced layout */
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}
.cta-icon img {
    /* Resize the images inside CTA icons for a cleaner look */
    max-width: 24px;
    max-height: 24px;
}
.cta-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}
.cta-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.cta-card .cta-link {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
}
.cta-card .cta-link:hover {
    text-decoration: none;
}
/* Color variants for CTA cards */
.cta-teal {
    background-color: #dcedc8;
    color: var(--marrom-raiz);
}
.cta-green {
    background-color: #e8f5e9;
    color: var(--marrom-raiz);
}
.cta-amber {
    background-color: #fff9c4;
    color: var(--marrom-raiz);
}
.cta-brown {
    background-color: #f5ebe0;
    color: var(--marrom-raiz);
}

/* ==========================================================================
   --- Ajustes de Logomarcas e Responsividade ---
   ========================================================================== */

/* Marca na Navegação (Navbar) */
.brand-icon {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

/* Logo em Destaque (Hero Section) */
.hero-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
    transition: width 0.3s ease;
}

/* Logos do Rodapé (IPB e outras) */
.footer-logos img {
    height: 40px;
    width: auto;
    display: block;
    margin-top: 1rem;
}

/* --- Media Queries para Mobile --- */
@media (max-width: 768px) {
    .brand-icon {
        height: 32px; /* Redução para equilíbrio no mobile */
    }

    .hero-logo {
        width: 60px; /* Reforço da identidade sem poluir */
    }

    .footer-logos img {
        height: 30px; /* Rodapé mais compacto */
    }
    
    /* Melhoria de performance visual: evita saltos de layout */
    .container {
        padding: 0 5%;
    }

    /* Outros ajustes responsivos originais preservados */
    .sermon-card {
        flex-direction: column;
    }
    .nav-list {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}