/* =========================================================
   CBBC RESOURCE CENTER - OUR BELIEFS PAGE
   Page-specific styles for:
   - Articles of Faith
   - Church Covenant
   - Constitution and By-Laws

   Shared site foundations (colors, typography, header,
   buttons, containers and footer) remain in css/style.css.
========================================================= */

/* ---------- PAGE HERO ---------- */

.beliefs-hero {
    padding: 76px 0 68px;
    background: linear-gradient(135deg, var(--blue-light), var(--green-light));
}

.beliefs-hero .container {
    max-width: var(--container, 1180px);
}

.beliefs-hero .section-label {
    display: inline-block;
    color: var(--blue-dark);
}

.beliefs-hero h1 {
    margin: 13px 0 14px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.35rem, 5vw, 3.6rem);
    line-height: 1.12;
}

.beliefs-hero p {
    max-width: 720px;
    margin: 0 0 25px;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.8;
}

.beliefs-hero .btn {
    margin: 5px 9px 5px 0;
}

/* ---------- INTRODUCTION AND SEARCH ---------- */

.beliefs-intro {
    padding: 48px 0 28px;
    background: var(--background);
}

.beliefs-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.beliefs-cross {
    display: inline-flex;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--blue-light);
    color: var(--blue-dark);
    font-size: 26px;
}

.beliefs-notice h2 {
    margin: 0 0 7px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 23px;
    line-height: 1.3;
}

.beliefs-notice p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.75;
}

.beliefs-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    max-width: 760px;
    margin: 28px auto 0;
}

.beliefs-tools label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.beliefs-tools input {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.beliefs-tools input::placeholder {
    color: #91a0a9;
}

.beliefs-tools input:focus {
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 3px rgba(39, 126, 174, .12);
}

#beliefCount {
    min-height: 18px;
    margin: 0;
    color: var(--text-light);
    font-size: 12px;
}

/* ---------- ARTICLES OF FAITH LAYOUT ---------- */

.beliefs-content {
    padding: 28px 0 82px;
    background: var(--background);
    scroll-margin-top: 100px;
}

.beliefs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

.beliefs-sidebar {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 130px);
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.beliefs-sidebar h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 21px;
}

.beliefs-sidebar > p {
    margin: 0 0 15px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
}

#beliefContents {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#beliefContents a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .18s ease, background .18s ease;
}

#beliefContents a:hover,
#beliefContents a:focus-visible {
    outline: none;
    background: var(--blue-light);
    color: var(--blue-dark);
}

.beliefs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.belief-card {
    min-width: 0;
    padding: clamp(21px, 3vw, 32px);
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 105px;
}

.belief-card h2 {
    margin: 0 0 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(19px, 2.1vw, 23px);
    line-height: 1.35;
}

.belief-card h3 {
    margin: 24px 0 9px;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.45;
}

.belief-card p {
    margin: 0 0 15px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.belief-card p:last-child {
    margin-bottom: 0;
}

.belief-card .scripture-references {
    margin-top: 18px;
    padding: 12px 15px;
    border-left: 3px solid var(--green);
    border-radius: 0 8px 8px 0;
    background: var(--green-light);
    color: #496b59;
    font-size: 12px;
    line-height: 1.7;
}

.belief-card[hidden],
.no-beliefs[hidden] {
    display: none !important;
}

.no-beliefs {
    grid-column: 2;
    margin: 0;
    padding: 26px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text-light);
    text-align: center;
}

/* ---------- CHURCH COVENANT ---------- */

