:root {
    --green-900: #12331f;
    --green-800: #17422a;
    --green-700: #1d5636;
    --green-600: #246b43;
    --green-500: #2f8a56;
    --green-100: #e4efe7;

    --sand-50: #faf8f3;
    --sand-100: #f2ede1;
    --sand-300: #ddd4be;

    --gold: #b8912f;
    --ink: #1c1f1d;
    --ink-muted: #5c655f;

    --radius: 10px;
    --shadow: 0 1px 2px rgba(18, 51, 31, .06), 0 6px 20px rgba(18, 51, 31, .07);
}

/* Blazor's own error banner, shared by every layout — global rather than scoped to
   one layout's CSS-isolation file, since #blazor-error-ui is rendered by more than
   one layout and needs to stay hidden by default in all of them. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background-color: var(--sand-50);
}

h1, h2, h3 {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    letter-spacing: -0.01em;
    color: var(--green-900);
}

/* The Sermons section matches the church site's own plain Bootstrap look
   (https://cbcspencer.duckdns.org/cbc/listen) rather than the scramble site's
   green serif headings. */
.sermons-scope h1,
.sermons-scope h2,
.sermons-scope h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: normal;
    color: inherit;
}

.sermons-scope .btn {
    border-radius: 0.375rem;
    padding-inline: 0.75rem;
    font-weight: 400;
}

.sermons-scope .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.sermons-scope .btn-primary:hover,
.sermons-scope .btn-primary:focus,
.sermons-scope .btn-primary:active {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

.sermons-scope .text-primary {
    color: #0d6efd !important;
}

a {
    color: var(--green-600);
}

a:hover {
    color: var(--green-800);
}

.container {
    max-width: 1060px;
}

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

.scramble-shell {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--sand-50) 0%, var(--sand-100) 55%, var(--green-100) 100%);
}

.site-header {
    background: linear-gradient(180deg, var(--green-800), var(--green-900));
    color: #fff;
}

.site-header a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.site-header a:hover {
    color: #fff;
}

.site-brand {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    font-size: 1.25rem;
    color: #fff !important;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}

.brand-logo {
    height: 34px;
    width: auto;
    flex: 0 0 auto;
}

/* Hero ------------------------------------------------------------------ */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    background:
        linear-gradient(90deg, rgba(12, 46, 29, .92) 0%, rgba(12, 46, 29, .75) 38%, rgba(12, 46, 29, .25) 65%, rgba(12, 46, 29, .15) 100%),
        url('/img/hero-course.jpg') 68% 100% / cover no-repeat;
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem 3.5rem;
    box-shadow: var(--shadow);
}

.hero-body {
    position: relative;
    z-index: 1;
    max-width: 34rem;
}

.hero h1 {
    color: #fff;
    margin-bottom: .5rem;
}

.hero-date {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .25rem;
}

.hero-place {
    color: rgba(255, 255, 255, .75);
    margin-bottom: 0;
}

/* Memorial -------------------------------------------------------------- */

.memorial {
    background: #fff;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.memorial-photo {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 1.5rem auto;
}

.memorial-text {
    max-width: 42rem;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink-muted);
}

.memorial-interview {
    background: #fff;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
    max-width: 46rem;
    margin-inline: auto;
}

.memorial-interview > h2 {
    margin-bottom: .25rem;
}

.interview-item {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--sand-100);
}

.interview-item h3 {
    font-size: 1.05rem;
    color: var(--green-700);
    margin-bottom: .5rem;
}

.interview-item p {
    line-height: 1.7;
    margin-bottom: .75rem;
}

.verse-reference {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green-800);
}

.movie-quote {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--green-800);
    border-left: 3px solid var(--gold);
    padding-left: 1rem;
}

/* Welcome and detail panels --------------------------------------------- */

.welcome {
    background: #fff;
    border: 1px solid var(--sand-300);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
}

.welcome p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

.details-panel {
    background: #fff;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
}

.details-panel > h2 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.detail-list {
    margin: 0;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: .7rem 0;
    border-top: 1px solid var(--sand-100);
}

.detail-row:first-child {
    border-top: none;
    padding-top: 0;
}

