/**
 * Freedom Doula Co — site enhancements
 * - FAQ Reading Room (sage glass, fixed stage)
 * - About dual cards (About Me + Birth Philosophy) + gallery strip
 */

/* ── Kill theme button chrome inside FAQ ───────────────────────── */
.s-faq button.fdc-faq-summary,
.s-faq button.fdc-faq-rail-btn {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: normal !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
}

.s-faq button.fdc-faq-summary:hover,
.s-faq button.fdc-faq-summary:focus,
.s-faq button.fdc-faq-rail-btn:hover,
.s-faq button.fdc-faq-rail-btn:focus {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    color: inherit !important;
    outline: 0 !important;
}

/* ── Tokens ────────────────────────────────────────────────────── */

.s-faq {
    --faq-sage: #6f7c6f;
    --faq-sage-deep: #5f6c5f;
    --faq-stage-h: 520px;
}

/* ── Section shell ─────────────────────────────────────────────── */

.s-faq .fdc-faq-intro {
    margin-bottom: 4.2rem;
}

.s-faq .fdc-faq-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.s-faq .fdc-faq-shell *,
.s-faq .fdc-faq-shell *::before,
.s-faq .fdc-faq-shell *::after {
    box-sizing: border-box;
}

.s-faq .fdc-faq-explorer {
    position: relative;
    width: 100%;
}

.s-faq .fdc-faq-list {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

/* ── Cards — sage glass ────────────────────────────────────────── */

.s-faq .fdc-faq-item {
    position: relative;
    margin: 0 0 14px;
    padding: 0;
    border: 1px solid rgba(254, 240, 236, 0.22);
    border-radius: 10px;
    overflow: hidden;
    background: var(--faq-sage);
    box-shadow: 0 12px 28px rgba(63, 63, 63, 0.16);
    color: #fef0ec;
}

.s-faq .fdc-faq-item:last-child {
    margin-bottom: 0;
}

.s-faq .fdc-faq-item::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(
        180deg,
        rgba(253, 223, 195, 0.14) 0%,
        transparent 32%,
        transparent 100%
    );
}

