/* =============================================================================
   Bylaws & Policies (.cca-doc-page)

   Sizing is deliberately in rem, not px: the site baseline is 16px / 1.8
   (Divi Theme Options), and rem keeps that baseline intact while still
   honouring the reader's own browser text size and 200% zoom (WCAG 1.4.4).
   Body copy here steps up to 1.125rem (18px) for a senior-heavy audience and
   never drops below the 16px baseline on small screens - several Divi modules
   elsewhere on the site fall to 14px on phones, which this does not copy.

   Link and list-item colour is #4B5E6C on white (6.7:1, passes AA and AAA).
   The brand terracotta #CF8363 on white is only 2.97:1, so it is used for
   button fills and focus rings here, never for plain body-size link text.
   ============================================================================= */

.cca-doc-page {
    max-width: 900px;
    margin: 0 auto;
    color: #4B5E6C;
    font-size: 1.125rem;   /* 18px */
    line-height: 1.8;      /* matches the site baseline */
}

.cca-doc-page p,
.cca-doc-page li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4B5E6C;
}

.cca-doc-page .cca-doc-intro {
    max-width: 62ch;
    margin: 0 0 2rem;
}

/* ---- Section headings ---- */

.cca-doc-page h2.cca-doc-heading {
    font-family: "Cormorant Garamond", Cormorant, Georgia, serif;
    font-weight: 700;
    font-size: 2.75rem;    /* 44px */
    line-height: 1.15;
    color: #4B5E6C;
    margin: 3.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #EFDFBB;
}

.cca-doc-page h2.cca-doc-heading:first-child {
    margin-top: 0;
}

.cca-doc-page h3.cca-doc-title {
    font-family: "Cormorant Garamond", Cormorant, Georgia, serif;
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1.25;
    color: #4B5E6C;
    margin: 0 0 0.35rem;
}

/* ---- Document card ---- */

.cca-doc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    padding: 1.75rem;
    margin: 0 0 2rem;
    box-shadow: 0 2px 10px rgba(75, 94, 108, 0.06);
}

.cca-doc-meta {
    font-size: 1rem !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a97a1 !important;
    margin: 0 0 1.1rem !important;
}

.cca-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem !important;
}

.cca-doc-page a.cca-doc-btn,
.cca-doc-page a.cca-doc-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;              /* comfortable target (WCAG 2.5.8) */
    padding: 0.7rem 1.9rem;
    background: #CE8363;
    border: 2px solid #CE8363;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s;
}

.cca-doc-page a.cca-doc-btn:hover,
.cca-doc-page a.cca-doc-btn:focus {
    background: #b8704f;
    border-color: #b8704f;
    color: #ffffff;
}

.cca-doc-page a.cca-doc-btn--ghost,
.cca-doc-page a.cca-doc-btn--ghost:visited {
    background: transparent;
    color: #a35c3a;                /* darkened for contrast on white */
    border-color: #CE8363;
}

.cca-doc-page a.cca-doc-btn--ghost:hover,
.cca-doc-page a.cca-doc-btn--ghost:focus {
    background: #CE8363;
    color: #ffffff;
}

/* Visible keyboard focus everywhere on the page (WCAG 2.4.7) */
.cca-doc-page a:focus-visible {
    outline: 3px solid #CF8363;
    outline-offset: 3px;
}

/* ---- Inline PDF preview ----
   Kept for desktop convenience only. Mobile browsers largely refuse to render
   a PDF inside <object>, so below 782px the preview is dropped and the two
   buttons above are the way in. */

.cca-doc-preview {
    width: 100%;
    height: 760px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #f4f6f7;
}

@media (max-width: 782px) {
    .cca-doc-preview {
        display: none;
    }
}

/* ---- Policy list ---- */

.cca-doc-page ul.cca-doc-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.cca-doc-page ul.cca-doc-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ececec;
}

.cca-doc-page ul.cca-doc-list li:last-child {
    border-bottom: none;
}

.cca-doc-page ul.cca-doc-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: 1rem 0.25rem;
    color: #4B5E6C;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cca-doc-page ul.cca-doc-list a:hover,
.cca-doc-page ul.cca-doc-list a:focus {
    color: #a35c3a;
}

.cca-doc-list__note {
    flex: 0 0 auto;
    font-size: 0.95rem;
    font-weight: 400;
    color: #8a97a1;
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ---- Compact policy links reused on other pages ---- */

.cca-policy-links {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
}

.cca-policy-links__title {
    margin: 0 0 0.6rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4B5E6C !important;
}

.cca-policy-links ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.75rem;
}

.cca-policy-links li {
    margin: 0 !important;
    padding: 0 !important;
}

.cca-policy-links a,
.cca-policy-links a:visited {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
    color: #4B5E6C !important;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cca-policy-links a:hover,
.cca-policy-links a:focus {
    color: #a35c3a !important;
}

.cca-policy-links a:focus-visible {
    outline: 3px solid #CF8363;
    outline-offset: 3px;
}

/* ---- Small screens: step down, but never below the 16px baseline ---- */

@media (max-width: 600px) {
    .cca-doc-page,
    .cca-doc-page p,
    .cca-doc-page li,
    .cca-doc-page ul.cca-doc-list a {
        font-size: 1.0625rem;   /* 17px - still above the 16px baseline */
    }

    .cca-doc-page h2.cca-doc-heading {
        font-size: 2.1rem;
    }

    .cca-doc-page h3.cca-doc-title {
        font-size: 1.55rem;
    }

    .cca-doc-card {
        padding: 1.25rem;
    }

    .cca-doc-page a.cca-doc-btn {
        width: 100%;
    }

    .cca-doc-page ul.cca-doc-list a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }
}
