/* =====================================================
   ABOUT PAGE - Design Institucional Profissional
   Todos os títulos alinhados à ESQUERDA
   ===================================================== */

:root {
    --about-primary: #1a1a2e;
    --about-text: #2d3436;
    --about-text-light: #636e72;
    --about-bg: #fafbfc;
    --about-white: #ffffff;
    --about-border: #e5e5e5;
    --about-gold: #c9a227;
}

/* Page Structure */
.about-page {
    padding-top: 40px;
    min-height: 100vh;
    background: var(--about-white);
}

.about-layout,
.about-container {
    display: grid;
    grid-template-columns: 1fr 240px;
    max-width: 1300px;
    margin: 0 auto;
    gap: 80px;
}

/* SIDEBAR - Flyout Style */
.about-sidebar {
    padding: 80px 0 60px 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    align-self: start;
    margin-left: -32px; /* puxa o submenu mais à esquerda para melhor alinhamento visual */
    z-index: 10; /* garante que fique acima de cards com transform */
}

.about-nav-header {
    font-family: "DM Sans", -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--about-primary);
    margin-bottom: 24px;
    padding-right: 24px;
    text-align: right;
    position: relative;
}

.about-nav-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: -8px;
    bottom: -12px;
    width: 0; /* sem traço forte no título principal */
    background: transparent;
}

.about-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.about-nav::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px; /* linha cinza um pouco mais larga */
    background: var(--about-border);
}

.about-nav-link {
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #888;
    text-decoration: none;
    padding: 14px 24px 14px 0;
    text-align: right;
    position: relative;
    transition: color 0.2s ease;
    display: block;
}

.about-nav-link:hover {
    color: #555;
}

.about-nav-link.active {
    color: var(--about-primary);
    font-weight: 500;
}

.about-nav-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px; /* mais negrito no item ativo */
    height: 28px;
    background: var(--about-primary);
}

/* Main Content - TÍTULOS À ESQUERDA */
.about-content {
    padding: 44px 40px 72px 72px;
    min-width: 0; /* evita que o grid item cresça além da coluna e invada o sidebar */
}

.about-section {
    margin-bottom: 64px;
    scroll-margin-top: 0;
}

.section-label {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--about-text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    text-align: left;
}


.section-title {
    font-family: "DM Sans", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--about-primary);
    margin-bottom: 16px;
    line-height: 1.15;
    text-align: left;
    letter-spacing: -0.01em;
}

h2.section-title {
    font-size: 32px;
    margin-bottom: 14px;
    line-height: 1.15;
}

.section-content,
.section-text {
    text-align: left;
}

.section-content p,
.section-text p,
.section-text {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--about-text);
    margin-bottom: 14px;
    text-align: left;
}

/* IMAGEM DO PASTOR - GRANDE */
.pastor-image,
.section-image {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    margin-bottom: 40px;
    aspect-ratio: 16/10;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.pastor-greeting {
    font-family: "DM Sans", sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--about-text);
    margin-bottom: 24px;
    line-height: 1.6;
    font-style: italic;
    border-left: 3px solid var(--about-gold);
    padding-left: 20px;
    text-align: left;
}

/* Beliefs Box */
.beliefs-box {
    background: var(--about-primary);
    border-radius: 16px;
    padding: 50px;
    margin-top: 40px;
}

.beliefs-box-label {
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--about-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-align: left;
}

.beliefs-box-title {
    font-family: "DM Sans", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    text-align: left;
}

.beliefs-box-subtitle {
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.6);
    margin-bottom: 40px;
    text-align: left;
}

.beliefs-accordion {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.belief-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.belief-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.belief-header:hover {
    opacity: 0.8;
}

.belief-title {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--about-text);
    text-align: left;
}

/* Quando dentro do box escuro, texto branco */
.beliefs-box .belief-title {
    color: #fff;
}

