:root {
    --bgc-ink: #1d2230;
    --bgc-ink-soft: #4a5267;
    --bgc-gold: #b48a3f;
    --bgc-gold-dark: #8f6b2c;
    --bgc-cream: #faf7f1;
    --bgc-line: #e6ddcd;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--bgc-ink);
    background: #fff;
}

/* The `hidden` attribute hides an element only through the browser's own
   `[hidden] { display: none }` rule, which carries no !important - so any Bootstrap
   display utility on the element (d-flex, d-block, d-grid...) silently wins and the
   element stays on screen however many times the script sets `.hidden = true`.
   This file loads after Bootstrap, so the same specificity plus !important settles it.
   Without this, #dateTaken on the booking form is visible from the first paint. */
[hidden] {
    display: none !important;
}

.font-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
    letter-spacing: .01em;
}

h1, h2, h3, .h1, .h2, .h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
}

a {
    color: var(--bgc-gold-dark);
}

a:hover {
    color: var(--bgc-gold);
}

/* ---------------------------------------------------------------- nav */
/* Stated here rather than relying on Bootstrap's .sticky-top alone, so the bar
   keeps sticking even if the utility class is dropped from the markup. */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bgc-line);
    transition: box-shadow .2s ease, background-color .2s ease;
}

/* Lifts off the page once the hero scrolls under it. */
.site-nav.is-scrolled {
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 6px 24px rgba(29, 34, 48, .10);
}

/* position: sticky dies inside an ancestor that clips overflow. */
html,
body,
body > header {
    overflow-x: clip;
    overflow-y: visible;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bgc-ink);
}

.brand-logo {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bgc-gold);
    color: #fff;
    font-size: .85rem;
    letter-spacing: .04em;
}

.site-nav .nav-link {
    color: var(--bgc-ink-soft);
    font-weight: 500;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
    color: var(--bgc-gold-dark);
}

.btn-gold {
    background: var(--bgc-gold);
    border-color: var(--bgc-gold);
    color: #fff;
    font-weight: 600;
}

.btn-gold:hover,
.btn-gold:focus {
    background: var(--bgc-gold-dark);
    border-color: var(--bgc-gold-dark);
    color: #fff;
}

.btn-outline-gold {
    border-color: var(--bgc-gold);
    color: var(--bgc-gold-dark);
    font-weight: 600;
}

.btn-outline-gold:hover,
.btn-outline-gold:focus {
    background: var(--bgc-gold);
    color: #fff;
}

/* The chosen option of a toggle group, e.g. one time / monthly on the donate page. */
.btn-check:checked + .btn-outline-gold {
    background: var(--bgc-gold);
    border-color: var(--bgc-gold);
    color: #fff;
}

/* --------------------------------------------------------------- hero */
.hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 20, 30, .62), rgba(16, 20, 30, .78));
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 6rem 1rem;
    max-width: 880px;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.1;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero .lead {
    font-size: clamp(1rem, 2.1vw, 1.25rem);
    color: rgba(255, 255, 255, .88);
}

.hero .btn {
    padding: .7rem 2rem;
    font-size: 1.05rem;
}

/* ------------------------------------------------------------ sections */
.section {
    padding: 4.5rem 0;
}

.section-cream {
    background: var(--bgc-cream);
}

.section-title {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    margin-bottom: .5rem;
}

