/* Events list + event details (+ the shared event card, Views/Events/_EventCard.cshtml) */
:root { --blue-500: #00017a; }

/* ---- heroes: 400px tall on desktop */
.hero-events, .hero-event { min-height: 400px; }
.hero-events { background-image: url('/res/img/hero-events.webp'); }
.hero-events .hero-photo { background-image: url('/res/img/hero-events-mobile.webp'); }
.hero-event { background-image: var(--hero-bg); }
.hero-events .kicker, .hero-event .kicker { margin-bottom: 10px; font-size: 18px; font-weight: 700; line-height: 1.5; text-transform: uppercase; color: #fff; }

/* ---- SORT BY: DATE | LOCATION */
.event-sort { max-width: 1400px; margin: auto; padding: var(--pad-global) 40px 50px; }
.event-sort.by-location { padding-bottom: 20px; }
.sort-box { display: flex; align-items: center; padding: 23px 20px 20px; border: 1px solid var(--beige-500); border-radius: var(--radius-md); background: var(--beige-50); }
.sort-label { padding-right: 15px; font-size: 20px; line-height: 1; text-transform: uppercase; }
.sort-options { display: flex; align-items: stretch; }
.sort-opt { padding: 6px 0 10px; border-top: 4px solid transparent; font-size: 20px; line-height: 1; text-transform: uppercase; color: var(--orange); text-decoration: none; transition: color .2s, border-color .2s; }
.sort-opt.active { font-weight: 700; border-top-color: var(--orange); }
.sort-sep { width: 1px; margin: 0 15px; background: var(--beige-border); }
.sort-opt:not(.active):hover, .sort-opt:not(.active):focus-visible { color: var(--orange-300); }

/* ---- list */
.events-list { max-width: 1400px; margin: auto; padding: 0 40px; }
.location-head { margin: 30px 0 20px; padding: 7px 20px 0; border-left: 5px solid var(--navy); font-size: 40px; }
.events-list > .location-head:first-child { margin-top: 10px; }

/* ---- event card: photo left (date/time over it), text right */
.event-card { margin-bottom: 40px; overflow: hidden; border: 1px solid var(--beige-border); border-radius: var(--radius-sm); background: var(--beige-50); box-shadow: 0 4px 4px rgba(0,0,0,.25); }
.event-chapter { padding: 10px 20px 7px; background: var(--navy); font-size: 14px; line-height: 1.5; text-transform: uppercase; color: #fff; }
.event-info { display: flex; align-items: stretch; }
.event-pic { position: relative; flex: 1 1 0; max-width: 500px; min-height: 400px; display: flex; align-items: flex-end; overflow: hidden; background: var(--neutral-darker); text-decoration: none; }
.event-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event-pic:hover img, .event-pic:focus-visible img { transform: scale(1.04); }
.event-when { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 30px 40px; white-space: nowrap; color: #fff;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 1.4%, rgba(0,0,0,.05) 17.3%, rgba(0,0,0,.6) 80.3%); }
.event-when .small, .event-when-bar .small { display: block; font-size: 20px; font-weight: 700; line-height: 1.5; }
.event-when .big, .event-when-bar .big { display: block; font: 400 48px/1 var(--font-display); text-transform: uppercase; }
.event-content { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0 40px 20px; }
.event-hood { padding-top: 15px; font-weight: 700; line-height: 1.5; text-transform: uppercase; color: var(--navy); }
.event-title { padding-bottom: 15px; font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.event-hood + .event-title { padding-top: 0; }
.event-title:first-child { padding-top: 15px; }
.event-excerpt { align-self: stretch; padding: 15px 0; border-top: 1px solid var(--beige-border); border-bottom: 1px solid var(--beige-border); font-size: 18px; font-weight: 300; line-height: 1.6; }
.excerpt-short { display: none; }
.read-more { margin-left: 4px; font-size: 14px; font-weight: 700; line-height: 1.5; text-transform: uppercase; white-space: nowrap; color: var(--orange); text-decoration: none; }
.read-more:hover, .read-more:focus-visible { color: var(--orange-300); }
.event-btn { padding: 20px 0; }

/* ---- no events */
.no-events { display: flex; flex-direction: column; align-items: center; padding: 0 250px var(--pad-global); text-align: center; }
.no-events img { width: 100%; max-width: 846px; aspect-ratio: 1376 / 800; object-fit: cover; margin: 10px; }
.no-events h2 { font-size: 48px; }

/* ---- event details */
.back-bar { display: flex; align-items: center; padding: 15px 40px; border-bottom: 1px solid var(--beige-border); background: var(--beige-50); }
.back-bar a { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; line-height: 1; text-transform: uppercase; color: var(--orange); text-decoration: none; transition: color .2s; }
.back-bar a:hover, .back-bar a:focus-visible { color: var(--orange-300); }
.event-photo img { width: 100%; height: auto; aspect-ratio: 1366 / 625; max-height: 100vh; object-fit: cover; }

.event-when-bar { display: flex; align-items: flex-start; padding: var(--pad-global) 40px 40px 60px; color: var(--navy); white-space: nowrap; }
.event-when-bar .when-date { padding-right: 30px; border-right: 1px solid var(--beige-border); }
.event-when-bar .when-time { padding: 0 30px; border-right: 1px solid var(--beige-border); }
.when-actions { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 30px 0 0 30px; }
.link-action { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: 700 14px/1.5 var(--font-body); text-transform: uppercase; color: var(--orange); cursor: pointer; transition: color .2s; }
.link-action:hover, .link-action:focus-visible { color: var(--orange-300); }
.share-btn { gap: 10px; padding-right: 10px; }

.event-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; padding: 0 40px; }
.event-actions .btn { height: 50px; padding: 0 20px; line-height: 1; }
.btn-navy { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.btn-navy:hover, .btn-navy:focus-visible { background: var(--navy); border-color: var(--navy); }

.event-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; align-items: start; padding: 20px 40px var(--pad-global); }
.event-logistics { display: flex; flex-direction: column; gap: 20px; padding: 20px 40px 20px 10px; border-right: 1px solid var(--beige-border); }
.event-price { padding-left: 30px; border-left: 12px solid var(--beige-border); font-size: 32px; font-weight: 700; line-height: 1.3; text-transform: uppercase; color: var(--navy); }
.event-map { height: 200px; overflow: hidden; border: 1px solid var(--beige-border); border-radius: var(--radius-md); }
.event-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.event-address { display: flex; flex-direction: column; gap: 10px; padding-left: 30px; }
.event-address p { font-size: 18px; line-height: 1.5; }
.view-map { display: inline-flex; align-items: flex-end; gap: 5px; font-size: 14px; font-weight: 700; line-height: 1.5; text-transform: uppercase; color: var(--orange); text-decoration: none; transition: color .2s; }
.view-map:hover, .view-map:focus-visible { color: var(--orange-300); }
.event-about { display: flex; flex-direction: column; gap: 7px; padding: 20px 40px; }
.event-desc { font-weight: 300; line-height: 1.5; }
.event-desc p, .event-desc ul, .event-desc ol { margin: 0 0 24px; }
.event-desc > :last-child { margin-bottom: 0; }
.event-desc img { height: auto; }

/* ---- share / add to calendar overlays */
body.ov-open { overflow: hidden; }
.ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4,1,24,.6); }
.ov[hidden] { display: none; }
.ov-box { position: relative; display: flex; flex-direction: column; gap: 20px; width: 410px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 40px; border: 1px solid var(--beige-50); border-radius: 15px;
    background: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(252,246,232,.5) 100%), #fff; box-shadow: 0 6px 6px 2px rgba(0,0,0,.25); }
.cal-box { width: 380px; padding: 30px 40px 40px; }
.ov-close { position: absolute; top: 12px; right: 12px; padding: 0; border: 0; background: none; color: var(--border); cursor: pointer; transition: color .2s; }
.ov-close:hover, .ov-close:focus-visible { color: var(--orange); }
.ov-title { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 40px; }
.ov-text { font-size: 20px; font-weight: 300; line-height: 1.5; color: #000; }
.share-icons { display: flex; justify-content: space-between; gap: 10px; }
.share-icons a { display: block; border-radius: 50%; transition: transform .2s; }
.share-icons a:hover, .share-icons a:focus-visible { transform: scale(1.1); }
.share-icons img { width: 50px; height: 50px; }
.copy-row { display: flex; align-items: center; gap: 10px; }
.copy-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 60px; padding: 8px 12px; border: 1px solid #ffd166; border-radius: var(--radius-sm);
    background: rgba(255,255,255,.3); box-shadow: inset 0 4px 4px rgba(0,0,0,.15); color: #b1a7f5; }
.copy-field svg { flex: none; }
.copy-field input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font: 400 16px/1.5 var(--font-body); color: #b1a7f5; text-overflow: ellipsis; outline: none; }
.copy-btn { min-width: 96px; }
.cal-list { display: flex; flex-direction: column; gap: 20px; }
.cal-list a { display: flex; align-items: center; gap: 20px; font-size: 18px; font-weight: 300; line-height: 1.6; color: #000; text-decoration: none; transition: color .2s; }
.cal-list a:hover, .cal-list a:focus-visible { color: var(--orange); }
.cal-list img { width: 30px; height: 30px; }

/* ---- tablet */
@media (max-width: 1200px) {
    .event-pic { flex: 0 0 40%; min-height: 360px; }
    .event-when { padding: 24px; }
    .event-when .big { font-size: 40px; }
    .event-content { padding: 0 30px 20px; }
    .event-excerpt { font-size: 16px; }
    .no-events { padding-left: 60px; padding-right: 60px; }
    .event-when-bar { padding-left: 40px; }
    .event-logistics { padding-right: 24px; }
    .event-about { padding: 20px 0 20px 24px; }
}
@media (max-width: 991px) {
    .event-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
    .event-price { font-size: 26px; padding-left: 20px; }
    .event-address { padding-left: 20px; }
    .event-actions .btn { padding: 0 10px; }
}

/* ---- phones (Figma mobile frames are 390 wide) */
@media (max-width: 768px) {
    .hero-events .kicker { margin-bottom: 0; color: var(--navy); text-align: center; }

    .event-sort, .event-sort.by-location { padding: 24px 20px; }
    .sort-box { padding: 16px 12px 12px; }
    .sort-label { padding-right: 0; line-height: 1.8; white-space: nowrap; }
    .sort-options { flex: 1; padding: 0 10px; }
    .sort-opt { padding-top: 4px; padding-bottom: 8px; line-height: 1.5; }
    .sort-sep { margin: 0 20px; }

    .events-list { padding: 0 20px 20px; }
    .location-head { margin: 10px 0 20px; font-size: 32px; }
    .event-card { margin-bottom: 20px; }
    .event-info { flex-direction: column; }
    .event-pic { flex: none; max-width: none; min-height: 0; flex-direction: column; align-items: stretch; }
    .event-pic img { position: static; height: 250px; }
    .event-pic:hover img, .event-pic:focus-visible img { transform: none; }
    .event-when { align-items: center; padding: 20px; background: var(--navy); }
    .event-when .big { font-size: 48px; }
    .event-content { padding: 0 20px 20px; }
    .event-excerpt { font-size: 18px; }
    .excerpt-long { display: none; }
    .excerpt-short { display: inline; }
    .event-btn { align-self: stretch; }
    .event-btn .btn { width: 100%; padding: 20px 24px; }

    .no-events { padding: 0 20px 40px; }
    .no-events h2 { font-size: 36px; }

    /* details: the chapter photo stays behind the header with the title over it */
    .hero.hero-event { display: flex; align-items: flex-end; min-height: 550px; padding: 0; color: #fff; background: var(--neutral-darker) var(--hero-bg) center / cover no-repeat !important; }
    .hero.hero-event::before { display: block; background: linear-gradient(to top, var(--neutral-darker) 0%, rgba(34,34,34,0) 50%, var(--neutral-darker) 100%); }
    .hero-event .hero-text { padding: 40px 20px; }
    .hero-event .kicker { margin-bottom: 8px; }
    .hero-event h1 { color: #fff; text-align: left; font-size: 48px; }

    .back-bar { padding: 14px 20px 12px; }
    .back-bar a { gap: 12px; }
    .event-photo { display: none; }

    .event-when-bar { flex-wrap: wrap; justify-content: space-between; padding: 20px 20px 0; }
    .event-when-bar .when-date, .event-when-bar .when-time { padding: 0; border: 0; }
    .event-when-bar .small { font-size: 18px; }
    .event-when-bar .big { font-size: 40px; }
    .when-actions { flex: 0 0 100%; margin-top: 10px; padding: 20px 0 0; border-top: 1px solid var(--beige-border); }
    .share-btn { gap: 5px; padding-right: 0; }

    .event-actions { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; padding: 25px 20px 0; }
    .event-actions .btn { height: auto; padding: 20px 24px; font-size: 18px; line-height: 1.5; }

    .event-body { grid-template-columns: 1fr; gap: 0; padding: 20px 20px 40px; }
    .event-logistics { gap: 12px; padding: 0; border-right: 0; }
    .event-price { padding: 0 30px; border-left-width: 10px; font-size: 32px; }
    .event-map { height: 180px; margin-top: 0; }
    .event-address { gap: 8px; margin-top: 4px; padding: 0 20px 15px; border-bottom: 1px solid var(--beige-border); }
    .view-map { align-items: center; gap: 8px; line-height: 1; }
    .event-about { padding: 20px 0 0; }
    .event-about h2 { display: none; }

    .ov-box { padding: 40px 24px 30px; }
    .cal-box { padding: 30px 24px; }
    .share-icons img { width: 44px; height: 44px; }
}
