/* ============================================================
   Event detail page — public_html/assets/css/events.css
   (app/Views/events/detail.php). The /events/ list and search
   are styled in the theme: assets/scss/pdc-theme/_events.scss.
   ============================================================ */

/* ── Event detail page (detail.php) ─────────────────────────── */

/* Page layout. Desktop: heading and article on the left, poster and details
   on the right from the top of the heading. The heading row is sized by the
   heading alone (the right column spans into the flexible second row), so the
   article starts right under it however tall the details are. 
   Below 992px: heading, then details, then article. */
.event-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "aside" "main";
    gap: 0 3rem;
}
.event-detail__head  { grid-area: head; }
.event-detail__main  { grid-area: main; min-width: 0; }
.event-detail__aside { grid-area: aside; min-width: 0; margin-bottom: 2.5rem; }

/* Cancelled / already-taken-place notice at the top of the right column. */
.event-detail__alert {
    display: flex;
    align-items: baseline;
    margin-bottom: 1.25rem;
    padding: .75rem 1rem;
    font-size: var(--pdc-fs-small, 1rem);
    line-height: 1.4;
}

@media (min-width: 992px) {
    .event-detail__layout {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "head  aside"
            "main  aside";
    }
    .event-detail__aside { align-self: start; margin-bottom: 0; }
}

/* Heading block: type badge, title, date · time, place, playbill rule. */
.event-head { margin-bottom: 2rem; }
.event-head__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.event-head__title {
    margin: 0 0 .6rem;
    font-family: var(--pdc-font-head, Georgia, serif);
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, var(--pdc-fs-h1, 3rem));
    line-height: 1.12;
    color: var(--pdc-ink, #2B2622);
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.event-head__when {
    margin: 0;
    font-family: var(--pdc-font-head, Georgia, serif);
    font-style: italic;
    font-size: var(--pdc-fs-h4, 1.5rem);
    line-height: 1.35;
    color: var(--pdc-walnut, #5A3A22);
}
.event-head__sep { margin-left: .4rem; }
.event-head__time { white-space: nowrap; }
.event-head__where { margin: .4rem 0 0; font-size: var(--pdc-fs-ui, 1.125rem); color: var(--pdc-ink-soft, #5C5650); }
.event-head__where .fa { color: var(--pdc-bluestem, #35596A); }
.event-head::after {
    content: "";
    display: block;
    width: 100%;
    height: 7px;
    margin-top: 1.25rem;
    border-top: 3px solid var(--pdc-goldenrod, #E0A526);
    border-bottom: 1px solid var(--pdc-goldenrod, #E0A526);
}

.event-detail__facts dt {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    margin-top: .75rem;
}
.event-detail__facts dt:first-child { margin-top: 0; }
.event-detail__facts dd { margin-bottom: 0; overflow-wrap: anywhere; }

/* Google Maps links under the address: a clear "Get directions" button and a
   quieter "View map" link. Both open Google Maps in a new tab. */
.event-detail__facts .event-map {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.25rem;
    margin-top: .85rem;
}
.event-map__btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 30px;
    padding: .25rem .75rem;
    border-radius: var(--pdc-radius-control, 4px);
    background: var(--pdc-bluestem, #35596A);
    color: #fff;
    font-size: initial;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease;
}
.event-map__btn:hover,
.event-map__btn:focus-visible { background: var(--pdc-walnut, #5A3A22); color: #fff; }
.event-map__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    color: var(--pdc-bluestem, #35596A);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.event-map__link:hover { color: var(--pdc-walnut, #5A3A22); }
.event-map__btn:focus-visible,
.event-map__link:focus-visible { outline: 3px solid var(--pdc-focus, #35596A); outline-offset: 2px; }

.event-detail__logo { max-height: 22rem; object-fit: contain; height: auto; }

/* Poster from the media library, above the facts card. */
.event-detail__poster {
    position: relative;
    margin: 0;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    background: #f1ece4;
}
.event-detail__poster img { display: block; width: 100%; height: auto; max-height: 34rem; object-fit: contain; }
.event-detail__poster-lock {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: .85rem;
}

/* Staff-written article: keep embedded content inside the column. */
/* Body text at the theme's reading size, lines kept to a comfortable
   ~68 characters, and a blank line between paragraphs (the old template's
   reset sets every <p> margin to 0). */
.event-article {
    max-width: 68ch;
    font-size: var(--pdc-fs-body, 1.25rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.event-article p { margin: 0 0 1em; }
.event-article > :last-child { margin-bottom: 0; }
.event-article img,
.event-article iframe { max-width: 100%; height: auto; }
.event-article iframe { aspect-ratio: 16 / 9; width: 100%; border: 0; }
.event-article img { border-radius: .375rem; }
.event-article figure { margin: 1.5rem 0; }
.event-article figure img { display: block; margin-inline: auto; }
.event-article figcaption { margin-top: .4rem; font-size: .9rem; color: #5c636a; text-align: center; }
.event-article table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.event-article th,
.event-article td { border: 1px solid #dee2e6; padding: .4rem .6rem; }
.event-article blockquote {
    border-left: 4px solid #d78e22;
    padding-left: 1rem;
    color: #495057;
    font-style: italic;
}

.event-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: .5rem;
}
.event-gallery__link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: .375rem;
    background: #f1f3f5;
}
.event-gallery__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}
.event-gallery__link:hover img { transform: scale(1.04); }
.event-gallery__link:focus-visible { outline: 3px solid #d78e22; outline-offset: 2px; }
.event-gallery__lock {
    position: absolute;
    top: .3rem;
    right: .3rem;
    padding: .1rem .35rem;
    border-radius: .25rem;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .75rem;
}
@media (prefers-reduced-motion: reduce) {
    .event-gallery__link img { transition: none; }
}

/* Restore article typography the theme resets (lists, heading sizes). */
.event-article ul,
.event-article ol   { padding-left: 1.5rem; margin-bottom: 1rem; }
.event-article ul   { list-style: disc; }
.event-article ol   { list-style: decimal; }
.event-article li   { display: list-item; margin-bottom: .25rem; }
/* Headings scaled to the 20px article text, with more room above than below
   so each heading reads as the start of the next part. */
.event-article h2   { font-size: var(--pdc-fs-h3, 1.95rem); margin: 1.6em 0 .5em; }
.event-article h3   { font-size: var(--pdc-fs-h4, 1.5625rem); margin: 1.5em 0 .45em; }
.event-article h4   { font-size: 1.3rem; margin: 1.4em 0 .4em; }
.event-article > :first-child { margin-top: 0; }
.event-article a    { text-decoration: underline; }

/* Album write-up under its thumbnails on the event page. */
.event-gallery__article { margin-top: 1rem; font-size: 1rem; }
/* Keep its headings below the album title (h3) in size. */
.event-gallery__article h2 { font-size: 1.15rem; margin-top: 1rem; }
.event-gallery__article h3 { font-size: 1.05rem; margin-top: 1rem; }
.event-gallery__article h4 { font-size: 1rem;    margin-top: .75rem; }
.event-gallery__article > :first-child { margin-top: 0; }
@media (max-width: 991.98px) {
    .event-detail__poster { max-width: 26rem; margin-inline: auto; }
    .event-detail__poster img { max-height: 24rem; }
}
