/* ==========================================================================
   PAGES: inner pages (page head, causes, stories, forms, legal, gallery...)
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.section--tight { padding: clamp(24px, 5vw, 56px) 0 clamp(40px, 7vw, 80px); }

/* ---- Page head + breadcrumbs ---- */
.page-head { padding: clamp(24px, 5vw, 52px) 0; background: linear-gradient(160deg, var(--green-50), var(--blue-50)); border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.page-head .lead { margin: .6rem 0 0; max-width: 62ch; }
.page-head--tight { padding: .9rem 0; background: var(--soft); }
.crumbs { margin-bottom: .75rem; font-size: .88rem; }
.page-head--tight .crumbs { margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.crumbs li + li::before { content: "\203A"; margin-right: .5rem; color: var(--muted); }
.crumbs a { color: var(--blue-700); display: inline-block; padding: .5rem 0; }
.crumbs [aria-current] { color: var(--muted); }

/* ---- Category filter chips ---- */
.filters { margin-bottom: 1.5rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters ul { display: flex; gap: .5rem; width: max-content; padding-bottom: 4px; }
@media (min-width: 960px) { .filters { overflow: visible; margin-inline: 0; padding-inline: 0; } .filters ul { flex-wrap: wrap; width: auto; } }
.filter { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem 1.1rem; border: 2px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.filter:hover { border-color: var(--blue-700); color: var(--blue); }
.filter.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.intro-text { max-width: 70ch; margin: 0 0 1.5rem; color: var(--muted); font-size: 1.05rem; }

/* ---- Card grids ---- */
.cards--gifts, .cards--stories, .cards--quotes, .cards--team { grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards--gifts, .cards--stories, .cards--quotes { grid-template-columns: repeat(2, 1fr); } .cards--team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards--gifts, .cards--stories, .cards--quotes { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } .cards--team { grid-template-columns: repeat(4, 1fr); } }
.cards--gifts > li, .cards--stories > li { display: flex; }
.cards--gifts > li > *, .cards--stories > li > * { width: 100%; }

.ccard, .scard { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s; }
.ccard:hover, .scard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ccard__media, .scard__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--green-100); }
.ccard__media img, .scard__media img { width: 100%; height: 100%; object-fit: cover; }
.ccard__ph, .scard__ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--green-100), var(--blue-100)); color: var(--blue); }
.scard__ph { background: linear-gradient(135deg, var(--blue-100), var(--green-100)); }
.badge { position: absolute; top: .75rem; left: .75rem; padding: .2rem .65rem; border-radius: 99px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700; }
.ccard__body, .scard__body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.25rem; }
.ccard__cat { margin: 0 0 .25rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green-text); }
.ccard__title, .scard__title { margin: 0 0 .4rem; font-size: 1.15rem; }
.ccard__title a, .scard__title a { color: var(--blue); text-decoration: none; }
.ccard__title a:hover, .scard__title a:hover { text-decoration: underline; }
.ccard__sum, .scard__ex { flex: 1; margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.ccard__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ccard__price { margin: 0; line-height: 1.2; }
.ccard__price strong { display: block; font-size: 1.25rem; color: var(--ink); }
.ccard__price small { color: var(--muted); }
.scard__meta { margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); }
.scard__more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--green-text); text-decoration: none; }
.scard__more:hover { text-decoration: underline; }

