/* ── EVENTS ARCHIVE PAGE ─────────────────────────────────────────────────────
   archive-events.php — Pitts theme
   ──────────────────────────────────────────────────────────────────────────── */

/* Section headings */
.events-section-heading {
    font-size: 1.4rem;
    margin: 0 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

/* ── SHARED ROW BASE ──────────────────────────────────────────────────────── */
.event-row:not(.past-row) {
    padding: 0.7rem 0;
    border-bottom: 1px solid #eee;
}
.event-row:last-child {
    border-bottom: none;
}

/* ── UPCOMING EVENTS ─────────────────────────────────────────────────────── */

/* Two-column layout when featured image is present */
.upcoming-row.has-thumb {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Single-column layout when no featured image */
.upcoming-row.no-thumb {
    display: block;
}

.upcoming-row .event-thumb {
    flex: 0 0 220px;
    width: 220px;
}
.upcoming-row .event-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.upcoming-row .event-details {
    flex: 1;
    min-width: 0;
}

.upcoming-row .event-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.2rem;
}
.upcoming-row .event-title a {
    text-decoration: none;
    color: inherit;
}
.upcoming-row .event-title a:hover {
    color: #f22218;
}

.upcoming-row .event-venue,
.upcoming-row .event-address,
.upcoming-row .event-date,
.upcoming-row .event-reception,
.upcoming-row .event-program {
    font-size: 0.875rem;
    margin: 0.15rem 0 0;
}

.upcoming-row .event-program a {
    text-decoration: none;
    color: inherit;
}
.upcoming-row .event-program a:hover {
    color: #f22218;
}

/* ── PAST EVENTS: FILTER TABS ────────────────────────────────────────────── */
.events-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-tab {
    background: none;
    border: 1px solid #bbb;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    color: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-tab:hover,
.filter-tab.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* ── PAST EVENTS: YEAR HEADINGS ──────────────────────────────────────────── */
.events-year-heading {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.1rem 0 0.2rem;
    padding-top: 0.6rem;
    border-top: 1px solid #ddd;
}
.past-events-list .events-year-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ── PAST EVENTS: ROWS ────────────────────────────────────────────────────── */
.past-row {
    display: block;
    padding: 0.3rem 0;
}

.past-row .event-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.1rem;
    display: block; /* one line of running text: title · details · edit link */
}
.past-row .event-title .editLink {
    display: inline;
    margin-left: 0.3em;
    padding: 0;
    font-weight: normal;
}
.past-row .event-title .editLink a {
    color: #bbb;
    text-decoration: none;
}
.past-row .event-title .editLink a:hover {
    color: #f22218;
}
.past-row .event-title a {
    text-decoration: none;
    color: inherit;
}
.past-row .event-title a:hover {
    color: #f22218;
}

.past-row .event-meta {
    font-size: 0.8rem;
    font-weight: normal;
    color: #666;
    margin: 0;
}
.past-row .event-meta a {
    color: inherit;
    text-decoration: none;
}
.past-row .event-meta a:hover {
    color: #f22218;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .upcoming-row.has-thumb {
        flex-direction: column;
    }
    .upcoming-row .event-thumb {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* ── SINGLE EVENT PAGE ───────────────────────────────────────────────────────
   single-event.php — top section two-col (image left, details right),
   lower section one-col (content, program notes, works in exhibition, video)
   ──────────────────────────────────────────────────────────────────────────── */
.event-single-top .two-col.has-thumb {
    gap: 1.5rem;
    align-items: flex-start;
}
.event-single-image img {
    width: 100%;
    height: auto;
    display: block;
}
.event-single-details .event-title {
    margin: 0 0 0.75rem;
}
h1.pageTitle.event-title {
    text-align: left;
}

/* Breadcrumbs: outside the content sections, left edge in line with the site title
   (the header's container is 92% wide and centered). Trail on the left, Edit link
   on the right, one line. */
.breadcrumbs.event-breadcrumbs {
    width: 92%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}
.event-breadcrumbs p.editLink {
    width: auto;
    margin: 0;
}
.event-breadcrumbs a.back-to-events {
    color: inherit;
}
.event-breadcrumbs a.back-to-events:hover {
    color: #f22218;
}
.event-single-details .event-venue,
.event-single-details .event-address,
.event-single-details .event-date,
.event-single-details .event-reception,
.event-single-details .event-program {
    margin: 0.2rem 0 0;
}
.event-single-details .event-program a {
    text-decoration: none;
    color: inherit;
}
.event-single-details .event-program a:hover {
    color: #f22218;
}

.event-program-notes,
.event-associated-works,
.event-video {
    margin-top: 2rem;
}

/* Video: 16:9 frame, full column width up to 800px */
.event-video-frame {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: #000;
}
.event-video-frame iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Works in Exhibition (hwd_associated_works): Work-page thumbnails, wrapping onto new rows */
.event-works-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}
.event-works-grid .work-thumb {
    display: flex;
    flex-direction: column;
    width: min-content; /* thumb as wide as its image; title and details wrap beneath it */
}
.event-works-grid .thumb-image-wrapper {
    display: block;
    margin-bottom: 8px;
}
/* A fixed height on the image itself (not 100% of the link), so the thumb's width
   can be worked out from the image before the text is laid out beneath it */
.event-works-grid .thumb-image-wrapper img {
    height: 250px;
    width: auto;
    max-width: none;
    display: block;
}
.event-works-grid .thumb-title {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 2px;
}
.event-works-grid .thumb-details,
.event-works-grid p.editLink a {
    font-size: 0.65rem;
    line-height: 1.2;
    color: #666;
}

@media screen and (max-width: 768px) {
    .event-works-grid .thumb-image-wrapper img { height: 200px; }
}
@media screen and (max-width: 500px) {
    .event-works-grid .thumb-image-wrapper img { height: 160px; }
}
