/* ========================================================= */
/* 1. CSS RESET & GLOBAL STYLES */
/* ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

body {
    font-family: 'Georgia', serif; 
    line-height: 1.6;
    color: #333; 
    background-color: #f8f8f8; 
}

a {
    text-decoration: none;
    color: #005691; 
}

a:hover {
    color: #a4704b; 
    text-decoration: underline;
}

h1, h2, h3 {
    font-family: 'Palatino', 'Times New Roman', serif; 
    color: #1a1a1a;
    margin-bottom: 0.5em;
}

/* ========================================================= */
/* 2. HEADER & NAVIGATION */
/* ========================================================= */
.main-header {
    background-color: #ffffff; 
    border-bottom: 2px solid #a4704b; 
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo a {
    display: flex;
    align-items: center;
    color: #1a1a1a;
}

.logo h1 {
    font-size: 1.5em;
    margin-left: 10px;
    margin-bottom: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    display: block;
    padding: 15px 20px;
    font-weight: bold;
    text-transform: uppercase;
    color: #1a1a1a;
    border-bottom: 3px solid transparent; 
    transition: border-bottom 0.3s;
}

.main-nav ul li a:hover {
    color: #005691;
    text-decoration: none;
    border-bottom: 3px solid #005691;
}

/* --------------------------------------------------------- */
/* HAMBURGER MENU STYLES (Mobile Only) */
/* --------------------------------------------------------- */

.hamburger-menu {
    display: none; /* Hide by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010; 
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #1a1a1a;
    transition: all 0.3s ease-in-out;
}

/* Active state (Menu Open) */
.main-header.nav-open .hamburger-menu .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.main-header.nav-open .hamburger-menu .bar:nth-child(2) {
    opacity: 0;
}

.main-header.nav-open .hamburger-menu .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ========================================================= */
/* 3. HERO SECTION (FIXES APPLIED HERE) */
/* ========================================================= */
.hero-section {
    /* Placeholder image for a professional family portrait */
    background: url('images/bg.jpg') center/cover no-repeat; 
    height: 500px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* FIX: Increased opacity for better text readability */
    background-color: rgba(0, 0, 0, 0.55); 
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 20px; 
}

.hero-content h2 {
    font-size: 2.2em; 
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px; 
}

.hero-content p {
    font-size: 1.1em; 
    margin-bottom: 25px;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.primary-cta {
    background-color: #a4704b; 
    color: #ffffff;
    border: 2px solid #a4704b;
}

.primary-cta:hover {
    background-color: #8c5d3b;
    border-color: #8c5d3b;
    text-decoration: none;
}


/* ========================================================= */
/* 4. SECTIONS & GENERAL LAYOUT (index.html) */
/* ========================================================= */
main section {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.news-highlights {
    text-align: center;
}

.card-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

/* FIX: Improved News Card Styling */
.news-card {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-top: 5px solid #005691; 
    padding: 15px;
    text-align: left;
    transition: box-shadow 0.3s;
    border-radius: 4px;
    /* Ensure link is pushed to bottom for uniform look */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-card img {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 10px;
}

.news-card h4 {
    font-size: 1.1em;
    min-height: 40px; 
    margin-top: 0;
}

.news-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.news-card a {
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
    margin-top: auto; /* Push the link to the bottom */
}


.key-pillars {
    background-color: #ebebeb; 
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: center;
    margin-top: 30px;
}

.pillar-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.1);
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #ddd;
}

.pillar-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.pillar-item .icon {
    font-size: 3em; /* Larger icons for visibility */
    color: #a4704b;
    margin-bottom: 10px;
    display: block;
}

.pillar-item h4 {
    color: #005691;
    margin: 0;
}


/* ========================================================= */
/* 5. FAMILY MEMBERS GRID (family.html) */
/* ========================================================= */
.family-members-grid-section {
    background-color: #f8f8f8; 
    padding: 30px 5%; 
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-dirz {
    font-size: 1.5em; 
    color: #1a1a1a;
    text-align: left;
    margin-bottom: 20px;
    padding: 0 15px; 
}

.members-grid-dirz {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px; 
    padding: 0 15px;
}

.member-card-dirz {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center; 
    
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    
    color: #1a1a1a;
    text-align: center;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.member-card-dirz:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    border-color: #a4704b; 
}

.card-image-wrapper {
    width: 100%;
    height: 350px; 
    overflow: hidden;
    position: relative;
    background: #f8f8f8; 
}

.member-card-dirz img {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s;
}

.member-card-dirz:hover img {
    transform: scale(1.05);
}

.card-info {
    padding: 15px 10px 10px 10px;
    text-align: center;
    width: 100%;
}

.member-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 3px;
    color: #005691;
}

.member-title {
    font-size: 1em;
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.arrow-icon {
    font-size: 1.5em;
    color: #005691;
    padding-bottom: 15px;
    opacity: 0.8;
    transition: color 0.3s;
}

.member-card-dirz:hover .arrow-icon {
    opacity: 1;
    color: #a4704b; 
}

/* ========================================================= */
/* 6. CONTENT PAGE STYLES (NEWS, HISTORY, CONTACT, POLICY) */
/* ========================================================= */

.page-content {
    padding: 40px 5%;
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-content h2 {
    font-size: 2em;
    border-bottom: 2px solid #a4704b;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.page-content h3 {
    margin-top: 25px;
    color: #005691;
    font-size: 1.4em;
}

.intro-text {
    font-style: italic;
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #666;
}

/* --- News List Specific Styles --- */
.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.full-article-card {
    display: flex;
    gap: 20px;
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 5px solid #005691;
    border-radius: 4px;
    align-items: center;
    transition: box-shadow 0.3s;
}

.full-article-card:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.full-article-card img {
    /* Placeholder image */
    content: url('');
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.article-image-container img {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.article-summary h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.article-meta {
    font-size: 0.9em;
    color: #a4704b;
    margin-bottom: 10px;
}

.read-more-btn {
    padding: 8px 15px;
    font-size: 0.9em;
    margin-top: 10px;
    text-transform: none;
}

.pagination {
    text-align: center;
    padding-top: 30px;
    font-weight: bold;
}

.pagination a, .pagination span {
    margin: 0 10px;
}

.article-page image {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 25px;
    border-radius: 5px;
}

/* --- History Page Specific Styles --- */
.history-page .main-image {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 25px;
    border-radius: 5px;
}

.history-page .timeline ul {
    list-style: none;
    padding-left: 20px;
    border-left: 2px solid #a4704b;
    margin-top: 20px;
}

.history-page .timeline li {
    padding: 10px 0 10px 15px;
    position: relative;
}

.history-page .timeline li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 18px;
    width: 10px;
    height: 10px;
    background-color: #005691;
    border-radius: 50%;
}

/* --- Charities Page Specific Styles --- */
.charity-focus {
    background-color: #f4f4f4;
    padding: 20px;
    border-left: 5px solid #005691;
    margin-bottom: 30px;
    border-radius: 4px;
}

.charity-focus ul {
    list-style: disc;
    padding-left: 40px;
    margin-top: 10px;
}

.patronage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.patronage-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
}

.patronage-item h4 {
    margin-top: 0;
    color: #a4704b;
}

/* --- Contact Page Specific Styles --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-top: 20px;
}

.contact-info h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #a4704b;
}

.contact-info p {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 1em;
}

.contact-form button {
    width: 100%;
    margin-top: 10px;
}

/* --- Policy/Accessibility Pages Specific Styles --- */
.policy-page ul, .accessibility-page ul {
    list-style: disc;
    padding-left: 40px;
    margin-bottom: 20px;
}

/* --- Pillar Detail Pages Specific Styles (New) --- */
.pillar-detail .pillar-main-image {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 25px;
    border-radius: 5px;
}

.focus-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.area-card {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 5px;
    border-left: 3px solid #005691;
    transition: background-color 0.3s;
}

.area-card:hover {
    background-color: #e5e5e5;
}

.area-card h4 {
    color: #a4704b;
    margin-top: 0;
}

.highlight-box, .progress-info {
    border: 1px solid #ddd;
    padding: 20px;
    background-color: #fffaf0; /* Soft highlight color */
    border-radius: 5px;
    margin-top: 30px;
}

.highlight-box h4, .progress-info h4 {
    margin-top: 0;
    color: #005691;
}


/* ========================================================= */
/* 7. FOOTER */
/* ========================================================= */
.main-footer {
    background-color: #1a1a1a; 
    color: #cccccc;
    text-align: center;
    padding: 20px 5%;
    font-size: 0.9em;
}

.footer-links a {
    color: #cccccc;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #a4704b;
}

/* ========================================================= */
/* 8. RESPONSIVENESS (Media Queries) */
/* ========================================================= */

@media (max-width: 900px) {
    /* --- HEADER / NAVIGATION MOBILE --- */
    .main-header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 10px 5%;
    }

    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        display: none; 
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background-color: #ffffff; 
        border-top: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .main-header.nav-open .main-nav {
        display: block;
    }

    .main-nav ul {
        flex-direction: column; 
        text-align: left;
        padding: 0;
    }

    .main-nav ul li a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .main-nav ul li a:hover {
        border-bottom: none; 
        background-color: #f0f0f0;
    }
    
    /* --- GENERAL MOBILE ADJUSTMENTS --- */
    .card-container {
        flex-direction: column; 
        gap: 20px;
    }
    
    .full-article-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .full-article-card img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    /* --- FAMILY GRID MOBILE --- */
    .members-grid-dirz {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .card-image-wrapper {
        height: 300px; 
    }

    /* --- CONTACT PAGE MOBILE --- */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* --- PILLAR DETAIL MOBILE --- */
    .focus-areas-grid {
        grid-template-columns: 1fr;
    }
    
    .history-page .main-image {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 25px;
    border-radius: 5px;
}

    .pillar-detail .pillar-main-image {
    /* Placeholder image */
    content: url('');
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 25px;
    border-radius: 5px;
    }


}

@media (max-width: 600px) {
    .hero-content h2 {
        font-size: 1.8em;
    }

    .logo h1 {
        font-size: 1.3em;
    }
    
    .page-content {
        padding: 20px 4%;
    }
}

.profile-content {
        flex-direction: column;
        gap: 30px;
    }

    .profile-photo-wrapper {
        flex: none;
        width: 80%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto; /* Centraliza a foto em mobile */
    }
    

/* ========================================================= */
/* 9. RESPONSIVIDADE (Media Queries) */
/* ========================================================= */

@media (max-width: 900px) {
    
    /* Configuração do Header para o mobile */
    .main-header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 10px 5%;
    }

    /* Exibe o hambúrguer e esconde a navegação */
    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        display: none; /* Escondido por padrão em mobile */
        position: absolute;
        top: 60px; /* Abaixo do header */
        left: 0;
        width: 100%;
        background-color: #ffffff; 
        border-top: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    /* Estado ativo: Menu Aberto */
    .main-header.nav-open .main-nav {
        display: block;
    }

    .main-nav ul {
        flex-direction: column; 
        text-align: left;
        padding: 0;
    }

    .main-nav ul li a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .main-nav ul li a:hover {
        border-bottom: none; 
        background-color: #f0f0f0;
    }
    
    /* --- AJUSTES GERAIS MOBILE --- */
    .card-container {
        flex-direction: column; /* Colunas para mobile */
        gap: 20px;
    }
    
    .full-article-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .full-article-card img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    /* --- FAMILY GRID MOBILE --- */
    .members-grid-dirz {
        grid-template-columns: 1fr; /* 1 coluna em mobile */
        gap: 20px;
    }
    
    .member-card-dirz {
        max-width: 350px;
        margin: 0 auto; /* Centraliza cartões */
    }

    /* --- RESPONSIVIDADE DA PÁGINA DE PERFIL (Bloco 10) --- */
    .profile-content {
        flex-direction: column;
        gap: 30px;
    }

    .profile-photo-wrapper {
        flex: none;
        width: 80%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto; 
    }
}
    
/* ========================================================= */
/* 10. ESTILOS DA PÁGINA DE PERFIL (PROFILE) */
/* ========================================================= */
.profile-container {
    padding: 40px 5%;
    max-width: 1000px;
    margin: 40px auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.profile-header h2 {
    font-size: 2.5em;
    color: #005691; /* Cor principal da família */
}

.profile-header p {
    font-size: 1.2em;
    color: #a4704b; /* Cor de destaque (sépia/marrom) */
    font-weight: bold;
}

.profile-content {
    display: flex;
    gap: 40px;
}

.profile-photo-wrapper {
    flex: 0 0 350px; /* Largura fixa para desktop */
    max-width: 350px;
    height: 350px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-bio {
    flex-grow: 1;
}

.profile-bio h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.profile-bio p {
    margin-bottom: 20px;
    text-align: justify;
}



/* --------------------------------------------------------- */
/* CORREÇÃO DE RESPONSIVIDADE PARA O MODO MOBILE (ADICIONAR DENTRO DO @media) */
/* --------------------------------------------------------- */
/* Este bloco deve ser inserido DENTRO do seu @media (max-width: 900px) já existente. */
/* Se você não tiver esta media query, adicione-a no final do seu CSS: */
/*
@media (max-width: 900px) {
    .profile-content {
        flex-direction: column;
        gap: 30px;
    }

    .profile-photo-wrapper {
        flex: none;
        width: 80%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto; 
    }
}
*/