.section-rule {
    width: 64px;
    height: 3px;
    background: var(--bgc-gold);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.text-muted-light {
    color: #9aa1ad;
}

/* ------------------------------------------------------------- gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: .75rem;
    background: #efe9dd;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .6rem .8rem;
    font-size: .85rem;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7));
}

.gallery-empty {
    border: 1px dashed var(--bgc-line);
    border-radius: .75rem;
    padding: 3rem 1rem;
    text-align: center;
    color: #8d8a84;
}

/* --------------------------------------------------------------- cards */
.soft-card {
    background: #fff;
    border: 1px solid var(--bgc-line);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(29, 34, 48, .05);
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: .6rem;
}

.amount-btn {
    border: 1px solid var(--bgc-line);
    background: #fff;
    border-radius: .6rem;
    padding: .65rem .4rem;
    font-weight: 600;
    color: var(--bgc-ink);
    transition: all .15s ease;
}

.amount-btn:hover {
    border-color: var(--bgc-gold);
}

.amount-btn.active {
    background: var(--bgc-gold);
    border-color: var(--bgc-gold);
    color: #fff;
}

.option-card {
    border: 1px solid var(--bgc-line);
    border-radius: .75rem;
    padding: 1rem;
    height: 100%;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.option-card:hover {
    border-color: var(--bgc-gold);
}

.option-card input:checked ~ .option-label {
    color: var(--bgc-gold-dark);
}

.option-card:has(input:checked) {
    border-color: var(--bgc-gold);
    background: #fdf8ef;
}

/* --------------------------------------------------------------- prices */
.price-summary,
.fee-card {
    border: 1px solid var(--bgc-line);
    border-radius: .85rem;
    background: #fdfcf9;
    padding: 1.1rem 1.25rem;
}

.price-summary .border-top,
.fee-card .border-top {
    border-color: var(--bgc-line) !important;
}

.money-strong {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ---------------------------------------------------------------- zelle */
.zelle-panel {
    border: 1px solid var(--bgc-line);
    border-radius: .85rem;
    background: #fdfcf9;
    padding: 1.25rem;
}

.zelle-handle code {
    background: #fff;
    border: 1px solid var(--bgc-line);
    border-radius: .4rem;
    padding: .35rem .6rem;
    color: var(--bgc-ink);
    word-break: break-all;
}

.zelle-qr {
    width: 200px;
    height: 200px;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid var(--bgc-line);
    border-radius: .6rem;
    background: #fff;
    padding: .5rem;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 200px;
    height: 200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
    border: 2px dashed var(--bgc-line);
    border-radius: .6rem;
    background: #fff;
    color: #8d8a84;
}

.qr-placeholder i {
    font-size: 2.4rem;
    color: var(--bgc-gold);
    opacity: .55;
}

.qr-placeholder > span:first-of-type {
    font-weight: 600;
    font-size: .9rem;
}

.qr-placeholder-hint {
    font-size: .68rem;
    line-height: 1.35;
}

.qr-placeholder-hint code {
    font-size: .68rem;
    color: #8d8a84;
    word-break: break-all;
}

.copy-feedback {
    color: #1a7f45;
    font-weight: 600;
}

.date-feedback.available {
    color: #1a7f45;
}

.date-feedback.unavailable {
    color: #b3261e;
}

/* -------------------------------------------------------------- footer */
.site-footer {
    background: var(--bgc-ink);
    color: #d8dbe3;
}

.site-footer a {
    color: #e3c585;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/* --------------------------------------------------------------- admin */
.admin-body {
    background: #f5f6f8;
}

.admin-sidebar {
    background: var(--bgc-ink);
    color: #cfd4de;
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: #cfd4de;
    border-radius: .5rem;
    padding: .55rem .85rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-sidebar .nav-link.active {
    background: var(--bgc-gold);
    color: #fff;
}

.stat-card {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: .9rem;
    padding: 1.1rem 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8a91a0;
}

/* The dashboard's revenue chart: each month this year beside the same month last year. */
.revenue-this-year {
    background: var(--bgc-gold);
}

.revenue-last-year {
    background: #cfd4de;
}

.revenue-key {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: .15rem;
    margin-right: .3rem;
    vertical-align: -.05rem;
}

.revenue-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .35rem;
}

.revenue-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 140px;
    border-bottom: 1px solid #e6e8ee;
}

.revenue-bar {
    flex: 1 1 0;
    max-width: 18px;
    min-height: 1px;
    border-radius: .2rem .2rem 0 0;
}

.revenue-month-name {
    font-size: .72rem;
    text-align: center;
    margin-top: .25rem;
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a91a0;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        min-height: auto;
    }
}

/* The about text is admin-written HTML, so it needs the spacing a bare <p> would
   otherwise inherit from nowhere. */
.about-body > p:last-child,
.about-body > ul:last-child,
.about-body > ol:last-child {
    margin-bottom: 0;
}

.about-body ul,
.about-body ol {
    padding-left: 1.25rem;
}

.about-body h3,
.about-body h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* ------------------------------------------------- admin event calendar */
.event-calendar {
    table-layout: fixed;
    min-width: 720px;
}

.event-calendar td {
    height: 7.5rem;
    vertical-align: top;
    padding: .35rem;
    position: relative;
}

.event-calendar td.outside {
    background: #f8f9fa;
    color: #9aa1ad;
}

.event-calendar td.shabbos {
    background: #fbf7ee;
}

.event-calendar td.today {
    box-shadow: inset 0 0 0 2px var(--bgc-gold);
}

.event-calendar .day-number {
    font-weight: 600;
}

.event-calendar .hebrew-date {
    font-size: .8rem;
    color: #6c757d;
    white-space: nowrap;
}

.event-calendar .hebrew-month {
    font-size: .7rem;
    margin-bottom: .2rem;
}

.calendar-booking {
    display: block;
    font-size: .75rem;
    line-height: 1.25;
    padding: .2rem .35rem;
    margin-top: .25rem;
    border-radius: .25rem;
    border-left: 3px solid;
    text-decoration: none;
    color: inherit;
}

.calendar-booking.confirmed,
.calendar-key.confirmed {
    background: #e8f5ec;
    border-color: #198754;
}

.calendar-booking.pending,
.calendar-key.pending {
    background: #fff6e0;
    border-color: #f0ad4e;
}

.calendar-booking.cancelled,
.calendar-key.cancelled {
    background: #f1f1f1;
    border-color: #adb5bd;
    text-decoration: line-through;
}

.calendar-booking:hover {
    filter: brightness(.96);
}

.calendar-key {
    display: inline-block;
    width: .8rem;
    height: .8rem;
    border-left: 3px solid;
    margin-right: .35rem;
    vertical-align: -1px;
}

.calendar-add {
    position: absolute;
    right: .3rem;
    bottom: .2rem;
    color: #adb5bd;
    text-decoration: none;
    opacity: .35;
}

.event-calendar td:hover .calendar-add,
.calendar-add:focus {
    opacity: 1;
}
