/* Design tokens taken from the Celebrate Rosh Hashanah mockup. */
:root {
    --navy: #2a3b6f;
    --blue: #0876b9;
    --sky: #eaf6fc;
    --gold: #c79b35;
    --gold-light: #f7edd2;
    --cream: #fffdf7;
    --text: #1f2d3d;
    --muted: #6f7b87;
    --border: #d9e2ea;
    --success: #1b8f63;
    --danger: #b00020;
    --shadow: 0 18px 50px rgba(42,59,111,.12);
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Archivo', Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(199,155,53,.10), transparent 22%),
        radial-gradient(circle at 92% 14%, rgba(8,118,185,.10), transparent 25%),
        #f7fbfe;
    color: var(--text);
    line-height: 1.5;
}

/* ---------- Header ---------- */

/* Top bar: logo on the left with the standing message beside it. White ground
   and navy type - the navy is the logo's own (#2a3b6e sampled from the mark),
   which is what --navy already holds, so the two cannot drift apart. */
.topbar {
    background: #fff;
    color: var(--navy);
    padding: 10px 20px;
    font-size: 14px;
    border-bottom: 1px solid #e6e6e6;
}

.topbar-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-logo { flex: 0 0 auto; display: block; }
.topbar-logo img { height: 55px; width: auto; display: block; }

.topbar-message { font-weight: 600; line-height: 1.35; }

/* The hero banner carries its artwork on the right and open navy on the left,
   so the headline sits left. The scrim is keyed to the image's own left-hand
   colour (#0d1637) and fades out by 60%, where the ambulance and Jerusalem
   skyline begin - carrying it further would dim the artwork it sits on. */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: #0d1637;
    background-image:
        linear-gradient(90deg, rgba(13,22,55,.92) 0%, rgba(13,22,55,.78) 26%, rgba(13,22,55,.28) 46%, rgba(13,22,55,0) 62%),
        url('Images/TopBanner.jpg');
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
    padding: 84px 20px 96px;
}

.hero-inner {
    max-width: 1120px;
    margin: auto;
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.03;
    letter-spacing: -1.6px;
    max-width: 560px;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.hero p {
    max-width: 520px;
    font-size: 18px;
    color: rgba(255,255,255,.90);
    margin: 20px 0 0;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

/* ---------- Layout ---------- */

.layout {
    max-width: 900px;
    margin: -34px auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 32px;
    margin-bottom: 24px;
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--navy);
    font-size: 22px;
    letter-spacing: -.3px;
}

.step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    flex: 0 0 32px;
}

.subhead {
    margin: 28px 0 16px;
    color: var(--navy);
    font-size: 18px;
}

/* ---------- Fields ---------- */

.field { margin-bottom: 18px; flex: 1; }
.field-row { display: flex; gap: 18px; flex-wrap: wrap; }
.field-medium { flex: 0 0 200px; }
.field-narrow { flex: 0 0 150px; }

.field label,
.field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--navy);
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(8,118,185,.15);
}

.field-hint {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 6px;
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}

/* ---------- Card design picker ---------- */

.card-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.card-options label {
    display: block;
    border: 3px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    transition: all .15s ease;
}

.card-options label img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 8px;
}

.card-options input[type="radio"]:checked + label {
    border-color: var(--gold);
    box-shadow: 0 8px 24px rgba(199,155,53,.28);
}

/* Name and price stack under the thumbnail. The price is the donation for
   ONE card of that design - the total is the block below the picker. */
.card-options .card-name { display: block; }

.card-options .card-price {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
}

/* ---------- Donation total ---------- */

.donation-total {
    margin: 20px 0 4px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fbf8f1;
}

.donation-total-label {
    display: block;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
}

.donation-total-value {
    display: block;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 900;
    color: var(--navy);
}

