:root {
    --mce-accent: #fd9f3d;
    --mce-dark: #17120e;
    --mce-dark-soft: #252722;
    --mce-paper: #fff7ec;
    --mce-cream: #f2e9d7;
    --mce-gold: #c99542;
    --mce-moss: #687343;
    --mce-text: #252521;
    --mce-event-title: #17120e;
    --mce-wagon-title: #17120e;
    --mce-page-gutter: 24px;
    --mce-frame-max: 1760px;
    --mce-wide: 1180px;
    --mce-radius: 20px;
    --mce-shadow: 0 18px 45px rgba(0,0,0,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mce-site { margin: 0; padding-inline: var(--mce-page-gutter); background: var(--mce-cream); color: var(--mce-text); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; line-height: 1.65; }
.mce-header,.mce-main,.mce-footer { width: 100%; max-width: var(--mce-frame-max); margin-left: auto; margin-right: auto; }
.mce-header { border-radius: 0 0 16px 16px; }
.mce-main { background: var(--mce-paper); box-shadow: 0 0 0 1px rgba(23,18,14,.06), 0 18px 60px rgba(23,18,14,.10); }
.mce-footer { border-radius: 16px 16px 0 0; }
a { color: var(--mce-accent); }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4 { font-family: Georgia,"Times New Roman",serif; line-height: 1.08; }

.mce-header { position: sticky; top: 0; z-index: 100; background: rgba(23,24,23,.96); color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); }
.mce-header-inner { max-width: var(--mce-wide); margin: 0 auto; min-height: 76px; padding: .7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.mce-brand { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.custom-logo { display: block; width: auto; max-height: 56px; }
.mce-site-title { color: #fff; text-decoration: none; font: 700 clamp(1.2rem,2.3vw,2rem)/1 Georgia,"Times New Roman",serif; white-space: nowrap; }
.mce-menu { list-style: none; display: flex; align-items: center; gap: 1.1rem; margin: 0; padding: 0; }
.mce-menu a { color: #fff; text-decoration: none; font-weight: 700; }
.mce-menu a:hover { color: var(--mce-gold); }
.mce-menu-toggle { display: none; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 8px; padding: .55rem .75rem; font-weight: 700; }

.mce-main { overflow: clip; }
.mce-section { padding: clamp(3.5rem,8vw,7rem) 1.25rem; }
.mce-section > .wp-block-group,
.mce-section > .wp-block-columns { max-width: var(--mce-wide); margin-left: auto; margin-right: auto; }
.mce-section-light { background: var(--mce-cream); }
.mce-section-paper { background: var(--mce-paper); }
.mce-section-dark { background: var(--mce-dark); color: #fff; }
.mce-section-dark-soft { background: var(--mce-dark-soft); color: #fff; }
.mce-section-dark h1,.mce-section-dark h2,.mce-section-dark h3,.mce-section-dark-soft h1,.mce-section-dark-soft h2,.mce-section-dark-soft h3 { color: #fff; }

.mce-hero-section { background: linear-gradient(135deg,#171817 0%,#2c2e28 100%); color: #fff; padding-top: clamp(4rem,9vw,8rem); padding-bottom: clamp(4rem,9vw,8rem); position: relative; }
.mce-hero-section::after { content: ""; position: absolute; inset: auto 0 0; height: 10px; background: linear-gradient(90deg,var(--mce-accent),var(--mce-gold),var(--mce-moss)); }
.mce-hero-columns { gap: clamp(2rem,5vw,5rem); }
.mce-display-heading { color: #fff; font-size: clamp(2.8rem,6vw,5.8rem); margin: .35rem 0 1.25rem; max-width: 760px; }
.mce-hero-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: var(--mce-shadow); border: 1px solid rgba(255,255,255,.2); }
.mce-kicker { color: var(--mce-gold); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .83rem; margin-bottom: .6rem; }

.wp-block-button__link,.mce-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: .82rem 1.35rem; background: var(--mce-accent); color: #fff !important; text-decoration: none; font-weight: 800; border: 2px solid var(--mce-accent); transition: transform .2s ease,background .2s ease; }
.wp-block-button__link:hover,.mce-button:hover { transform: translateY(-2px); filter: brightness(.90); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.75); }

.mce-current-wagon { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.35fr); gap: clamp(1.5rem,4vw,4rem); align-items: center; margin-top: 2rem; }
.mce-current-copy { background: rgba(255,255,255,.58); border-radius: var(--mce-radius); padding: clamp(1.4rem,3vw,2.7rem); border: 1px solid rgba(68,48,25,.12); }
.mce-current-copy h3 { font-size: clamp(2rem,4vw,4rem); margin: .4rem 0 1rem; }
.mce-current-image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--mce-radius); box-shadow: var(--mce-shadow); }

.mce-events-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; margin-top: 2rem; }
.mce-event-card { position: relative; display: grid; grid-template-columns: 92px 1fr; min-height: 210px; overflow: hidden; background: var(--mce-paper); color: var(--mce-text); border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.mce-card-link { position: absolute; inset: 0; z-index: 1; }
.mce-event-date { background: var(--mce-accent); color: #fff; padding: 1.2rem .7rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.mce-event-date strong { font: 700 2.5rem/1 Georgia,"Times New Roman",serif; }
.mce-event-date span { font-weight: 800; text-transform: uppercase; font-size: .78rem; margin-top: .5rem; }
.mce-event-body { padding: 1.25rem; position: relative; }
.mce-event-body h3 { margin: 0 0 .55rem; font-size: 1.45rem; color: var(--mce-event-title) !important; }
.mce-event-body a { position: relative; z-index: 2; }
.mce-meta,.mce-linked { font-size: .9rem; color: #5d5c55; }
.mce-linked { font-weight: 700; }

.mce-sponsor-group { margin-top: 2rem; }
.mce-sponsor-group h3 { color: var(--mce-accent); font-size: 1.55rem; }
.mce-sponsor-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1rem; }
.mce-sponsor-card { min-height: 120px; padding: 1rem; border-radius: 14px; background: #fff; border: 1px solid rgba(50,40,30,.12); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--mce-text); text-decoration: none; box-shadow: 0 9px 22px rgba(40,32,20,.07); }
.mce-sponsor-card img { max-height: 82px; width: auto; object-fit: contain; }

.mce-slider { position: relative; margin-top: 2rem; }
.mce-slider-controls { display: flex; justify-content: flex-end; gap: .65rem; margin-bottom: 1rem; }
.mce-slider-button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #fff; font-size: 1.35rem; cursor: pointer; }
.mce-slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px,33%); gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 1rem; }
.mce-wagon-card { scroll-snap-align: start; background: var(--mce-paper); color: var(--mce-text); border-radius: 18px; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.mce-wagon-card > a { display: block; color: inherit; text-decoration: none; height: 100%; }
.mce-wagon-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mce-wagon-content { padding: 1.25rem; }
.mce-wagon-content h3 { margin: .45rem 0 .65rem; font-size: 1.55rem; color: var(--mce-wagon-title) !important; }
.mce-current-copy h3 { color: var(--mce-wagon-title) !important; }
.mce-year,.mce-current-label { display: inline-block; border-radius: 999px; padding: .3rem .65rem; background: var(--mce-accent); color: #fff; font-size: .78rem; font-weight: 800; margin-right: .45rem; }
.mce-current-label { background: var(--mce-moss); }

.mce-empty,.mce-detail-box,.mce-related-events { border-radius: 16px; padding: 1.4rem; background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.28); margin-top: 1.5rem; }
.mce-section-light .mce-empty,.mce-section-paper .mce-empty,.mce-detail-box,.mce-related-events { background: #fff; border-color: rgba(50,40,30,.2); }

.mce-content-shell { max-width: 980px; margin: 0 auto; padding: clamp(3rem,8vw,7rem) 1.25rem; }
.mce-standard-entry > h1,.mce-archive-header h1 { font-size: clamp(2.4rem,5vw,4.8rem); }
.mce-single-image img { width: 100%; border-radius: var(--mce-radius); }
.mce-archive-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.mce-archive-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.09); }
.mce-archive-card a { color: inherit; text-decoration: none; }
.mce-archive-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.mce-archive-card div { padding: 1rem; }
body.post-type-archive-mc_event .mce-archive-card h2,
body.post-type-archive-mc_event .mce-archive-card h3 { color: var(--mce-event-title); }
body.post-type-archive-mc_wagon .mce-archive-card h2,
body.post-type-archive-mc_wagon .mce-archive-card h3 { color: var(--mce-wagon-title); }


.mce-footer { background: #101110; color: #fff; }
.mce-footer-inner { max-width: var(--mce-wide); margin: 0 auto; padding: 2.5rem 1.25rem; display: flex; justify-content: space-between; gap: 2rem; }
.mce-footer p { margin: .4rem 0 0; color: rgba(255,255,255,.72); }
.mce-footer a { color: #fff; text-decoration: none; margin-left: 1rem; }

@media (max-width: 900px) {
    .mce-events-grid,.mce-archive-grid { grid-template-columns: 1fr 1fr; }
    .mce-sponsor-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .mce-current-wagon { grid-template-columns: 1fr; }
    .mce-slider-track { grid-auto-columns: minmax(270px,70%); }
    .mce-menu-toggle { display: block; }
    .mce-navigation { display: none; position: absolute; left: 1rem; right: 1rem; top: calc(100% + .2rem); background: var(--mce-dark); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 1rem; }
    .mce-navigation.is-open { display: block; }
    .mce-menu { flex-direction: column; align-items: stretch; }
    .mce-menu a { display: block; padding: .45rem; }
}

@media (max-width: 620px) {
    body.mce-site { padding-inline: 0; }
    .mce-header,.mce-footer { border-radius: 0; }
    .mce-section { padding-left: 1rem; padding-right: 1rem; }
    .mce-events-grid,.mce-archive-grid { grid-template-columns: 1fr; }
    .mce-sponsor-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mce-event-card { grid-template-columns: 78px 1fr; }
    .mce-slider-track { grid-auto-columns: 88%; }
    .mce-footer-inner { flex-direction: column; }
    .mce-footer a { margin: 0 1rem 0 0; }
}


/* Wagon detail gallery / lightbox. */
body.single-mc_wagon .mce-standard-entry .wp-block-gallery,
body.single-mc_wagon .mce-standard-entry .gallery {
    margin-top: 2rem;
}
body.single-mc_wagon .mce-standard-entry .wp-block-gallery img,
body.single-mc_wagon .mce-standard-entry .wp-block-image img,
body.single-mc_wagon .mce-single-image img {
    border-radius: 14px;
}
.mce-lightbox-image {
    cursor: zoom-in;
    transition: transform .2s ease, filter .2s ease;
}
.mce-lightbox-image:hover,
.mce-lightbox-image:focus-visible {
    transform: translateY(-2px);
    filter: brightness(.93);
    outline: 3px solid color-mix(in srgb, var(--mce-gold) 70%, white);
    outline-offset: 3px;
}
body.mce-lightbox-open { overflow: hidden; }
.mce-lightbox[hidden] { display: none !important; }
.mce-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(48px,7vw) minmax(0,1fr) minmax(48px,7vw);
    grid-template-rows: auto 1fr;
    align-items: center;
    background: rgba(7,8,7,.94);
    color: #fff;
    padding: max(12px,2vw);
    backdrop-filter: blur(7px);
}
.mce-lightbox-toolbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 52px;
}
.mce-lightbox-count { font-weight: 800; min-width: 70px; text-align: center; }
.mce-lightbox-close,
.mce-lightbox-prev,
.mce-lightbox-next,
.mce-lightbox-play {
    border: 1px solid rgba(255,255,255,.38);
    background: rgba(255,255,255,.10);
    color: #fff;
    cursor: pointer;
}
.mce-lightbox-close {
    position: absolute;
    right: max(12px,2vw);
    top: max(12px,2vw);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}
.mce-lightbox-play {
    border-radius: 999px;
    padding: .65rem 1rem;
    font-weight: 800;
}
.mce-lightbox-prev,
.mce-lightbox-next {
    width: clamp(44px,5vw,64px);
    height: clamp(64px,9vw,92px);
    border-radius: 16px;
    font-size: clamp(2.5rem,6vw,5rem);
    line-height: .8;
}
.mce-lightbox-prev { grid-column: 1; grid-row: 2; }
.mce-lightbox-next { grid-column: 3; grid-row: 2; }
.mce-lightbox-figure {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    display: flex;
    min-width: 0;
    min-height: 0;
    height: calc(100vh - 110px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mce-lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 44px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.mce-lightbox-figure figcaption {
    max-width: 900px;
    padding: .75rem 1rem 0;
    color: rgba(255,255,255,.86);
    text-align: center;
}
@media (max-width: 620px) {
    .mce-lightbox {
        grid-template-columns: 48px minmax(0,1fr) 48px;
        padding: 8px;
    }
    .mce-lightbox-toolbar { justify-content: flex-start; padding-left: 4px; }
    .mce-lightbox-close { right: 8px; top: 8px; }
    .mce-lightbox-prev,.mce-lightbox-next { height: 58px; border-radius: 12px; }
    .mce-lightbox-figure { height: calc(100vh - 88px); }
}