.belief-toggle {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.belief-toggle::before,
.belief-toggle::after {
    content: '';
    position: absolute;
    background: #fff;
    transition: transform 0.3s;
}

.belief-toggle::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.belief-toggle::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.belief-item.open .belief-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.belief-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.belief-item.open .belief-content {
    max-height: 600px;
}

.belief-text {
    padding-bottom: 20px;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: var(--about-text-light);
    text-align: left;
}

/* Quando dentro do box escuro, texto branco */
.beliefs-box .belief-text {
    color: rgba(255,255,255,0.7);
}

.belief-verses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 20px;
}

.belief-verse {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background 0.2s;
}

.belief-verse:hover {
    background: rgba(255,255,255,0.15);
}

/* Visit CTA */
.visit-cta-section,
.cta-box {
    background: var(--about-primary);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    margin-top: 50px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.visit-cta-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.visit-cta-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
    stroke: #fff;
}

.visit-cta-title,
.cta-box h3 {
    font-family: "DM Sans", sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.visit-cta-subtitle,
.cta-box p {
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
    line-height: 1.6;
}

.visit-cta-btn,
.cta-box .btn {
    display: inline-block;
    padding: 16px 40px;
    background: #fff;
    color: var(--about-primary);
    text-decoration: none;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.visit-cta-btn:hover,
.cta-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Prayer Box */
.prayer-box {
    background: #f8f9fa;
    border-left: 4px solid var(--about-gold);
    padding: 30px;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    font-style: italic;
}

.prayer-box p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--about-text);
}

/* Responsive */
@media (max-width: 1100px) {
    .about-layout,
    .about-container {
        grid-template-columns: 1fr 200px;
        gap: 50px;
    }
    .about-content {
        padding: 60px 30px 60px 60px;
    }
}

@media (max-width: 900px) {
    .about-layout,
    .about-container {
        grid-template-columns: 1fr;
    }
    .about-sidebar {
        display: none;
    }
    .about-content {
        padding: 40px 20px;
    }
    .section-title {
        font-size: 32px;
    }
    h2.section-title {
        font-size: 28px;
    }
    .pastor-greeting {
        font-size: 18px;
    }
    .beliefs-box {
        padding: 32px 24px;
    }
    .beliefs-box-title {
        font-size: 24px;
    }
    .visit-cta-section,
    .cta-box {
        padding: 36px 22px;
        margin: 32px 0;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
    }
    .visit-cta-title,
    .cta-box h3 {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .about-content {
        padding: 30px 16px;
    }
    .section-title {
        font-size: 28px;
    }
    h2.section-title {
        font-size: 24px;
    }
    .section-content p {
        font-size: 16px;
    }
    .pastor-image {
        border-radius: 12px;
    }
}

html {
    scroll-behavior: smooth;
}

/* Fontes do editor rico (Quill) — aplicadas na página pública */
.ql-font-arial     { font-family: Arial, sans-serif; }
.ql-font-georgia   { font-family: Georgia, serif; }
.ql-font-times     { font-family: 'Times New Roman', serif; }
.ql-font-verdana   { font-family: Verdana, sans-serif; }
.ql-font-courier   { font-family: 'Courier New', monospace; }
.ql-font-trebuchet { font-family: 'Trebuchet MS', sans-serif; }

/* =====================================================
   Normalização do HTML gerado pelo Quill na página pública
   ===================================================== */
.section-content p          { margin-bottom: 0.6em; }
.section-content p:last-child { margin-bottom: 0; }
.section-content h2         { font-size: 1.3em; font-weight: 700; margin: 0.8em 0 0.4em; color: var(--about-primary); }
.section-content h3         { font-size: 1.1em; font-weight: 600; margin: 0.6em 0 0.3em; color: var(--about-primary); }
.section-content ul,
.section-content ol         { padding-left: 1.5em; margin: 0.4em 0; }
.section-content li         { margin-bottom: 0.3em; }
.section-content .ql-align-center  { text-align: center; }
.section-content .ql-align-right   { text-align: right; }
.section-content .ql-align-justify { text-align: justify; }

/* CTA (Visite-nos) — forçar branco em todos os elementos do Quill */
.section-cta .section-content p,
.section-cta .section-content span,
.section-cta .section-content li,
.section-cta .section-content h2,
.section-cta .section-content h3 {
    color: rgba(255, 255, 255, 0.9) !important;
}
.section-cta .section-content p { margin-bottom: 0.4em; }
.section-cta .section-content p:last-child { margin-bottom: 0; }

/* =====================================================
   ORG CHART / FLUXOGRAMA DA DIRETORIA
   ===================================================== */

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 48px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* Linha vertical entre tiers */
.org-bridge {
    width: 2px;
    height: 40px;
    background: var(--about-gold);
    opacity: 0.55;
    flex-shrink: 0;
}

/* Linha horizontal + vertical dentro de um tier */
.org-tier {
    display: flex;
    justify-content: center;
    position: relative;
}

.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 18px;
    position: relative;
}

