/* =========================================================
   Court Process template (templates/court-process.php)
   Loaded only on this template. Everything is scoped to .cp-page
   and built from the site's existing brand tokens (style.css :root).
   ========================================================= */

.cp-page {
    --cp-heading: #9B522B;      /* section headings — same as practice pages */
    --cp-accent: var(--orange); /* #C88449 */
    --cp-accent-dark: #9A651D;  /* FAQ active / hover accent used on site */
    --cp-beige: #F5EFE8;        /* FAQ tint used on practice pages */
    --cp-light: #F7F7F7;
    --cp-border: rgba(64, 40, 1, 0.15); /* same as blog cards */
    --cp-text: var(--bs-body-color);
    --cp-dark: var(--brown);    /* #4D3232 */

    color: var(--cp-text);
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
}

/* ---------- Shared ---------- */
.cp-page .cp-section {
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0;
}
/* Two neighbouring sections on the same background: don't double the gap */
.cp-page .cp-bg-white + .cp-bg-white,
.cp-page .cp-bg-beige + .cp-bg-beige,
.cp-page .cp-bg-light + .cp-bg-light { padding-top: 1.5rem; }
.cp-page .cp-bg-white { background-color: #FFF; }
.cp-page .cp-bg-beige { background-color: var(--cp-beige); }
.cp-page .cp-bg-light { background-color: var(--cp-light); }

.cp-page .cp-h2,
.cp-page .cp-content h2 {
    font-family: var(--spectral);
    font-weight: 700;
    color: var(--cp-heading);
    font-size: clamp(1.75rem, 1.495rem + 1.277vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.cp-page .cp-content h3 {
    font-family: var(--spectral);
    font-weight: 700;
    color: var(--cp-heading);
    font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
    line-height: 1.25;
    margin: 2rem 0 .75rem;
}
.cp-page .cp-content > :first-child { margin-top: 0; }
.cp-page .cp-content > :last-child { margin-bottom: 0; }
.cp-page .cp-content p { margin-bottom: 1rem; }
.cp-page .cp-content a {
    color: var(--cp-heading);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cp-page .cp-content a[href^="tel:"] { white-space: nowrap; }
.cp-page .cp-content ul,
.cp-page .cp-content ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.cp-page .cp-content li { margin-bottom: .4rem; }
.cp-page .cp-lead { max-width: 820px; margin-bottom: 2rem; }

.cp-page .cp-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 1.75rem;
}
.cp-page .cp-buttons .btn { margin: 0; }

/* ---------- Hero (light, per reference mockup) ---------- */
.cp-page .cp-hero {
    background: linear-gradient(180deg, var(--cp-beige) 0%, #FFF 100%);
    padding: clamp(2.5rem, 1.8rem + 3vw, 4.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
}
.cp-page .cp-hero__title {
    font-family: var(--spectral);
    font-weight: 700;
    color: var(--cp-heading);
    font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.cp-page .cp-hero__intro { font-size: 19px; }
.cp-page .cp-hero__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
}
.cp-page .cp-hero__after {
    margin-top: 2rem;
}

/* ---------- Stage cards ---------- */
.cp-page .cp-cards {
    list-style: none;
    padding: 0;
    /* only the bottom margin: keep Bootstrap's negative row margins so the cards align with the content edge */
    margin-bottom: 2rem;
}
.cp-page .cp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #FFF;
    border: 1px solid var(--cp-border);
    border-top: 3px solid var(--cp-accent);
    border-radius: 6px;
    padding: 22px 22px 20px;
    color: var(--cp-text);
    text-decoration: none;
    transition: transform 300ms ease, box-shadow 300ms ease;
}
.cp-page .cp-card:hover,
.cp-page .cp-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}
.cp-page .cp-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--cp-border);
    background: #FFF;
    color: var(--cp-heading);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
}
.cp-page .cp-card__title {
    font-family: var(--spectral);
    font-weight: 700;
    color: var(--cp-heading);
    font-size: 21px;
    line-height: 1.25;
    margin-bottom: 8px;
}
.cp-page .cp-card__title a {
    color: inherit;
    text-decoration: none;
}
.cp-page .cp-card__title a:hover,
.cp-page .cp-card__title a:focus-visible {
    opacity: 1;
    color: var(--cp-accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cp-page .cp-card__text {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 14px;
}
.cp-page .cp-card__text p { margin: 0 0 0.75em; }
.cp-page .cp-card__text p:last-child { margin-bottom: 0; }
.cp-page .cp-card__text a {
    color: var(--cp-accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cp-page .cp-card__more {
    align-self: flex-start;
    margin-top: auto;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cp-accent-dark);
    text-decoration: none;
}
.cp-page .cp-card__more:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.cp-page .cp-card__more i { margin-left: 6px; transition: transform 300ms ease; }
.cp-page .cp-card:hover .cp-card__more i { transform: translateX(4px); }

/* ---------- Quote card ---------- */
.cp-page .cp-quote-section { padding: clamp(1.25rem, 1rem + 1.5vw, 2rem) 0; }
.cp-page .cp-quote {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    background: #FDF9F5;                    /* very light tint of the brand beige */
    border: 1px solid rgba(200, 132, 73, 0.6);
    border-radius: 6px;
    padding: 28px 34px;
}
.cp-page .cp-quote__photo {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 12%; /* keep the face in frame on tall portraits */
    border: 4px solid #FFF;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.cp-page .cp-quote__body { min-width: 0; }
.cp-page .cp-quote__text { margin: 0 0 14px; }
.cp-page .cp-quote__text p {
    font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
    line-height: 1.55;
    margin: 0;
    quotes: "\201C" "\201D";
}
.cp-page .cp-quote__text p::before { content: open-quote; }
.cp-page .cp-quote__text p::after { content: close-quote; }
.cp-page .cp-quote__by {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cp-accent-dark);
}
.cp-page .cp-quote__by a {
    color: var(--cp-heading);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cp-page .cp-quote__sep { margin: 0 6px; }

/* ---------- Timeline ---------- */
.cp-page .cp-timeline {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    position: relative;
}
.cp-page .cp-timeline::before {           /* connecting line */
    content: "";
    position: absolute;
    top: 26px;
    left: 6.25%;
    right: 6.25%;
    height: 2px;
    background: var(--cp-accent);
    opacity: .5;
}
.cp-page .cp-timeline__item { position: relative; text-align: center; }
.cp-page .cp-timeline__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 6px;
    color: var(--cp-text);
    text-decoration: none;
}
.cp-page .cp-timeline__num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #FFF;
    border: 2px solid var(--cp-accent);
    color: var(--cp-heading);
    font-family: var(--spectral);
    font-weight: 700;
    font-size: 19px;
    transition: background-color 300ms ease, color 300ms ease;
}
.cp-page .cp-timeline__label {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}
.cp-page a.cp-timeline__link:hover { opacity: 1; }
.cp-page a.cp-timeline__link:hover .cp-timeline__num,
.cp-page a.cp-timeline__link:focus-visible .cp-timeline__num {
    background: var(--cp-heading);
    border-color: var(--cp-heading);
    color: #FFF;
}
.cp-page a.cp-timeline__link:hover .cp-timeline__label { color: var(--cp-heading); }

/* ---------- FAQ ---------- */
.cp-page .cp-accordion .accordion-item {
    border: 1px solid var(--cp-border);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cp-page .cp-accordion .accordion-header { margin: 0; }
.cp-page .cp-accordion .accordion-button {
    font-family: var(--spectral);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.35;
    color: var(--cp-text);
    background: #FFF;
    padding: 18px 22px;
    box-shadow: none;
}
.cp-page .cp-accordion .accordion-button:not(.collapsed) {
    color: var(--cp-heading);
    background: var(--cp-beige);
}
.cp-page .cp-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(200, 132, 73, 0.35);
}
/* Same icon convention as the site's FAQs (chevron closed, minus open), in brand copper */
.cp-page .cp-accordion .accordion-button::after {
    width: 1.1rem;
    height: 1.1rem;
    background-size: 1.1rem;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="%239B522B"%3E%3Cpath d="M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"/%3E%3C/svg%3E');
}
.cp-page .cp-accordion .accordion-button:not(.collapsed)::after {
    transform: none;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%239B522B"%3E%3Cpath d="M512 256c0 17.67-14.33 32-32 32H32C14.33 288 0 273.7 0 256s14.33-32 32-32h448C497.7 224 512 238.3 512 256z"/%3E%3C/svg%3E');
}
.cp-page .cp-accordion .accordion-body {
    padding: 4px 22px 20px;
    background: var(--cp-beige);
    font-size: 17px;
}

/* ---------- Disclaimer ---------- */
.cp-page .cp-disclaimer {
    padding: 2rem 0;
    border-top: 1px solid var(--cp-border);
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}
.cp-page .cp-disclaimer__title {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cp-text);
    margin-bottom: .5rem;
}

/* ---------- CTA banner ---------- */
.cp-page .cp-cta-banner {
    background: var(--cp-dark);
    color: #FFF;
    padding: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem) 0;
}
.cp-page .cp-cta-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
}
.cp-page .cp-cta-banner__text { flex: 1 1 420px; }
.cp-page .cp-cta-banner h2 {
    font-family: var(--spectral);
    font-weight: 700;
    color: #FFF;
    font-size: clamp(1.75rem, 1.495rem + 1.277vw, 2.5rem);
    margin-bottom: .5rem;
}
.cp-page .cp-cta-banner .cp-content { font-size: 19px; color: rgba(255, 255, 255, .9); }
.cp-page .cp-cta-banner .cp-buttons { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .cp-page .cp-timeline {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        row-gap: 28px;
    }
    .cp-page .cp-timeline::before { display: none; }
}
@media (max-width: 575px) {
    .cp-page { font-size: 17px; }
    .cp-page .cp-timeline {             /* vertical list on phones */
        grid-template-columns: 1fr;
        row-gap: 0;
    }
    .cp-page .cp-timeline::before {
        display: block;
        top: 27px;
        bottom: 27px;
        left: 26px;
        right: auto;
        width: 2px;
        height: auto;
    }
    .cp-page .cp-timeline__item { text-align: left; }
    .cp-page .cp-timeline__link {
        flex-direction: row;
        gap: 16px;
        padding: 6px 0;
    }
    .cp-page .cp-quote {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }
    .cp-page .cp-quote__photo { width: 84px; height: 84px; }
    .cp-page .cp-buttons .btn { width: 100%; }
}