/* ---- Testimonials ---- */
.quote { position: relative; padding: 1.5rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.quote__mark { color: var(--green); margin-bottom: .5rem; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.05rem; }
.quote__by { margin: 0; display: flex; flex-direction: column; font-size: .92rem; }
.quote__by span { color: var(--muted); }

/* ---- Cause detail ---- */
.cause-layout { display: grid; gap: 1.5rem; grid-template-areas: "head" "aside" "body"; }
.cause-head { grid-area: head; }
.cause-aside { grid-area: aside; }
.cause-body { grid-area: body; }
@media (min-width: 960px) {
    .cause-layout { grid-template-columns: 1fr 380px; grid-template-areas: "head aside" "body aside"; column-gap: 3rem; align-items: start; }
    .cause-aside { position: sticky; top: calc(var(--header-h) + 20px); }
}
.cause-head h1 { margin-bottom: .4em; }
.cause-hero { width: 100%; height: auto; margin-top: 1rem; border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; }
.gift { padding: 1.4rem; border-top: 5px solid var(--green); box-shadow: var(--shadow); }
.gift__unit { margin: 0 0 1rem; font-size: 1rem; color: var(--muted); }
.gift__unit strong { font-size: 2rem; color: var(--blue); }
.gift__total { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0; padding: .8rem 0; border-block: 1px dashed var(--line); font-weight: 600; }
.gift__total strong { font-size: 1.5rem; color: var(--green-text); }
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: .5rem; }
.stepper__btn { min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--blue); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stepper__btn:hover { border-color: var(--blue-700); }
.stepper__input { min-height: 52px; width: 100%; text-align: center; font-size: 1.2rem; font-weight: 700; border: 2px solid var(--line); border-radius: 12px; -moz-appearance: textfield; }
.stepper__input::-webkit-outer-spin-button, .stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: none; border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(10, 76, 151, .15); }
.goal { margin-top: 1rem; padding: 1rem 1.25rem; }
.goal p { margin: 0 0 .5rem; }
.progress { height: 10px; border-radius: 99px; background: var(--blue-100); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 99px; }

/* ---- Rich text (admin-authored HTML) ---- */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: var(--radius-sm); margin: 1rem 0; }
.prose a { color: var(--blue-700); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2rem 0; }
.share__label { font-weight: 700; color: var(--muted); font-size: .9rem; }
.share__btn { display: inline-flex; align-items: center; min-height: 40px; padding: .35rem 1rem; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--blue); font-weight: 600; font-size: .9rem; text-decoration: none; }
.share__btn:hover { border-color: var(--blue-700); background: var(--blue-50); color: var(--blue); }
.share__btn[hidden] { display: none; }