/* Haste vertical subindo de cada card até o bar horizontal */
.org-tier:not(.tier-1) .org-node::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: var(--about-gold);
    opacity: 0.55;
}

/* Barra horizontal: primeiro nó — do centro para a direita */
.org-tier:not(.tier-1):not(.single) .org-node:first-child::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    right: 0;
    height: 2px;
    background: var(--about-gold);
    opacity: 0.55;
}

/* Barra horizontal: último nó — da esquerda até o centro */
.org-tier:not(.tier-1):not(.single) .org-node:last-child::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 50%;
    height: 2px;
    background: var(--about-gold);
    opacity: 0.55;
}

/* Barra horizontal: nós do meio — largura total */
.org-tier:not(.tier-1):not(.single) .org-node:not(:first-child):not(:last-child)::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--about-gold);
    opacity: 0.55;
}

/* Card base */
.org-card {
    background: var(--about-white);
    border: 1.5px solid var(--about-border);
    border-radius: 14px;
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 130px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    text-align: center;
}

.org-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* Card destaque — tier 1 */
.org-card-featured {
    border-color: var(--about-gold);
    border-width: 2px;
    width: 154px;
    padding: 22px 18px 18px;
    background: linear-gradient(160deg, #fffef5 0%, #ffffff 60%);
    box-shadow: 0 4px 24px rgba(201, 162, 39, 0.14);
}

.org-card-featured:hover {
    box-shadow: 0 12px 36px rgba(201, 162, 39, 0.22);
}

/* Foto */
.org-photo {
    width: 76px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #efefef;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.org-card-featured .org-photo {
    width: 92px;
    height: 120px;
    border-radius: 12px;
}

.org-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.org-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* Cargo */
.org-role {
    font-family: "DM Sans", sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: var(--about-gold);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    margin-bottom: 5px;
    line-height: 1.4;
}

.org-card-featured .org-role {
    font-size: 10px;
    letter-spacing: 1.5px;
}

/* Nome */
.org-name {
    font-family: "DM Sans", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--about-primary);
    text-align: center;
    line-height: 1.3;
}

.org-card-featured .org-name {
    font-size: 14px;
}

/* Responsivo — tablet */
@media (max-width: 900px) {
    .org-node {
        padding: 0 12px;
    }
    .org-card {
        width: 112px;
        padding: 14px 10px 10px;
    }
    .org-card-featured {
        width: 134px;
        padding: 18px 14px 14px;
    }
    .org-photo {
        width: 64px;
        height: 84px;
    }
    .org-card-featured .org-photo {
        width: 78px;
        height: 102px;
    }
    .org-role {
        font-size: 8px;
    }
    .org-name {
        font-size: 11.5px;
    }
}

/* Responsivo — mobile: grade de cards sem linhas conectoras */
@media (max-width: 600px) {
    .org-chart {
        align-items: center;
        padding: 8px 0 32px;
    }
    .org-tier {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    .org-tier:not(.tier-1) .org-node::before,
    .org-tier:not(.tier-1):not(.single) .org-node::after {
        display: none;
    }
    .org-bridge {
        display: none; /* sem linha entre tiers no mobile */
    }
    .org-node {
        padding: 0;
    }
    .org-card {
        width: 110px;
    }
    .org-card-featured {
        width: 124px;
    }
    .org-card:hover {
        transform: none; /* evita z-index issues no mobile */
    }
}
