/* Events page (page-specific; shared styles live in shared.css) */

[hidden] { display: none !important; }
.featured-event .btn-outline, .events-cta .btn-outline, .events-empty .btn-outline { background: transparent; color: var(--navy-blue); border: 2px solid var(--navy-blue); }
.featured-event .btn-outline:hover, .events-cta .btn-outline:hover, .events-empty .btn-outline:hover { background: var(--navy-blue); color: var(--white); transform: translateY(-3px); }

/* Date badge */
.date-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 84px; height: 92px; flex-shrink: 0;
    background: var(--navy-blue); color: var(--white);
    border-radius: 12px; border-top: 4px solid var(--gold);
    box-shadow: 0 6px 18px rgba(48, 59, 106, 0.22);
}
.db-month { font-size: 0.875rem; letter-spacing: 3px; text-transform: uppercase; color: #c9ac66; line-height: 1; margin-top: 4px; }
.db-day { font-family: var(--font-heading); font-size: 2.2rem; line-height: 1.1; margin-top: 4px; }
.date-badge-lg { position: absolute; top: 16px; left: 16px; width: 80px; height: 88px; }
.date-badge-lg .db-day { font-size: 2.1rem; }

/* Shared meta list */
.event-meta { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.event-meta li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-gray); font-size: 1rem; line-height: 1.5; }
.event-meta svg { flex-shrink: 0; margin-top: 4px; color: var(--gold-text); }

.event-kicker, .event-tag {
    font-size: 0.875rem; text-transform: uppercase; letter-spacing: 3px; color: var(--gold-text); margin: 0 0 10px;
}
.event-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.featured-body .event-meta { margin-bottom: 12px; gap: 6px; }
.featured-body .event-actions { margin-top: 16px; }
.featured-body .cal-links { margin-top: 8px; }
.featured-body .event-kicker { margin-bottom: 6px; }
.event-actions.center { justify-content: center; }

/* Featured event */
.featured-section { background: var(--lightest-gray); padding: 44px 0; }
.featured-event {
    display: grid; grid-template-columns: 1fr 1.2fr; background: var(--white);
    border-radius: 18px; overflow: hidden; box-shadow: 0 14px 40px rgba(48, 59, 106, 0.16);
}
.featured-image { position: relative; min-height: 300px; background: var(--navy-blue); }
.featured-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 30px 36px; display: flex; flex-direction: column; justify-content: center; }
.featured-title { font-family: var(--font-heading); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 400; color: var(--navy-blue); margin: 0 0 12px; line-height: 1.2; }
.featured-text { color: var(--text-gray); line-height: 1.7; margin: 0; }

/* Month groups and event cards */
.events-section { padding-top: 90px; }
.month-heading {
    font-family: var(--font-heading); font-weight: 400; font-size: 1.6rem; color: var(--navy-blue);
    margin: 56px 0 22px; padding-bottom: 12px; border-bottom: 2px solid var(--gold); display: inline-block; min-width: 240px;
}
.month-heading:first-of-type { margin-top: 0; }
.event-list { display: flex; flex-direction: column; gap: 22px; }
.event-card {
    display: grid; grid-template-columns: 84px 1fr 240px; gap: 28px; align-items: center;
    background: var(--lightest-gray); border: 1px solid var(--light-gray); border-radius: 16px; padding: 24px 24px 24px 28px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.event-card:hover { box-shadow: 0 14px 36px rgba(48, 59, 106, 0.14); transform: translateY(-3px); }
.event-card .date-badge { align-self: start; }
.event-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 400; color: var(--navy-blue); margin: 0 0 12px; line-height: 1.3; }
.event-card .event-meta { margin-bottom: 14px; }
.event-desc { color: var(--text-gray); line-height: 1.8; margin: 0 0 14px; font-size: 1rem; }
.event-link { display: inline-block; padding: 10px 0; color: var(--gold-text); font-weight: 600; border-bottom: 2px solid transparent; transition: border-color 0.2s ease; }
.event-link:hover { border-bottom-color: var(--gold); }
.event-card-image { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--light-gray); }
.event-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Bottom call to action */
.events-cta {
    text-align: center; margin-top: 80px; padding: 56px 30px 0; border-top: 1px solid var(--light-gray);
}
.events-cta h2 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 400; color: var(--navy-blue); margin: 0 0 12px; }
.events-cta p { max-width: 640px; margin: 0 auto; color: var(--text-gray); line-height: 1.8; }