.callout { margin: 2.5rem 0 0; padding: 1.5rem; border-radius: var(--radius); background: var(--green-50); border: 1px solid var(--green-100); text-align: center; }
.callout h2 { font-size: 1.4rem; }
.callout p { color: var(--muted); }
.callout--left { text-align: left; }
.callout__btns { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- Stories ---- */
.story-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.story-meta { color: var(--muted); font-size: .92rem; }
.story-hero { width: 100%; height: auto; margin: 1rem 0 1.5rem; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }

/* ---- About ---- */
.duo { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .duo { grid-template-columns: 1fr 1fr; gap: 1.75rem; } }
.duo__card { padding: 1.75rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.duo__card p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.member { text-align: center; }
.member__photo { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%; object-fit: cover; }
.member__photo--ph { display: grid; place-items: center; background: var(--blue-100); color: var(--blue); }
.member__role { color: var(--green-text); font-weight: 700; margin-bottom: .4rem; }
.member__bio { color: var(--muted); font-size: .95rem; }

/* ---- Transparency ---- */
.regs { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.regs__row { display: grid; gap: .1rem; padding: .85rem 1rem; }
.regs__row + .regs__row { border-top: 1px solid var(--line); }
.regs__row:nth-child(odd) { background: var(--soft); }
.regs dt { color: var(--muted); font-size: .9rem; }
.regs dd { margin: 0; font-weight: 700; word-break: break-word; }
.regs dd .muted { font-weight: 400; }
@media (min-width: 600px) { .regs__row { grid-template-columns: 1fr 1.2fr; gap: 1rem; align-items: center; } }
.ticks li { display: flex; gap: .65rem; margin-bottom: .7rem; }
.ticks .i { color: var(--green-btn); margin-top: .25rem; }
.doc-group { margin: 1.5rem 0 .6rem; }
.docs li + li { margin-top: .5rem; }
.docs a { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; background: #fff; }
.docs a:hover { border-color: var(--blue-700); }
.docs a span:nth-of-type(1) { flex: 1; font-weight: 600; }
.docs small { color: var(--muted); font-weight: 400; }
.docs__go { color: var(--green-text); font-weight: 700; }

.faq-group { margin: 2rem 0 1rem; font-size: 1.3rem; }
.faq-group:first-child { margin-top: 0; }

/* ---- Donate placeholder ---- */
.summary { padding: 1.5rem; margin-bottom: 1.5rem; }
.summary h2 { font-size: 1.2rem; }
.summary__list { margin: 0; }
.summary__list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.summary__list dt { color: var(--muted); }
.summary__list dd { margin: 0; font-weight: 700; text-align: right; }
.summary__total { border-bottom: 0 !important; font-size: 1.3rem; }
.summary__total dd { color: var(--green-text); }

/* ---- Contact / forms ---- */
.split { display: grid; gap: 2rem; }
@media (min-width: 900px) { .split { grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; } }
.contact-list { margin: 1rem 0; }
.contact-list li { display: flex; gap: 1rem; margin-bottom: 1.1rem; }
.contact-list__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--green-100); color: var(--green-btn); }
.contact-list strong { display: block; }
.contact-list a { color: var(--blue-700); }

.form { padding: clamp(1.1rem, 4vw, 2rem); }
.form h2 { font-size: 1.4rem; }
.form__row { display: grid; gap: 0 1rem; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field .req { color: #b42318; }
.field .opt { color: var(--muted); font-weight: 400; font-size: .85em; }
.field__hint { margin: .3rem 0 0; font-size: .85rem; color: var(--muted); }
.field__err { margin: .3rem 0 0; font-size: .88rem; font-weight: 600; color: #b42318; }
.field.has-error .input { border-color: #b42318; }
.input--area { min-height: 130px; resize: vertical; line-height: 1.5; }
fieldset.field legend { padding: 0; }
.checks { display: grid; gap: .5rem; }
@media (min-width: 520px) { .checks { grid-template-columns: 1fr 1fr; } }
.check { position: relative; display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .5rem .85rem; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .95rem; }
.check:hover { border-color: var(--blue-700); }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--green-btn); }
.check:has(input:checked) { border-color: var(--green-btn); background: var(--green-50); }
.check:has(input:focus-visible) { outline: 3px solid var(--blue-700); outline-offset: 2px; }

.alert { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.25rem; padding: .9rem 1rem; border-radius: var(--radius-sm); font-weight: 600; }
.alert p { margin: 0; }
.alert .i { margin-top: .15rem; }
.alert--ok { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-text); }
.alert--err { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }
.alert:focus { outline: none; }

.empty { padding: 2rem 1rem; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 0; }

/* ---- Pagination ---- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.pager__pages { display: flex; gap: .35rem; }
.pager__btn, .pager__page, .pager__gap { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 .9rem; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--blue); font-weight: 700; text-decoration: none; }
.pager__page { padding: 0; }
.pager__btn:hover, .pager__page:hover { border-color: var(--blue-700); }
.pager__page.is-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager__btn.is-disabled { opacity: .45; }
.pager__gap { border: 0; background: none; min-width: 24px; padding: 0; }

/* ---- Newsletter band (above footer) ---- */
.news { padding: clamp(28px, 5vw, 44px) 0; background: var(--blue-50); border-top: 1px solid var(--blue-100); }
.news__in { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 900px) { .news__in { grid-template-columns: 1fr 1.1fr; gap: 3rem; } }
.news h2 { margin-bottom: .2em; font-size: 1.5rem; }
.news p { margin: 0; color: var(--muted); }
.news__form { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 480px) { .news__form { grid-template-columns: 1fr auto; } }
.news__msg { grid-column: 1 / -1; min-height: 1.4em; font-weight: 600; color: var(--green-text) !important; font-size: .92rem; }
.news__msg .is-err { color: #b42318; }

/* ---- Gallery + lightbox ---- */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery__item { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--blue-100); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery__item:hover img { transform: scale(1.05); }

.lightbox { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(1, 20, 45, .94); color: #fff; }
.lightbox:not([open]) { display: none; }
.lightbox[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lightbox::backdrop { background: rgba(1, 20, 45, .94); }
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: .75rem; min-width: 0; }
.lightbox__img { max-width: 100%; max-height: 78dvh; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.lightbox__cap { padding: 0 .5rem; text-align: center; color: #dce8f6; }
.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; }
.lightbox__nav { display: grid; place-items: center; width: 48px; height: 48px; margin: auto; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; }
.lightbox__nav--prev .i { transform: rotate(180deg); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 599px) { .lightbox[open] { grid-template-columns: 44px 1fr 44px; } .lightbox__nav { width: 40px; height: 40px; } }

/* ---- Donate page ---- */
.donate-wrap { max-width: 760px; }
.alert--warn { background: #fffaeb; border: 1px solid #fedf89; color: #93370d; }
.donate { display: grid; gap: 1rem; }
.dcard { margin: 0; padding: clamp(1.1rem, 4vw, 1.75rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dcard__title { display: flex; align-items: center; gap: .65rem; float: left; width: 100%; margin: 0 0 1.1rem; padding: 0; font-size: 1.2rem; font-weight: 800; color: var(--blue); }
.dcard__title + * { clear: both; }
.dcard__n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-size: .9rem; }
.dtotal { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--green-50); color: var(--ink); font-weight: 600; }
.dtotal strong { font-size: 1.35rem; color: var(--green-text); }
.dmore { margin-top: .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); }
.dmore summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .6rem 1rem; font-weight: 700; color: var(--blue); list-style: none; }
.dmore summary::-webkit-details-marker { display: none; }
.dmore summary .i { transition: transform .2s; }
.dmore[open] summary .i { transform: rotate(180deg); }
.dmore__body { padding: .25rem 1rem 1rem; }
.dconfirm { padding: clamp(1rem, 3vw, 1.5rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.dconfirm .btn { margin-top: .5rem; }
.dconfirm .field { margin-bottom: .25rem; }

/* ---- Pay / thank-you ---- */
.pay-msg { min-height: 1.6em; margin: .75rem 0 0; text-align: center; font-weight: 600; color: var(--muted); }
.pay-msg.is-err { color: #b42318; }
.summary--left { text-align: left; margin: 1.5rem 0 0; }
.done-icon { display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 1rem; border-radius: 50%; background: var(--green-100); color: var(--green-btn); }
.spinner { display: inline-block; width: 52px; height: 52px; margin-bottom: 1rem; border: 5px solid var(--blue-100); border-top-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dev-actions { display: grid; gap: .75rem; margin-top: 1.25rem; }

/* ---- Donor dashboard ---- */
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.head-row h1 { margin-bottom: .2rem; }
.mini-stats { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .mini-stats { grid-template-columns: repeat(3, 1fr); } }
.mini-stats .card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 1.1rem 1.25rem; gap: .15rem; }
.mini-stats .card:last-child { grid-column: 1 / -1; align-items: stretch; } 
@media (min-width: 700px) { .mini-stats .card:last-child { grid-column: auto; align-items: flex-start; } }
.mini-stats span { color: var(--muted); font-size: .9rem; }
.mini-stats strong { font-size: 1.7rem; color: var(--blue); line-height: 1.1; }
.list { display: grid; gap: .6rem; }
.list__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.list__row strong { display: block; }
.list__row small { color: var(--muted); }
.list__row form { margin: 0; }
.input--code { text-align: center; font-size: 1.8rem; letter-spacing: .5em; font-weight: 700; }