.cbbc-covenant-section {
    padding: 78px 0;
    background: linear-gradient(180deg, #fff 0%, var(--green-light) 100%);
    scroll-margin-top: 90px;
}

.cbbc-covenant-heading {
    max-width: 780px;
    margin: 0 auto 34px;
    text-align: center;
}

.cbbc-covenant-heading h2 {
    margin: 12px 0 10px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.2;
}

.cbbc-covenant-church-name {
    margin: 0;
    color: var(--navy);
    font-weight: 700;
}

.cbbc-covenant-location {
    margin: 5px 0 0;
    color: var(--text-light);
    font-size: 13px;
}

.cbbc-covenant-divider {
    width: 76px;
    height: 3px;
    margin: 22px auto;
    border-radius: 10px;
    background: var(--green-dark);
}

.cbbc-covenant-document {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.cbbc-covenant-document-heading {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.cbbc-covenant-cross {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 23px;
}

.cbbc-covenant-document-heading h3 {
    margin: 12px 0 5px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 25px;
}

.cbbc-covenant-document-heading p {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
}

.cbbc-covenant-body {
    padding: 25px 0 8px;
}

.cbbc-covenant-body p {
    margin: 0 0 19px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.95;
    text-align: justify;
    overflow-wrap: anywhere;
}

.cbbc-covenant-body p:last-child {
    margin-bottom: 0;
}

.cbbc-covenant-document-footer {
    margin-top: 25px;
    padding-top: 19px;
    border-top: 1px solid var(--border);
    color: var(--green-dark);
    text-align: center;
}

.cbbc-covenant-document-footer span {
    font-size: 22px;
}

.cbbc-covenant-document-footer p {
    margin: 5px 0 0;
    font-weight: 700;
    letter-spacing: .08em;
}

/* ---------- CONSTITUTION AND BY-LAWS ---------- */

.cbbc-constitution-section {
    padding: 76px 0;
    background: var(--blue-light, #eaf7fd);
    scroll-margin-top: 90px;
}

.cbbc-constitution-heading {
    max-width: 780px;
    margin: 0 auto 34px;
    text-align: center;
}

.cbbc-constitution-heading h2 {
    margin: 12px 0 10px;
    color: var(--navy, #17384d);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.2;
}

.cbbc-constitution-church-name {
    margin: 0;
    color: var(--navy, #17384d);
    font-weight: 700;
}

.cbbc-constitution-location,
.cbbc-constitution-version {
    margin: 5px 0 0;
    color: var(--text-light, #657784);
    font-size: 13px;
}

.cbbc-constitution-divider {
    width: 76px;
    height: 3px;
    margin: 22px auto;
    border-radius: 10px;
    background: var(--blue-dark, #277eae);
}

.cbbc-constitution-intro {
    max-width: 660px;
    margin: 0 auto;
    color: var(--text, #344955);
    line-height: 1.75;
}

.cbbc-constitution-document {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 42px);
    border: 1px solid var(--border, #dce7ec);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow, 0 12px 32px rgba(23, 56, 77, .08));
}

.cbbc-constitution-document-heading {
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border, #dce7ec);
    text-align: center;
}

.cbbc-constitution-cross {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-light, #eaf7fd);
    color: var(--blue-dark, #277eae);
    font-size: 23px;
}

.cbbc-constitution-document-heading h3 {
    margin: 12px 0 5px;
    color: var(--navy, #17384d);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 25px;
}

.cbbc-constitution-document-heading p {
    margin: 0;
    color: var(--text-light, #657784);
    font-size: 13px;
}

.cbbc-constitution-toc {
    margin: 26px 0;
    padding: 22px;
    border: 1px solid var(--border, #dce7ec);
    border-radius: 13px;
    background: #f8fcfe;
}

.cbbc-constitution-toc h3 {
    margin: 0 0 14px;
    color: var(--navy, #17384d);
    font-size: 17px;
}

.cbbc-constitution-toc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.cbbc-constitution-toc-grid a {
    color: var(--blue-dark, #277eae);
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.cbbc-constitution-toc-grid a:hover,
.cbbc-constitution-toc-grid a:focus-visible {
    color: var(--navy);
    text-decoration: underline;
}

.constitution-article {
    margin: 12px 0;
    overflow: hidden;
    border: 1px solid var(--border, #dce7ec);
    border-radius: 12px;
    background: #fff;
    scroll-margin-top: 100px;
}

.constitution-article > summary {
    position: relative;
    padding: 17px 48px 17px 19px;
    color: var(--navy, #17384d);
    background: #f8fcfe;
    font-weight: 750;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}

.constitution-article > summary::-webkit-details-marker {
    display: none;
}

.constitution-article > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 19px;
    transform: translateY(-50%);
    color: var(--blue-dark, #277eae);
    font-size: 22px;
    font-weight: 400;
}

.constitution-article[open] > summary {
    border-bottom: 1px solid var(--border, #dce7ec);
    background: var(--blue-light, #eaf7fd);
}

.constitution-article[open] > summary::after {
    content: "−";
}

.constitution-article-content {
    padding: 20px clamp(16px, 3vw, 28px) 24px;
    color: var(--text, #344955);
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.constitution-article-content p {
    margin: 0 0 15px;
}

.constitution-article-content p:last-child {
    margin-bottom: 0;
}

.constitution-article-content h3,
.constitution-article-content h4 {
    margin: 22px 0 10px;
    color: var(--navy, #17384d);
    font-size: 16px;
}

.constitution-article-content ul,
.constitution-article-content ol {
    margin: 10px 0 18px;
    padding-left: 24px;
}

.constitution-article-content li {
    margin: 5px 0;
    padding-left: 3px;
}

.constitution-article-content a {
    color: var(--blue-dark, #277eae);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.constitution-article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.constitution-article-content th,
.constitution-article-content td {
    padding: 9px 10px;
    border: 1px solid var(--border, #dce7ec);
    text-align: left;
    vertical-align: top;
}

.constitution-article-content th {
    background: var(--blue-light, #eaf7fd);
    color: var(--navy, #17384d);
}

.cbbc-constitution-document-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #dce7ec);
    color: var(--blue-dark, #277eae);
    text-align: center;
}

.cbbc-constitution-document-footer span {
    font-size: 22px;
}

.cbbc-constitution-document-footer p {
    margin: 5px 0 0;
    font-weight: 700;
    letter-spacing: .08em;
}

/* ---------- ACCESSIBILITY AND PRINT ---------- */

.beliefs-content a:focus-visible,
.cbbc-covenant-section a:focus-visible,
.cbbc-constitution-section a:focus-visible,
.constitution-article summary:focus-visible {
    outline: 3px solid rgba(39, 126, 174, .45);
    outline-offset: 3px;
}

@media print {
    .beliefs-sidebar,
    .beliefs-tools,
    .beliefs-hero .btn,
    .site-header,
    .site-footer {
        display: none !important;
    }

    .beliefs-layout {
        display: block;
    }

    .belief-card,
    .cbbc-covenant-document,
    .cbbc-constitution-document {
        break-inside: avoid;
        box-shadow: none;
    }

    .constitution-article:not([open]) > .constitution-article-content {
        display: block;
    }
}

/* ---------- RESPONSIVE LAYOUT ---------- */

@media (max-width: 900px) {
    .beliefs-layout {
        grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
        gap: 18px;
    }

    .beliefs-sidebar {
        padding: 17px;
    }
}

@media (max-width: 700px) {
    .beliefs-hero {
        padding: 58px 0 48px;
    }

    .beliefs-hero p {
        font-size: 14px;
    }

    .beliefs-hero .btn {
        width: 100%;
        max-width: 360px;
        justify-content: center;
        margin: 5px 0;
    }

    .beliefs-intro {
        padding: 30px 0 18px;
    }

    .beliefs-notice {
        gap: 14px;
        padding: 20px;
    }

    .beliefs-cross {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .beliefs-notice h2 {
        font-size: 20px;
    }

    .beliefs-content {
        padding: 18px 0 55px;
    }

    .beliefs-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .beliefs-sidebar {
        position: static;
        max-height: none;
    }

    #beliefContents {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    #beliefContents a {
        padding: 8px;
        background: #f8fcfe;
    }

    .belief-card {
        padding: 21px;
    }

    .belief-card p {
        font-size: 13px;
        line-height: 1.8;
    }

    .no-beliefs {
        grid-column: 1;
    }

    .cbbc-covenant-section {
        padding: 55px 0;
    }

    .cbbc-covenant-document {
        border-radius: 13px;
    }

    .cbbc-covenant-body p {
        font-size: 13px;
        text-align: left;
    }

    .cbbc-constitution-section {
        padding: 52px 0;
    }

    .cbbc-constitution-toc-grid {
        grid-template-columns: 1fr;
    }

    .cbbc-constitution-document {
        border-radius: 13px;
    }

    .constitution-article-content {
        font-size: 13px;
    }

    .constitution-article-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .beliefs-notice {
        display: block;
    }

    .beliefs-cross {
        margin-bottom: 13px;
    }

    #beliefContents {
        grid-template-columns: 1fr;
    }

    .cbbc-constitution-toc {
        padding: 16px;
    }
}

/* =========================================
   CBBC FACEBOOK SOCIAL LINKS
========================================= */

.facebook-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    color: #ffffff;
    background: #1877F2;
    transition: .25s ease;
}

.facebook-link svg {
    display: block;
    width: 21px;
    height: 21px;
}

.facebook-link:hover {
    background: #0866FF;
    transform: translateY(-2px);
}

.header-facebook {
    margin-left: 12px;
}

/* Mobile navigation */
.facebook-mobile-icon,
.facebook-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    margin-right: 7px;
    border-radius: 50%;
    color: #ffffff;
    background: #1877F2;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 17px;
}

/* Footer link */
.footer-facebook-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    transition: .2s ease;
}

.footer-facebook-link:hover {
    color: #5aa9d6;
}

/* Keyboard accessibility */
.facebook-link:focus-visible,
.footer-facebook-link:focus-visible {
    outline: 3px solid #5aa9d6;
    outline-offset: 3px;
}