/* Multi-day badge (e.g. 19-21) */
.date-badge-range .db-day { font-size: 1.5rem; margin-top: 8px; white-space: nowrap; }
.date-badge-range { width: 96px; }
.date-badge-lg.date-badge-range { width: 96px; }
.date-badge-lg.date-badge-range .db-day { font-size: 1.5rem; }

/* Events with no photo */
.event-card-placeholder, .featured-placeholder {
    display: flex; align-items: center; justify-content: center; color: #c9ac66;
    background: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(135deg, var(--navy-blue) 0%, #1e2547 100%);
    background-size: 24px 24px, 100% 100%;
}
.featured-placeholder { position: absolute; inset: 0; }

.event-links { display: flex; flex-wrap: wrap; gap: 0 26px; }

/* Add to calendar */
.cal-links { margin-top: 14px; font-size: 1rem; color: var(--text-gray); }
.cal-links a, .cal-ics {
    font: inherit; color: var(--navy-blue); background: none; border: 0; padding: 10px 2px; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; display: inline-block;
}
.cal-links a:hover, .cal-ics:hover { color: var(--gold-text); }

/* Empty / loading / error states */
.events-loading, .events-more-soon { text-align: center; color: var(--text-gray); padding: 30px 0; line-height: 1.8; }
.events-empty { text-align: center; max-width: 640px; margin: 0 auto; padding: 50px 30px; background: var(--lightest-gray); border: 1px solid var(--light-gray); border-radius: 16px; }
.events-empty-icon { color: var(--gold-text); margin-bottom: 8px; }
.events-empty h3 { font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem; color: var(--navy-blue); margin: 0 0 12px; }
.events-empty p { color: var(--text-gray); line-height: 1.8; margin: 0; }

/* Home page: Upcoming Events (one highlighted event, same card as the Events page) */
.section.home-events { background: var(--lightest-gray); padding: 36px 0 90px; }
.home-events .section-header { margin-bottom: 44px; }
.home-events-more { text-align: center; margin-top: 40px; }
.home-events .featured-image { min-height: 280px; }

@media (max-width: 1023px) {
    .featured-event { grid-template-columns: 1fr; }
    .featured-image { min-height: 320px; }
    .featured-body { padding: 36px 32px 40px; }
    .event-card { grid-template-columns: 76px 1fr 180px; gap: 22px; }
}
@media (max-width: 768px) {
    .section.home-events { padding: 30px 0 60px; }
    .home-events .section-header { margin-bottom: 30px; }
    .home-events .featured-image { min-height: 240px; }
    .home-events-more { margin-top: 28px; }
    .featured-section { padding: 40px 0; }
    .featured-image { min-height: 240px; }
    .date-badge-lg { top: 16px; left: 16px; width: 82px; height: 92px; }
    .date-badge-lg .db-day { font-size: 2.2rem; }
    .featured-body { padding: 28px 22px 32px; }
    .events-section { padding-top: 60px; }
    .event-card { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
    .event-card .date-badge { grid-row: 1; width: 72px; height: 80px; }
    .event-card-image { grid-row: 2; aspect-ratio: 16 / 9; }
    .event-card-body { grid-row: 3; }
    .event-actions .btn { width: 100%; }
    .events-cta { margin-top: 56px; padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .event-card, .btn-outline { transition: none; }
    .event-card:hover { transform: none; }
}

/* Keep event buttons at 16px even on very small phones (the site shrinks .btn to 13.6px at 320) */
.home-events .btn, .featured-event .btn, .events-cta .btn, .events-empty .btn { font-size: 1rem; }

/* Phones: label sits on its own line (smaller) so Google and Outlook or Apple share one line */
@media (max-width: 480px) {
    .cal-label { display: block; font-size: 0.875rem; margin-bottom: 2px; }
}

/* 700-768px (iPad portrait): keep badge + text on the left and a smaller photo on the right, so each card is not a full screen tall */
@media (min-width: 700px) and (max-width: 768px) {
    .event-card { grid-template-columns: 76px 1fr 190px; gap: 20px; padding: 22px; align-items: start; }
    .event-card .date-badge { grid-row: auto; width: 76px; height: 84px; }
    .event-card-image { grid-row: auto; aspect-ratio: 4 / 3; }
    .event-card-body { grid-row: auto; }
}

/* 1024-1199px (iPad landscape / small laptop): give the featured text more room so the card is not taller than the screen */
@media (min-width: 1024px) and (max-width: 1199px) {
    .featured-event { grid-template-columns: 1fr 1fr; }
    .featured-body { padding: 26px 28px; }
}

/* Flyers / posters (image_fit: contain): show the whole picture, never crop the words */
.featured-event.has-poster { grid-template-columns: 1.15fr 1fr; }
.has-poster .featured-image { min-height: 0; background: #0d1f55; }
.has-poster .featured-image img { object-fit: contain; }
.event-card-image.is-poster { background: #0d1f55; }
.event-card-image.is-poster img { object-fit: contain; }
@media (max-width: 1023px) {
    .has-poster { grid-template-columns: 1fr; }
    .has-poster .featured-image { aspect-ratio: 16 / 9; }
}

/* Two-line big title: second line smaller, italic, underneath */
.featured-title .ft-sub { display: block; margin-top: 6px; font-size: 0.62em; font-style: italic; color: var(--gold-text); line-height: 1.25; }

/* Short bullet list (e.g. weather plans) */
.event-details { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.event-details li { position: relative; padding-left: 22px; color: var(--text-gray); font-size: 1rem; line-height: 1.6; }
.event-details li::before { content: ''; position: absolute; left: 4px; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* Description written in the admin (rich text) */
.rich p { margin: 0 0 12px; }
.rich > :last-child { margin-bottom: 0; }
.rich strong { font-weight: 700; }
.rich em { font-style: italic; }
.rich a { color: var(--navy-blue); text-decoration: underline; text-underline-offset: 3px; }
.rich a:hover { color: var(--gold-text); }
.rich ul, .rich ol { margin: 14px 0 0; padding: 0; }
.rich ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rich ul li { position: relative; padding-left: 22px; line-height: 1.6; }
.rich ul li::before { content: ''; position: absolute; left: 4px; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.rich ol { padding-left: 24px; }
.rich ol li { line-height: 1.6; margin-bottom: 6px; }
.rich p + ul, .rich p + ol { margin-top: 14px; }
.featured-text.rich, .event-desc.rich { font-size: 1rem; line-height: 1.8; color: var(--text-gray); }

/* Big card: long description shows 4 lines, then a "More details" button opens the rest */
.fe-clamp { max-height: 6.9em; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.fe-clamp.fe-open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.fe-more { align-self: flex-start; background: none; border: 0; border-bottom: 2px solid var(--gold); padding: 8px 0 4px; margin-top: 6px; font: inherit; font-weight: 600; color: var(--gold-text); cursor: pointer; }
.fe-more:hover { color: var(--navy-blue); }
.fe-more:focus-visible { outline: 3px solid var(--navy-blue); outline-offset: 3px; }

/* Featured event whose date has passed */
.event-past-tag { display: inline-block; margin-left: 10px; padding: 2px 10px; border: 1px solid var(--light-gray); border-radius: 999px; font-size: 0.8125rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--text-gray); background: var(--lightest-gray); vertical-align: 1px; }

/* Wide artwork with words on it (image_fit: wide): whole picture on top at every screen size, details underneath */
.featured-event.is-wide { grid-template-columns: 1fr; max-width: 760px; margin-left: auto; margin-right: auto; }
.featured-event.is-wide .featured-image, .home-events .is-wide .featured-image { min-height: 0; aspect-ratio: 16 / 9; background: #0d1f55; }
.featured-event.is-wide .featured-body { text-align: left; }
@media (min-width: 1024px) { .featured-event.is-wide .featured-body { padding: 36px 56px 42px; } }

@media (max-width: 400px) { .featured-event .event-actions .btn { padding-left: 10px; padding-right: 10px; } }

/* Wide card design: centred heading, date/time/place strip, boxed weather plan, clear sign-up button */
.featured-event.is-wide { border-top: 0; box-shadow: 0 22px 60px rgba(48, 59, 106, 0.18); }
.is-wide .featured-image { border-bottom: 4px solid var(--gold); }
.featured-event.is-wide .featured-body { align-items: center; text-align: center; padding: 34px 56px 36px; }
.is-wide .featured-body > * { max-width: 100%; }
.is-wide .event-kicker { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.is-wide .event-kicker::before, .is-wide .event-kicker::after { content: ''; width: 34px; height: 1px; background: var(--gold); }
.is-wide .featured-title { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0; }
.is-wide .featured-title .ft-sub { font-size: max(1rem, 0.55em); margin-top: 4px; }
.is-wide .featured-body .event-meta { align-self: stretch; display: grid; grid-template-columns: 1.15fr 0.7fr 1.35fr; margin: 24px 0; padding: 18px 0; gap: 0; border-top: 1px solid var(--light-gray); border-bottom: 1px solid var(--light-gray); }
.is-wide .event-meta li { flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 0 14px; color: var(--navy-blue); font-weight: 600; text-wrap: balance; }
.is-wide .event-meta li + li { border-left: 1px solid var(--light-gray); }
.is-wide .event-meta svg { width: 24px; height: 24px; margin: 0; }
.is-wide .featured-text { align-self: stretch; font-size: 1.0625rem; line-height: 1.8; }
.is-wide .featured-text p { max-width: 600px; margin-left: auto; margin-right: auto; text-wrap: pretty; }
.is-wide .fe-clamp { max-height: none; -webkit-mask-image: none; mask-image: none; }
.is-wide .rich ul, .is-wide .event-details { align-self: stretch; margin: 20px 0 0; padding: 18px 22px; gap: 10px; text-align: left; background: var(--lightest-gray); border: 1px solid var(--light-gray); border-radius: 12px; }
.is-wide .rich ul li, .is-wide .event-details li { font-size: 1rem; }
.is-wide .rich ul li::before, .is-wide .event-details li::before { left: 4px; }
.is-wide .featured-body .event-actions { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.is-wide .event-actions .btn { width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; }
.is-wide .event-actions .btn-primary { grid-column: 1 / -1; font-size: 1.125rem; font-weight: 700; min-height: 62px; }
.is-wide .event-actions .btn:only-child { grid-column: 1 / -1; }
.is-wide .featured-body .cal-links { margin-top: 20px; }
@media (max-width: 640px) {
    .featured-event.is-wide .featured-body { padding: 26px 18px 28px; }
    .is-wide .event-kicker::before, .is-wide .event-kicker::after { width: 18px; }
    .is-wide .featured-body .event-meta { grid-template-columns: 1fr; margin: 20px 0; padding: 6px 0; }
    .is-wide .event-meta li { flex-direction: row; justify-content: flex-start; align-items: flex-start; text-align: left; gap: 12px; padding: 10px 4px; text-wrap: pretty; }
    .is-wide .event-meta li + li { border-left: 0; border-top: 1px solid var(--light-gray); }
    .is-wide .event-meta svg { width: 20px; height: 20px; margin-top: 2px; }
    .is-wide .rich ul, .is-wide .event-details { padding: 14px 14px; }
    .is-wide .featured-body .event-actions { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .is-wide .featured-text p { text-align: left; } }
.is-wide .event-actions .btn:last-child:nth-child(even) { grid-column: 1 / -1; }
.is-wide p.featured-text { align-self: center; max-width: 600px; text-wrap: balance; }
@media (max-width: 480px) { .is-wide p.featured-text { text-align: left; text-wrap: pretty; } }

/* Compact wide card (home and Events pages): picture beside the details on larger screens */
.is-wide.is-compact .featured-body .cal-links { display: none; }
.home-details { margin: 16px 0 0; font-size: 1rem; }
.home-details a { color: var(--navy-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.home-details a:hover { color: var(--gold-text); }
.featured-event.is-wide.is-compact .featured-body .event-meta { grid-template-columns: 1fr; margin: 16px 0 0; padding: 12px 0; gap: 8px; }
.is-wide.is-compact .event-meta li { flex-direction: row; justify-content: center; align-items: flex-start; gap: 10px; padding: 0; border: 0; }
.is-wide.is-compact .event-meta svg { width: 20px; height: 20px; margin-top: 2px; }
.featured-event.is-wide.is-compact .featured-body .event-actions { margin-top: 6px; gap: 10px; }
.is-wide.is-compact .event-actions .btn, .is-wide.is-compact .event-actions .btn-primary { min-height: 50px; padding-top: 10px; padding-bottom: 10px; }
@media (min-width: 1024px) {
    .featured-event.is-wide.is-compact { grid-template-columns: 1.45fr 1fr; max-width: 1140px; }
    .featured-event.is-wide.is-compact .featured-image { aspect-ratio: auto; min-height: 360px; border-bottom: 0; border-right: 4px solid var(--gold); }
    .is-wide.is-compact .featured-image img { object-position: right center; }   /* only the left edge is ever trimmed, never the words */
    .featured-event.is-wide.is-compact .featured-body { padding: 24px 24px 22px; }
    .is-wide.is-compact .featured-title { font-size: 2rem; }
}
.featured-event.is-wide.is-compact .featured-body .event-meta { justify-items: start; }
.is-wide.is-compact .event-meta li { justify-content: flex-start; text-align: left; }
@media (min-width: 641px) { .featured-event.is-wide.is-compact .featured-body .event-meta { padding-left: 14px; } }
.home-details a { display: inline-block; padding: 8px 4px; }
.home-details { margin-top: 10px; }
/* iPad landscape / small laptop: wider picture column so the lettering is never trimmed */
@media (min-width: 1024px) and (max-width: 1199px) {
    .featured-event.is-wide.is-compact { grid-template-columns: 1.75fr 1fr; }
    .featured-event.is-wide.is-compact .featured-body { padding: 18px 16px 16px; }
    .featured-event.is-wide.is-compact .featured-body .event-meta { padding-left: 2px; }
    .is-wide.is-compact .featured-title { font-size: 1.75rem; }
    .is-wide.is-compact .event-kicker::before, .is-wide.is-compact .event-kicker::after { width: 16px; }
    .is-wide.is-compact .event-actions .btn { padding-left: 8px; padding-right: 8px; }
}

/* Events page: the show/hide details under the compact card */
.fe-toggle { background: none; border: 0; padding: 8px 4px; font: inherit; font-weight: 600; color: var(--navy-blue); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.fe-toggle:hover { color: var(--gold-text); }
.fe-toggle:focus-visible { outline: 3px solid var(--navy-blue); outline-offset: 2px; }
.fe-toggle .fe-arrow { display: inline-block; transition: transform 0.2s; }
.fe-toggle[aria-expanded="true"] .fe-arrow { transform: rotate(180deg); }
.featured-more { grid-column: 1 / -1; border-top: 1px solid var(--light-gray); padding: 26px 40px 30px; text-align: center; }
.featured-more .rich ul { max-width: 700px; margin-left: auto; margin-right: auto; }
.featured-more .cal-links { margin-top: 20px; }
.featured-contact { margin: 14px 0 0; }
.featured-contact a { display: inline-block; padding: 6px 4px; color: var(--navy-blue); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .featured-more { padding: 20px 18px 24px; } }
@media (prefers-reduced-motion: reduce) { .fe-toggle .fe-arrow { transition: none; } }

/* "Featured Event" heading above the box (Events page) */
.featured-label { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 20px; font-size: 1rem; }
.featured-label::before, .featured-label::after { content: ''; width: 48px; height: 1px; background: var(--gold); }
@media (max-width: 360px) { .featured-label { gap: 8px; white-space: nowrap; letter-spacing: 2px; } .featured-label::before, .featured-label::after { width: 20px; flex: none; } }

/* Only the featured event: hide the empty list and its heading, keep the closing buttons */
.only-featured .section-header, .only-featured #events-list { display: none; }
.only-featured .events-cta { margin-top: 0; padding-top: 0; border-top: 0; }
.no-events .events-cta { display: none; }

/* List card with wide artwork (words on the picture): same small picture spot as every card, shown whole (16:9) */
.event-card.has-wide-pic .event-card-image { aspect-ratio: 16 / 9; height: auto; min-height: 0; background: #0d1f55; }
.event-card.has-wide-pic .event-card-image img { width: 100%; height: 100%; object-fit: contain; }

/* Regular event cards: picture at the top right, on every card */
@media (min-width: 700px) and (max-width: 1023px) { .event-card { grid-template-columns: 76px 1fr 240px; align-items: start; } .event-card .event-card-image { align-self: start; } }
@media (min-width: 1024px) { .event-card { grid-template-columns: 76px 1fr 300px; align-items: start; } .event-card .event-card-image { align-self: start; } }
@media (min-width: 1200px) { .event-card { grid-template-columns: 76px 1fr 360px; } }

/* iPad portrait: the text column is narrow beside the picture, so the calendar label gets its own line */
@media (min-width: 700px) and (max-width: 899px) { .event-card .cal-label { display: block; margin-bottom: 2px; } }