.s-faq .fdc-faq-item::before {
    content: attr(data-index);
    position: absolute;
    top: -0.4rem;
    right: 0.8rem;
    font-family: "montserrat-bold", sans-serif;
    font-size: clamp(5.5rem, 11vw, 8.5rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: rgba(254, 240, 236, 0.1);
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* ── Summary / title ───────────────────────────────────────────── */

.s-faq button.fdc-faq-summary {
    position: relative;
    z-index: 1;
    gap: 1.4rem !important;
    padding: 2rem 2rem !important;
}

.s-faq .fdc-faq-index {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    height: 4.2rem;
    margin-top: 0.1rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    border: 1.5px solid var(--secondary-accent-color, #FDDFC3);
    font-family: "montserrat-bold", sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    color: var(--secondary-accent-color, #FDDFC3);
    background: transparent;
    line-height: 1;
    text-transform: none;
}

.s-faq .fdc-faq-item.is-open .fdc-faq-index,
.s-faq .fdc-faq-item[data-open="true"] .fdc-faq-index {
    background: var(--secondary-accent-color, #FDDFC3);
    color: var(--variation-color, #3f3f3f);
    border-color: var(--secondary-accent-color, #FDDFC3);
}

.s-faq .fdc-faq-q {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: "montserrat-medium", sans-serif;
    font-size: clamp(1.65rem, 2.3vw, 2.05rem);
    line-height: 1.35;
    font-weight: normal;
    letter-spacing: 0.02rem;
    text-transform: none;
    color: #ffffff;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.s-faq .fdc-faq-toggle {
    flex: 0 0 auto;
    position: relative;
    width: 3rem;
    height: 3rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    border: 1.5px solid var(--secondary-accent-color, #FDDFC3);
    background: transparent;
}

.s-faq .fdc-faq-toggle::before,
.s-faq .fdc-faq-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.15rem;
    height: 1.5px;
    background: var(--secondary-accent-color, #FDDFC3);
    transform: translate(-50%, -50%);
    transition: transform 0.28s ease, opacity 0.2s ease;
}

.s-faq .fdc-faq-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.s-faq .fdc-faq-item.is-open .fdc-faq-toggle::after,
.s-faq .fdc-faq-item[data-open="true"] .fdc-faq-toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
}

/* Mobile accordion expand */
.s-faq .fdc-faq-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.38s cubic-bezier(0.33, 1, 0.68, 1);
    position: relative;
    z-index: 1;
}

.s-faq .fdc-faq-item.is-open .fdc-faq-panel,
.s-faq .fdc-faq-item[data-open="true"] .fdc-faq-panel {
    grid-template-rows: 1fr;
}

.s-faq .fdc-faq-panel-inner {
    overflow: hidden;
    min-height: 0;
}

.s-faq .fdc-faq-a {
    position: relative;
    z-index: 1;
    margin: 0 1.6rem 1.8rem;
    padding: 1.6rem 1.8rem 1.8rem;
    max-width: none;
    border: 1px solid rgba(254, 240, 236, 0.28);
    border-radius: 10px;
    background: rgba(254, 240, 236, 0.1);
    font-family: "lora-regular", "Lora", Georgia, serif;
    font-size: clamp(1.55rem, 1.9vw, 1.75rem);
    line-height: 1.75;
    letter-spacing: 0.01rem;
    text-transform: none;
    color: rgba(254, 240, 236, 0.94);
    overflow-wrap: break-word;
    max-height: 36vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(253, 223, 195, 0.55) transparent;
}

.s-faq .fdc-faq-a::-webkit-scrollbar {
    width: 6px;
}

.s-faq .fdc-faq-a::-webkit-scrollbar-thumb {
    background: rgba(253, 223, 195, 0.45);
    border-radius: 99px;
}

.s-faq .fdc-faq-item.is-open .fdc-faq-a,
.s-faq .fdc-faq-item[data-open="true"] .fdc-faq-a {
    border-color: rgba(253, 223, 195, 0.5);
    background: rgba(253, 223, 195, 0.14);
    box-shadow: inset 0 0 0 1px rgba(253, 223, 195, 0.14);
}

.s-faq .fdc-faq-a::before {
    content: "";
    display: block;
    width: 4.8rem;
    height: 2px;
    margin: 0 0 1.4rem;
    background: var(--secondary-accent-color, #FDDFC3);
}

.s-faq .fdc-faq-a strong {
    font-family: "lora-bold", "Lora", Georgia, serif;
    color: #fef0ec;
}

.s-faq .fdc-faq-a p {
    margin: 0 0 1.1em;
}

.s-faq .fdc-faq-a p:last-child {
    margin-bottom: 0;
}

.s-faq .fdc-faq-item.is-open,
.s-faq .fdc-faq-item[data-open="true"] {
    border-color: rgba(253, 223, 195, 0.45);
    box-shadow: 0 14px 34px rgba(63, 63, 63, 0.2);
    background: var(--faq-sage);
}

.s-faq .fdc-faq-q br {
    display: none;
}

.s-faq .fdc-faq-rail {
    display: none;
}

/* ── Desktop: fixed reading room ───────────────────────────────── */

@media only screen and (min-width: 901px) {
    .s-faq .fdc-faq-explorer {
        display: grid;
        grid-template-columns: minmax(240px, 32%) minmax(0, 1fr);
        gap: 24px;
        align-items: stretch;
        height: var(--faq-stage-h);
        max-height: var(--faq-stage-h);
        overflow: hidden;
    }

    /* Grid children MUST allow shrink (fixes long FAQ #1 blowing layout) */
    .s-faq .fdc-faq-rail,
    .s-faq .fdc-faq-list.fdc-faq-stage,
    .s-faq .fdc-faq-list {
        min-height: 0 !important;
        min-width: 0 !important;
        max-height: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* Rail: fixed box, scrolls if many topics — never grows section */
    .s-faq .fdc-faq-rail {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0;
        padding: 16px;
        overflow-x: hidden;
        overflow-y: auto;
        list-style: none;
        background: var(--faq-sage);
        border: 1px solid rgba(254, 240, 236, 0.22);
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(63, 63, 63, 0.16);
        scrollbar-width: thin;
        scrollbar-color: rgba(253, 223, 195, 0.55) transparent;
        align-self: stretch;
    }

    .s-faq button.fdc-faq-rail-btn {
        flex: 0 0 auto !important;
        gap: 1.1rem !important;
        padding: 1.2rem 1.3rem !important;
        border-radius: 10px !important;
        border: 1px solid rgba(254, 240, 236, 0.22) !important;
        background: rgba(254, 240, 236, 0.08) !important;
        color: rgba(254, 240, 236, 0.92) !important;
        font-family: "montserrat-medium", sans-serif !important;
        font-size: 1.35rem !important;
        line-height: 1.35 !important;
        letter-spacing: 0.02rem !important;
        text-transform: none !important;
        white-space: normal !important;
        max-width: 100%;
    }

    .s-faq button.fdc-faq-rail-btn:hover,
    .s-faq button.fdc-faq-rail-btn:focus {
        background: rgba(254, 240, 236, 0.16) !important;
        border-color: rgba(254, 240, 236, 0.35) !important;
        color: #fef0ec !important;
    }

    .s-faq button.fdc-faq-rail-btn.is-active,
    .s-faq button.fdc-faq-rail-btn.is-active:hover,
    .s-faq button.fdc-faq-rail-btn.is-active:focus {
        background: rgba(253, 223, 195, 0.2) !important;
        border-color: var(--secondary-accent-color, #FDDFC3) !important;
        box-shadow: inset 0 0 0 1px rgba(253, 223, 195, 0.28);
        color: #fef0ec !important;
    }

    .s-faq button.fdc-faq-rail-btn:focus-visible {
        outline: 2px solid var(--secondary-accent-color, #FDDFC3) !important;
        outline-offset: 2px !important;
    }

    .s-faq .fdc-faq-rail-num {
        flex: 0 0 auto;
        font-family: "montserrat-bold", sans-serif;
        font-size: 1.15rem;
        letter-spacing: 0.08em;
        color: var(--secondary-accent-color, #FDDFC3);
        padding-top: 0.1rem;
        text-transform: none;
    }

    /* Same height for every rail row — long Qs clamp like the short ones */
    .s-faq .fdc-faq-rail-label {
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.35;
        text-transform: none;
        letter-spacing: 0.02rem;
    }

    /* Stage is a fixed frame; cards fill it absolutely */
    .s-faq .fdc-faq-list {
        display: block;
        position: relative;
        align-self: stretch;
    }

    .s-faq .fdc-faq-item {
        position: absolute;
        inset: 0;
        display: none;
        margin: 0;
        height: auto;
        max-height: none;
        width: auto;
        border-radius: 10px;
        overflow: hidden;
        flex-direction: column;
    }

    .s-faq .fdc-faq-item.is-open,
    .s-faq .fdc-faq-item[data-open="true"] {
        display: flex;
        background: var(--faq-sage);
    }

    .s-faq .fdc-faq-item::before {
        top: 0.6rem;
        right: 1.4rem;
        font-size: 12rem;
        color: rgba(254, 240, 236, 0.1);
    }

    .s-faq button.fdc-faq-summary {
        cursor: default !important;
        pointer-events: none;
        flex: 0 0 auto;
        padding: 2.4rem 2.6rem 1rem !important;
        gap: 1.6rem !important;
        background: transparent !important;
        max-width: 100%;
    }

    .s-faq .fdc-faq-toggle {
        display: none;
    }

    .s-faq .fdc-faq-index {
        min-width: 4.6rem;
        height: 4.6rem;
        margin-top: 0.15rem;
        font-size: 1.35rem;
        background: var(--secondary-accent-color, #FDDFC3);
        color: var(--variation-color, #3f3f3f);
        border-color: var(--secondary-accent-color, #FDDFC3);
    }

    .s-faq .fdc-faq-q {
        font-size: clamp(2rem, 2.3vw, 2.7rem);
        line-height: 1.25;
        color: #fff;
        text-shadow: 0 2px 10px rgba(63, 63, 63, 0.25);
        padding-right: 1.2rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    /* Body fills remaining card; scrolls — same for every FAQ */
    .s-faq .fdc-faq-panel {
        display: flex !important;
        flex-direction: column;
        grid-template-rows: none !important;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .s-faq .fdc-faq-panel-inner {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        height: auto;
    }

    .s-faq .fdc-faq-a {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        margin: 0 2.4rem 2.4rem;
        padding: 1.8rem 2rem 2rem;
        max-width: none;
        font-size: 1.7rem;
        line-height: 1.75;
        color: rgba(254, 240, 236, 0.94);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .s-faq .fdc-faq-a::before {
        width: 5.6rem;
        margin-bottom: 1.4rem;
    }
}

/* ── Tablet / phone accordion ──────────────────────────────────── */

@media only screen and (max-width: 900px) {
    .s-faq {
        padding-top: 11rem;
        padding-bottom: 9rem;
    }

    .s-faq .fdc-faq-shell {
        padding: 0 1.2rem;
    }

    .s-faq .fdc-faq-intro {
        margin-bottom: 3rem;
    }

    .s-faq button.fdc-faq-summary {
        padding: 1.7rem 1.6rem !important;
        gap: 1.2rem !important;
    }

    .s-faq .fdc-faq-index {
        min-width: 3.6rem;
        height: 3.6rem;
        font-size: 1.2rem;
    }

    .s-faq .fdc-faq-q {
        font-size: 1.6rem;
        line-height: 1.35;
    }

    .s-faq .fdc-faq-toggle {
        width: 2.7rem;
        height: 2.7rem;
    }

    .s-faq .fdc-faq-a {
        margin: 0 1.2rem 1.4rem;
        padding: 1.4rem 1.5rem 1.6rem;
        font-size: 1.5rem;
        line-height: 1.7;
    }

    .s-faq .fdc-faq-item::before {
        font-size: 6.5rem;
        right: 0.5rem;
        top: 0;
    }
}

@media only screen and (max-width: 480px) {
    .s-faq button.fdc-faq-summary {
        padding: 1.5rem 1.3rem !important;
    }

    .s-faq .fdc-faq-a {
        margin: 0 1rem 1.2rem;
        padding: 1.3rem 1.3rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .s-faq .fdc-faq-panel {
        transition: none;
    }

    .s-faq .fdc-faq-toggle::before,
    .s-faq .fdc-faq-toggle::after {
        transition: none;
    }
}

/* ==========================================================================
   About — compact sage cards (text-first, minimal photos)
   ========================================================================== */

.s-about {
    --faq-sage: #6f7c6f;
    --faq-sage-deep: #5f6c5f;
    padding-top: 10rem;
    padding-bottom: 7rem;
}

.s-about .fdc-about-intro {
    margin-bottom: 2rem;
}

/* Use more of the viewport than the default 1200px content row */
.s-about .row.fdc-about-shell {
    width: 96%;
    max-width: 1400px;
}

.s-about .fdc-about-shell {
    margin: 0 auto;
    box-sizing: border-box;
}

.s-about .fdc-about-shell > .col-full {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.s-about .fdc-about-shell *,
.s-about .fdc-about-shell *::before,
.s-about .fdc-about-shell *::after {
    box-sizing: border-box;
}

.s-about .fdc-about-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Compact sage card: height follows text; photo fills the side */
.s-about .fdc-about-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(18rem, 0.38fr) minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid rgba(254, 240, 236, 0.22);
    border-radius: 10px;
    overflow: hidden;
    background: var(--faq-sage);
    box-shadow: 0 6px 16px rgba(63, 63, 63, 0.1);
    color: #fef0ec;
}

.s-about .fdc-about-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(
        135deg,
        rgba(253, 223, 195, 0.1) 0%,
        transparent 45%,
        transparent 100%
    );
}

/*
 * Photo side: absolute img (intrinsic size can't blow the layout),
 * but min-height keeps portraits readable — not a short vertical strip.
 * Card grows with longer copy; photo fills the extra height.
 */
.s-about .fdc-about-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    min-height: 28rem;
    background: var(--faq-sage-deep);
    border-right: 2px solid rgba(253, 223, 195, 0.35);
}

.s-about .fdc-about-photo img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Text top-aligned; min-height matches photo so short copy doesn't squash the image */
.s-about .fdc-about-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 1.6rem 2rem 1.8rem;
    min-width: 0;
    min-height: 28rem;
}

.s-about .fdc-about-heading {
    margin: 0;
    min-width: 0;
    font-family: "montserrat-medium", sans-serif;
    font-size: clamp(1.9rem, 2.1vw, 2.3rem);
    line-height: 1.2;
    font-weight: normal;
    color: #fff;
}

.s-about .fdc-about-body {
    margin: 0;
    font-family: "lora-regular", "Lora", Georgia, serif;
    font-size: clamp(1.4rem, 1.45vw, 1.55rem);
    line-height: 1.55;
    color: rgba(254, 240, 236, 0.94);
}

.s-about .fdc-about-body p {
    margin: 0 0 0.65em;
}

.s-about .fdc-about-body p:last-child {
    margin-bottom: 0;
}

.s-about .fdc-about-body strong {
    font-family: "lora-bold", "Lora", Georgia, serif;
    color: #fef0ec;
}

/* Quote — compact */
.s-about .fdc-about-quote {
    margin: 0.15rem 0 0;
    padding: 0.9rem 1.1rem;
    border-left: 3px solid var(--secondary-accent-color, #FDDFC3);
    border-radius: 0 6px 6px 0;
    background: rgba(253, 223, 195, 0.12);
    font-family: "lora-regular", "Lora", Georgia, serif;
    font-size: clamp(1.3rem, 1.35vw, 1.4rem);
    line-height: 1.5;
    color: rgba(254, 240, 236, 0.95);
}

.s-about .fdc-about-quote em,
.s-about .fdc-about-quote i {
    font-style: italic;
}

.s-about .fdc-about-quote::before {
    display: none;
}

/* Gallery — square tiles, no clipping */
.s-about .fdc-about-gallery {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.2rem;
    height: auto;
}

.s-about .fdc-about-gallery-item {
    margin: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(254, 240, 236, 0.22);
    background: var(--faq-sage);
}

.s-about .fdc-about-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── About responsive ──────────────────────────────────────────── */

@media only screen and (max-width: 800px) {
    .s-about {
        padding-top: 8.5rem;
        padding-bottom: 6rem;
    }

    .s-about .fdc-about-intro {
        margin-bottom: 1.6rem;
    }

    .s-about .fdc-about-card {
        grid-template-columns: minmax(14rem, 0.36fr) minmax(0, 1fr);
    }

    .s-about .fdc-about-photo,
    .s-about .fdc-about-panel {
        min-height: 24rem;
    }

    .s-about .fdc-about-panel {
        padding: 1.35rem 1.5rem 1.4rem;
        gap: 0.6rem;
    }

    .s-about .fdc-about-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.7rem;
        height: auto;
    }
}

@media only screen and (max-width: 600px) {
    .s-about {
        padding-top: 7.5rem;
        padding-bottom: 5rem;
    }

    .s-about .fdc-about-shell {
        padding: 0 1.2rem 0;
    }

    .s-about .fdc-about-cards {
        gap: 0.85rem;
    }

    /* Photo as a short banner above text — not a tall stack */
    .s-about .fdc-about-card {
        grid-template-columns: 1fr;
    }

    .s-about .fdc-about-photo {
        height: 18rem;
        min-height: 18rem;
        border-right: 0;
        border-bottom: 2px solid rgba(253, 223, 195, 0.35);
    }

    .s-about .fdc-about-panel {
        min-height: 0;
    }

    .s-about .fdc-about-heading {
        font-size: 1.85rem;
    }

    .s-about .fdc-about-body {
        font-size: 1.4rem;
        line-height: 1.55;
    }

    .s-about .fdc-about-quote {
        padding: 0.8rem 1rem;
        font-size: 1.3rem;
    }

    .s-about .fdc-about-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        height: auto;
        margin-top: 0.85rem;
        gap: 0.6rem;
    }
}
