/* ═══════════════════════════════════════════════════════════════════ */
/* SINGLE EVENT — single-events.php                                      */
/*                                                                       */
/* Bespoke top: a feature image + title + description beside a sticky     */
/* registration rail (the "Card Rail" mockup, hero/band dropped). The     */
/* rail is the approved archive event card grown into a detail panel —    */
/* solid blue-dk header, blue-dk meta icons, blue-tint category chip,     */
/* full-width Register/Add-to-Calendar. Buttons, .pre-title, and .icon    */
/* sizing are global; only layout + card skin live here. Flex content     */
/* (content_blocks) renders below with its own per-block CSS.             */

/* ── layout: main column + sticky rail ─────────────────────────────── */
/* Column 1 stacks two rows — the intro, then the flex content blocks. The rail
   spans BOTH rows in column 2 so `position: sticky` holds it beside the content
   blocks too, not just the intro. row-gap is 0 (only column-gap is set) so the
   empty blocks row — the default until the ACF group is attached — adds no
   phantom space; vertical spacing is applied as margin only when blocks exist. */
.event-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    column-gap: 44px;
    align-items: start;
    padding: 44px 0 56px;
}

/* Rail is first in DOM (so it leads on mobile) but placed in column 2 on
   desktop; the main column is explicitly column 1. */
.event-single__main {
    grid-column: 1;
    grid-row: 1;
}

.event-single__blocks {
    grid-column: 1;
    grid-row: 2;
}

.event-single__blocks:not(:empty) {
    margin-top: 44px;
}

/* Blocks now sit inside the intro's .container + this grid column, so drop their
   own container width/padding — the grid column already sizes and insets them.
   (A full-bleed block would be boxed to the column; that's the trade-off for the
   rail staying sticky beside the content.) */
.event-single__blocks .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.event-single__rail {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    --rail-sticky-top: 190px; /* clears the sticky #masthead (~174px) with a small gap */
    top: var(--rail-sticky-top);
}

body.admin-bar .event-single__rail {
    --rail-sticky-top: 222px; /* + 32px WP admin bar */
}

/* ── registration card (archive event card, grown up) ──────────────── */
.event-single__card {
    background: var(--white);
    border-radius: var(--box-border-radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.event-single__card-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    background: var(--blue-dk);
}

.event-single__card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.event-single__card-date__mon {
    font-family: "Cachet", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--blue-lt);
    margin-bottom: 4px;
}

.event-single__card-date__day {
    font-family: "Cachet", sans-serif;
    font-weight: 700;
    font-size: 44px;
    letter-spacing: -1.8px;
    color: var(--white);
}

.event-single__card-head-meta {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    padding-left: 18px;
}

.event-single__card-head-meta strong {
    display: block;
    font-family: "Cachet", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--white);
}

.event-single__card-head-meta span {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* ── card body: meta rows ──────────────────────────────────────────── */
.event-single__card-body {
    padding: 22px 24px 24px;
}

.event-single__card-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.event-single__card-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-dk);
}

.event-single__card-meta-item .icon {
    font-size: 16px;
    color: var(--blue-dk);
    margin-top: 1px;
}

.event-single__card-meta-item strong {
    display: block;
    color: var(--black);
}

.event-single__card-meta-item a {
    font-weight: 700;
    color: var(--blue-dk);
}

.event-single__card-meta-item a:hover {
    color: var(--purple-dk);
}

.event-single__chip {
    display: inline-block;
    font-family: "Cachet", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.2px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--blue-tint);
    color: var(--blue-dk);
}

/* ── card actions ──────────────────────────────────────────────────── */
.event-single__card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-lt);
}

.event-single__card-actions .btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.event-single__card-note {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--gray-dk);
    text-align: center;
}

/* ── main column: feature image + title + copy ─────────────────────── */
.event-single__feature {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--box-border-radius-sm);
    overflow: hidden;
    background: var(--gray); /* placeholder when an event has no featured image */
    margin-bottom: 32px;
}

.event-single__feature-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* the site's "photography with blue overlays" bottom fade */
.event-single__feature-grad {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    background: var(--blue-overlay-gradient);
    opacity: 0.5;
    pointer-events: none;
}

/* no image → collapse the media box entirely (title leads instead) */
.event-single__feature--plain {
    aspect-ratio: auto;
    background: none;
    margin-bottom: 0;
}

/* h1 inherits Cachet / bold / uppercase from the base heading rule; only
   size, colour, and rhythm are tuned here. */
.event-single__title {
    font-size: 48px;
    letter-spacing: -1.4px;
    color: var(--blue-dk);
    margin: 0 0 20px;
}

.event-single__description p {
    margin: 0 0 18px;
}

.event-single__description > :last-child {
    margin-bottom: 0;
}

/* ── responsive: rail leads, single column ─────────────────────────── */
@media (max-width: 980px) {
    .event-single__layout {
        grid-template-columns: 1fr;
        padding: 32px 0 40px;
    }

    .event-single__rail {
        grid-column: 1;
        grid-row: 1;
        position: static;
    }

    .event-single__main {
        grid-column: 1;
        grid-row: 2;
        margin-top: 32px;
    }

    .event-single__blocks {
        grid-column: 1;
        grid-row: 3;
    }

    .event-single__blocks:not(:empty) {
        margin-top: 32px;
    }
}

@media (max-width: 768px) {
    .event-single__title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .event-single__feature {
        margin-bottom: 24px;
    }
}

@media (max-width: 576px) {
    .event-single__card-date__day {
        font-size: 38px;
    }

    .event-single__title {
        font-size: 30px;
    }
}
