/* ==========================================================================
   RESET E CONFIGURAÇÕES GERAIS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0d233a; /* Azul Marinho Litúrgico */
    --secondary-color: #b89243; /* Dourado */
    --text-color: #333333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --accent-red: #8b0000; /* Para a nota de clarificação */
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-transform: none;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

#page-title {
    text-align: center;
}

/* ==========================================================================
   1. TOPO E NAVEGAÇÃO
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.2rem;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

nav a:hover, nav a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* ==========================================================================
   2. BANNER PRINCIPAL (HERO)
   ========================================================================== */
.hero-banner {
    /* Desloca a imagem para a direita para que a capela fique visível do lado direito */
    background: url('../img/banner.png') no-repeat right center/cover;
    background-color: #a7d8ff; /* Tom de azul do céu como fallback caso a imagem faça loop */
    min-height: 80vh;
    padding: 60px 0;
    display: flex;
    /* Alinha o conteúdo à esquerda horizontalmente */
    justify-content: flex-start; 
    align-items: center;
    position: relative;
}

.hero-glass-container {
    background: rgba(13, 35, 58, 0.75); /* Aumentada a opacidade para 0.75 para melhor leitura sobre o céu claro */
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 50px 40px;
    border-radius: 12px;
    max-width: 600px; /* Reduzido ligeiramente para não tapar o centro da capela */
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    
    /* Cria uma margem à esquerda para a caixa não colar na borda do ecrã */
    margin-left: 8%; 
}

.hero-glass-container h2 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Sombra no texto para máxima leitura */
}

.hero-glass-container .motto {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--secondary-color); /* Teu tom dourado */
    font-style: italic;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-glass-container .sub-motto {
    font-size: 1.05rem;
    font-weight: 400;
    color: #f1f5f9;
    margin-bottom: 35px;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Botão principal adaptado ao contraste */
.btn-primary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 14px 35px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #a37f33;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Ajuste de responsividade para ecrãs de telemóvel */
@media (max-width: 768px) {
    .hero-banner {
        min-height: 60vh;
        padding: 40px 15px;
    }
    
    .hero-glass-container {
        padding: 30px 20px;
    }

    .hero-glass-container h2 {
        font-size: 1.6rem;
    }

    .hero-glass-container .motto {
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    .hero-banner {
        /* Em ecrãs mais pequenos, volta a centralizar a capela para não cortar o edifício */
        background-position: center center;
        justify-content: center;
    }

    .hero-glass-container {
        margin-left: 0;
        max-width: 90%;
    }
}

/* ==========================================================================
   3. NOTA DE CLARIFICAÇÃO
   ========================================================================== */
.clarification-note {
    background-color: #fff5f5;
    padding: 40px 0;
    border-left: 5px solid var(--accent-red);
    margin: 40px 0;
}

.clarification-note h3 {
    color: var(--accent-red);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.clarification-note p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.clarification-note p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   4. COMUNIDADES (GRID)
   ========================================================================== */
.communities-preview {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    font-size: 1rem;
}

.grid-communities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.community-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #ddd; /* Fallback */
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card-content .location {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.card-content .description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-secondary {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ==========================================================================
   5. DESTAQUES / AGENDA
   ========================================================================== */
.highlights {
    padding: 60px 0;
}

.highlights h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
}

.highlights-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.highlight-item {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 6px;
    gap: 25px;
}

.date-badge {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    min-width: 80px;
    text-align: center;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    border-bottom: 3px solid var(--secondary-color);
}

.highlight-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.highlight-text p {
    font-size: 0.9rem;
    color: #555;
}

.center-btn {
    text-align: center;
    margin-top: 20px;
}

.btn-link {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
}

.btn-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* ==========================================================================
   6. RODAPÉ (FOOTER)
   ========================================================================== */
footer {
    background-color: var(--primary-color);
    color: #e0e0e0;
    padding: 60px 0 20px 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 40px;
}

footer h5 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    display: inline-block;
}

.footer-about p {
    line-height: 1.7;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #999;
}

.civil-note {
    margin-top: 5px;
    font-style: italic;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVIDADE)
   ========================================================================== */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 5px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .highlight-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Ajuste do bloco do clero em mobile */
@media (max-width: 768px) {
    .clero-header {
        flex-direction: column !important;
        text-align: center;
        gap: 15px !important;
    }

    .clero-header img {
        width: 140px !important;
        height: auto !important;
    }
}