.detail-row dt {
    flex: 0 0 7rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.detail-row dd {
    margin: 0;
    flex: 1 1 14rem;
}

.agenda {
    list-style: none;
    margin: 0;
    padding: 0;
}

.agenda li {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    padding: .85rem 0 .85rem 1.25rem;
    border-left: 2px solid var(--green-100);
    position: relative;
}

.agenda li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 1.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-500);
}

.agenda-time {
    flex: 0 0 7rem;
    font-weight: 700;
    color: var(--green-700);
}

/* Cards ----------------------------------------------------------------- */

.card {
    border: 1px solid var(--sand-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
}

.card-title {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    color: var(--green-800);
}

.price-tag {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-700);
    line-height: 1.1;
}

/* Buttons --------------------------------------------------------------- */

.btn {
    border-radius: 999px;
    padding-inline: 1.5rem;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--green-700) !important;
    border-color: var(--green-700) !important;
}

.btn-outline-primary {
    color: var(--green-700);
    border-color: var(--green-600);
}

.btn-outline-primary:hover, .btn-outline-primary:active {
    background-color: var(--green-600) !important;
    border-color: var(--green-600) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: var(--ink-muted);
    border-color: var(--sand-300);
}

.btn-outline-secondary:hover {
    background-color: var(--sand-100);
    border-color: var(--ink-muted);
    color: var(--ink);
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .25rem rgba(47, 138, 86, .3);
}

/* Forms ----------------------------------------------------------------- */

.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink-muted);
}

.form-control {
    border: 1px solid var(--sand-300);
    border-radius: 8px;
    padding: .6rem .8rem;
}

.form-control:focus {
    border-color: var(--green-500);
}

.amount-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.amount-choice {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--sand-300);
    border-radius: 999px;
    padding: .55rem 1.15rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--green-800);
    background: #fff;
}

.amount-choice:hover {
    border-color: var(--green-500);
}

.amount-choice:has(input:checked) {
    border-color: var(--green-600);
    background: var(--green-100);
}

.form-section {
    background: #fff;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

/* Honeypot: off-screen rather than display:none, since some bots skip fields
   hidden that way. A real visitor never sees or focuses it. */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    border-color: #c0392b !important;
}

.validation-message, .text-danger {
    color: #c0392b;
}

/* Alerts ---------------------------------------------------------------- */

.alert {
    border-radius: var(--radius);
    border-width: 1px;
}

.alert-info, .alert-success {
    background-color: var(--green-100);
    border-color: var(--green-500);
    color: var(--green-900);
}

.alert-secondary {
    background-color: var(--sand-100);
    border-color: var(--sand-300);
    color: var(--ink-muted);
}

/* Tables ---------------------------------------------------------------- */

.table > :not(caption) > * > * {
    background-color: transparent;
}

.table th {
    color: var(--ink-muted);
    font-weight: 600;
    width: 10rem;
}

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

.site-footer {
    border-top: 1px solid var(--sand-300);
    color: var(--ink-muted);
    font-size: .9rem;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    height: 84px;
    width: auto;
    border-radius: 6px;
    display: block;
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Printable forms --------------------------------------------------------- */

.fill-line {
    border-bottom: 1px solid var(--ink-muted, #666);
    height: 1.75rem;
}

@media print {
    @page {
        margin: 0.5in;
    }

    .site-header, .site-footer, .no-print {
        display: none !important;
    }

    main.container {
        padding: 0;
        margin: 0;
        max-width: none;
    }

    /* Printable forms need to fit a single sheet, so spacing is squeezed well
       below the on-screen defaults only in print/PDF output. */
    .printable-form .form-section {
        padding: 0.4rem 0;
        margin-bottom: 0.4rem;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .printable-form h1 {
        font-size: 1.3rem;
        margin-bottom: 0.25rem;
    }

    .printable-form p {
        margin-bottom: 0.35rem;
    }

    .printable-form .fill-line {
        height: 1.1rem;
    }

    .printable-form .mb-4 {
        margin-bottom: 0.5rem !important;
    }

    .printable-form .mb-3 {
        margin-bottom: 0.4rem !important;
    }

    .printable-form .mb-2 {
        margin-bottom: 0.3rem !important;
    }
}