.donation-total-detail {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

/* ---------- Honoree accordion ---------- */

.section-note {
    margin: -6px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.honoree-count-note { font-weight: 700; color: var(--navy); }

.honoree-list { display: flex; flex-direction: column; gap: 12px; }

.honoree {
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.honoree.is-open { border-color: var(--navy); box-shadow: 0 6px 20px rgba(42,59,111,.10); }

/* Blocks past the card count. Hidden, never removed: lowering the quantity
   and raising it again must not lose what was already typed. */
.honoree.is-hidden { display: none; }

.honoree-head { margin: 0; }

.honoree-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.honoree-toggle:hover { background: #f7f8fb; }

.honoree-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.honoree.is-open .honoree-num { background: var(--gold); color: #2b2100; }

.honoree-heading { flex: 1 1 auto; min-width: 0; }

.honoree-label {
    display: block;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
}

.honoree-who {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.honoree-who.is-empty { font-weight: 500; color: var(--muted); font-style: italic; }

.honoree-status {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.honoree-status.is-ready { background: #e7f4ec; color: #1d6b3a; }
.honoree-status.is-incomplete { background: #f3f0e6; color: #8a6a17; }

.honoree-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .18s ease;
    margin-right: 4px;
}

.honoree.is-open .honoree-chevron { transform: rotate(-135deg); }

/* Collapsed by default. Height is not animated: a block holds a textarea that
   can grow, and a fixed max-height would clip a long message mid-edit. */
.honoree-body { display: none; padding: 4px 18px 18px; border-top: 1px solid var(--border); }
.honoree.is-open .honoree-body { display: block; }

.honoree-actions { margin-top: 4px; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-decoration: underline;
    cursor: pointer;
}

.link-btn:hover { color: var(--gold); }

@media (max-width: 720px) {
    .honoree-toggle { gap: 10px; padding: 12px 14px; }
    .honoree-status { display: none; }
    .honoree-body { padding: 4px 14px 14px; }
}

/* ---------- Stripe ---------- */

#stripe-payment-element {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

/* ---------- Actions & messages ---------- */

.actions { text-align: center; margin: 8px 0 40px; }

.btn-primary {
    background: var(--gold);
    color: #2b2100;
    border: none;
    border-radius: 999px;
    padding: 17px 52px;
    font-size: 18px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(199,155,53,.35);
}

.btn-primary:hover { background: #b98d2c; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* Same look as :disabled, for the window between the postback leaving and the
   Thank You page arriving - the button must stay enabled to be posted. */
.btn-primary.is-busy,
.btn-primary.is-busy:hover {
    opacity: .6;
    cursor: not-allowed;
    background: var(--gold);
    pointer-events: none;
}

.actions-note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.message {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-size: 15px;
    border: 1px solid;
}

.message-success {
    background: #e8f6ef;
    color: #14664a;
    border-color: #b6dfc3;
}

.message-error {
    background: #fbe7e9;
    color: #8a1c22;
    border-color: #f0b7bc;
}

/* A recorded donation with a caveat - a duplicate-gift notice, or email that
   did not go out. Never styled as an error: the gift is safely in Neon. */
.message-warning {
    background: var(--gold-light);
    color: #6d5314;
    border-color: #e4cf95;
}

/* ---------- Thank-you page ---------- */

.thankyou { text-align: center; padding: 44px 40px 36px; }

/* Confirmation tick. Purely decorative - the page says what happened in
   words, so screen readers skip this. */
.thankyou-mark {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #e8f6ef;
    color: var(--success);
    border: 2px solid #b6dfc3;
    font-size: 34px;
    line-height: 64px;
    font-weight: 700;
}

/* .card h2 is a flex row (it carries the numbered step badge on the form), and
   flex ignores text-align - so this heading opts back out to a plain block.
   Qualified with .card to outweigh that rule. */
.card h2.thankyou-title {
    display: block;
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
}

.thankyou-lede {
    margin: 0 auto 30px;
    max-width: 560px;
    font-size: 17px;
    color: var(--text);
}

.thankyou-lede strong { color: var(--navy); white-space: nowrap; }

/* What was given, and for whom. Left-aligned inside the centred card so the
   values line up and stay scannable. */
.receipt {
    margin: 0 auto 28px;
    max-width: 520px;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--cream);
    padding: 6px 22px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.receipt-row:last-child { border-bottom: none; }

.receipt dt {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.receipt dd {
    margin: 0;
    font-weight: 700;
    color: var(--navy);
    text-align: right;
    word-break: break-word;
}

/* Per-card breakdown on a multi-honoree order. */
.receipt-cards {
    margin: 8px 0 0;
    padding-left: 20px;
    list-style: disc;
}

.receipt-cards li {
    margin: 4px 0;
    font-weight: 500;
}

/* The reason for the page: which emails went where. */
.emails-sent {
    max-width: 560px;
    margin: 0 auto 26px;
    text-align: left;
    background: var(--sky);
    border: 1px solid #c6e4f4;
    border-radius: 14px;
    padding: 20px 24px;
}

.emails-sent h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
}

.emails-sent ul { margin: 0; padding-left: 20px; }
.emails-sent li { margin-bottom: 8px; font-size: 15px; }
.emails-sent li:last-child { margin-bottom: 0; }
/* Wrap a long address onto its own line rather than splitting it mid-word;
   split it only if it is too long for a line on its own. */
.emails-sent strong { color: var(--navy); overflow-wrap: break-word; }

/* The warning box holds sentences, not a headline - centring it inside the
   centred card makes it hard to read. */
.thankyou .message {
    max-width: 560px;
    margin: 0 auto 26px;
    text-align: left;
}

.thankyou-footnote {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* The "send another card" action is a link, not a button, so it needs the
   button box model spelled out. */
a.btn-primary {
    display: inline-block;
    text-decoration: none;
}

/* ---------- Footer ---------- */

/* Lifted from hsfcpr.org/Register.aspx so the two pages end the same way.
   The original rides on Bootstrap 4's .container / .row / .col-md-4; those are
   rebuilt here (same 1140px container, same 768px stacking breakpoint) because
   this app does not load Bootstrap. Colours, fonts and spacing are unchanged. */
.hsf-footer {
    background-color: #fff;
    color: #444;
    padding: 48px 0 20px;
    font-family: 'Arimo', sans-serif;
    font-size: 0.88rem;
    border-top: 4px solid #e1ff00;
}

.hsf-footer a { color: #1a2a4a; text-decoration: none; }
.hsf-footer a:hover { color: #c8102e; text-decoration: underline; }

.hsf-footer-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Bootstrap's .row is a flex container with -15px gutters; .col-md-4 is a
   third of the width above 768px and full width below it. */
.hsf-footer-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.hsf-footer-col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    margin-bottom: 1.5rem;
}

.hsf-footer .footer-title {
    font-family: 'Arimo', sans-serif;
    color: #0d1f3c;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.hsf-footer .footer-logo { height: 60px; margin-bottom: 14px; display: block; }

.hsf-footer .footer-org-name {
    font-family: 'Arimo', sans-serif;
    color: #0d1f3c;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.hsf-footer hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 1rem 0;
}

.hsf-footer .footer-copy { color: #888; font-size: 0.82rem; text-align: center; }
.hsf-footer .footer-contact-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.hsf-footer .footer-contact-item svg { flex-shrink: 0; margin-top: 2px; }

/* Bootstrap's .mb-1 on each Quick Link. */
.hsf-footer .footer-link { margin-bottom: 0.25rem; }

/* Bootstrap's md breakpoint: below it col-md-4 goes full width. */
@media (max-width: 767.98px) {
    .hsf-footer-col { flex: 0 0 100%; max-width: 100%; }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
    /* Keep the logo and message side by side, just smaller - stacking them
       pushes the hero down and wastes the fold on a phone. */
    .topbar { padding: 9px 14px; font-size: 12.5px; }
    .topbar-inner { gap: 11px; }
    .topbar-logo img { height: 43px; }

    /* Narrow screens crop the banner's artwork, so darken the whole thing
       evenly rather than relying on the left-to-right scrim. */
    .hero {
        padding: 56px 20px 68px;
        background-image:
            linear-gradient(rgba(13,22,55,.86), rgba(13,22,55,.86)),
            url('Images/TopBanner.jpg');
    }
    .field-row { flex-direction: column; gap: 0; }
    .field-medium, .field-narrow { flex: 1; }
    .card { padding: 24px 20px; }

    .thankyou { padding: 32px 20px 28px; }
    .thankyou-title { font-size: 23px; }

    /* Label above value - side by side leaves no room for an email address. */
    .receipt-row { flex-direction: column; gap: 4px; }
    .receipt dd { text-align: left; }
}
