/* Ministry of Board Games: Events page. Uses the shared tokens from mobg-ds.css. */
.bgme-hub { color: var(--mobg-c-ink, #141B33); font-family: var(--mobg-f-body, Inter, system-ui, sans-serif); }
.bgme-hub .bgme-wrap { width: min(100% - 2.5rem, 1320px); margin-inline: auto; }

/* Hero: same look as the Library */
.bgme-hero { background: var(--mobg-c-parchment, #F7F3EA); border-bottom: 1px solid var(--mobg-c-line, #D8D3C4); padding: 1.25rem 0 2.25rem; }
.bgme-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--mobg-c-muted); margin: 0 0 1.5rem; }
.bgme-crumbs a { color: var(--mobg-c-navy); text-decoration: none; }
.bgme-crumbs a:hover { text-decoration: underline; }
.bgme-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 3rem; align-items: center; }
.bgme-hero__title { font-family: var(--mobg-f-head); font-weight: 400; font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.25rem); line-height: 1.08; color: var(--mobg-c-navy); margin: 0 0 .6rem; overflow-wrap: break-word; }
/* "Department" sits in front of the H1 in the same large lettering; only "Board Game Events in Livingston" is the H1. */
.bgme-hub .bgme-hero__heading { margin: 0 0 1rem; font-family: var(--mobg-f-head, 'Tagesschrift', serif) !important; font-weight: 400; font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.25rem); line-height: 1.08; color: var(--mobg-c-navy); overflow-wrap: break-word; }
.bgme-hub .bgme-hero__heading > .bgme-hero__dept, .bgme-hub .bgme-hero__heading > h1 { display: inline; margin: 0; padding: 0; font: inherit !important; color: inherit; letter-spacing: inherit; text-transform: none; }
.bgme-hero__lead { font-size: 1.125rem; line-height: 1.6; max-width: 38rem; margin: 0 0 1.5rem; color: var(--mobg-c-ink); }
.bgme-hero__logo { display: flex; justify-content: flex-end; }
.bgme-hero__logo img { width: 100%; max-width: 640px; height: auto; background: transparent; }
@media (max-width: 800px) { .bgme-hero__grid { grid-template-columns: minmax(0, 1fr); } .bgme-hero__logo { justify-content: flex-start; } .bgme-hero__logo img { max-width: 420px; } }

/* Listing */
.bgme-listing { padding: 2rem 0 2.5rem; background: var(--mobg-c-paper, #FFFDF8); scroll-margin-top: 1rem; }

/* Filter bar */
.bgme-fbar { margin-bottom: 1.25rem; }
@media (min-width: 801px) {
	.bgme-fbar { position: sticky; top: var(--mobg-sticky-top, 0px); z-index: 40; margin-inline: -1rem; padding: .75rem 1rem; background: var(--mobg-c-paper, #FFFDF8); border-bottom: 1px solid var(--mobg-c-line, #D8D3C4); }
}
@media (min-width: 1180px) {
	.bgme-fbar { display: flex; align-items: flex-end; gap: 1rem; }
	.bgme-fbar__main { flex: 3 1 0; }
	.bgme-fbar__row { flex: 2 1 0; margin-top: 0; flex-wrap: nowrap; }
	.bgme-search { flex: 1 1 0; }
	.bgme-fbar__tools { gap: .75rem; }
}
.bgme-fbar__main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.bgme-fbar__row { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; margin-top: .85rem; }
.bgme-fbar__tools { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.bgme-fbar__clear { font-weight: 700; color: var(--mobg-c-navy); text-decoration: underline; text-underline-offset: 3px; }
.bgme-search { display: flex; gap: .5rem; flex: 1 1 320px; max-width: 520px; }
.bgme-search input[type="search"] { flex: 1; min-width: 0; min-height: 46px; padding: .5rem .9rem; font: inherit; font-size: 1rem; color: var(--mobg-c-navy); background: #fff; border: 2px solid var(--mobg-c-navy); border-radius: 0; }
.bgme-search input[type="search"]:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }

.bgme-dd { position: relative; min-width: 0; }
.bgme-dd details { position: relative; }
.bgme-dd summary { list-style: none; display: flex; flex-direction: column; gap: .2rem; padding: .55rem 2.6rem .6rem 1rem; min-height: 62px; background: #fff; border: 2px solid var(--mobg-c-navy); box-shadow: 3px 3px 0 var(--mobg-c-navy-100, #E6E9F2); cursor: pointer; position: relative; transition: box-shadow .15s ease, transform .15s ease; }
.bgme-dd summary::-webkit-details-marker { display: none; }
.bgme-dd summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--mobg-c-navy); border-bottom: 2px solid var(--mobg-c-navy); transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.bgme-dd details[open] summary::after { transform: translateY(-20%) rotate(225deg); }
.bgme-dd summary:hover { box-shadow: 5px 5px 0 var(--mobg-c-navy); transform: translate(-2px, -2px); }
.bgme-dd summary:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
.bgme-dd.has-value summary { background: var(--mobg-c-thistle-50, #F2ECF9); }
.bgme-dd__label { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mobg-c-muted); }
.bgme-dd__face { font-size: 1rem; font-weight: 700; color: var(--mobg-c-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgme-dd__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem; list-style: none; max-height: 320px; overflow-y: auto; background: #fff; border: 2px solid var(--mobg-c-navy); box-shadow: 6px 6px 0 var(--mobg-c-navy); }
.bgme-dd__opt { display: block; padding: .6rem .8rem; color: var(--mobg-c-ink); font-weight: 600; text-decoration: none; }
.bgme-dd__opt:hover, .bgme-dd__opt:focus-visible { background: var(--mobg-c-thistle-50, #F2ECF9); color: var(--mobg-c-navy); outline: none; }
.bgme-dd__opt.is-active { background: var(--mobg-c-navy); color: #fff; }

.bgme-count { margin: 0; font-weight: 700; white-space: nowrap; }
.bgme-view { display: flex; gap: .35rem; }
.bgme-view__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--mobg-c-navy); background: #fff; color: var(--mobg-c-navy); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.bgme-view__btn:hover { background: var(--mobg-c-navy-100, #E6E9F2); }
.bgme-view__btn[aria-pressed="true"] { background: var(--mobg-c-navy); color: #fff; }
.bgme-view__btn:focus-visible { outline: 3px solid var(--mobg-c-cone); outline-offset: 2px; }
@media (max-width: 800px) { .bgme-fbar__main { grid-template-columns: minmax(0, 1fr); } .bgme-view { display: none; } .bgme-fbar__tools { margin-left: 0; width: 100%; } .bgme-search { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .bgme-dd summary, .bgme-dd summary::after { transition: none; } }

/* Results grid: 2, 3 or 4 per row */
.bgme-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bgme-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bgme-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bgme-grid .bgme-event-card { height: 100%; }
@media (max-width: 1100px) { .bgme-grid, .bgme-grid[data-cols] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .bgme-grid, .bgme-grid[data-cols] { grid-template-columns: minmax(0, 1fr); } }
.bgme-results.is-loading { opacity: .5; transition: opacity .15s ease; pointer-events: none; }
.bgme-hub .bgme-pagination { margin-top: 1.75rem; }
.bgme-empty-title { margin: .6rem 0; font-family: var(--mobg-f-head); font-weight: 400; font-size: 1.75rem; color: var(--mobg-c-navy); }

/* Tighter rhythm between the blocks below the list */
.bgme-hub .mobg-hub-section { padding-block: clamp(1.25rem, 2.5vw, 2rem); }
.bgme-hub .mobg-hub-head { margin-bottom: 1rem; }

/* Event cards: tags on one row with an icon, linked venue, actions */
.bgme .bgme-event-card__tags { display: flex; flex-wrap: nowrap; align-items: center; gap: .4rem; max-width: 100%; }
.bgme .bgme-event-card__tags .bgme-tag { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; flex: 0 1 auto; }
.bgme .bgme-event-card__tags .bgme-tag::before { content: none; }
.bgme .bgme-event-card__tags .bgme-icon { width: 14px; height: 14px; flex: none; }
.bgme .bgme-event-card__body .bgme-event-card__venue { margin: 0 0 .5rem; }
.bgme .bgme-event-card__venue a, .bgme .bgme-event-card__venue-text { display: inline-flex; align-items: flex-start; gap: .4rem; color: var(--mobg-c-navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bgme .bgme-event-card__venue-text { text-decoration: none; }
.bgme .bgme-event-card__venue a:hover { color: var(--mobg-c-cone, #B5410B); }
.bgme .bgme-event-card__venue .bgme-icon { width: 18px; height: 18px; flex: none; margin-top: .1rem; }
.bgme .bgme-event-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin-top: auto; padding-top: .75rem; width: 100%; }
.bgme .bgme-event-card__actions .mobg-btn { min-height: 42px; padding: .5rem .9rem; font-size: .85rem; display: inline-flex; align-items: center; gap: .4rem; }
.bgme .bgme-event-card__actions .mobg-btn .bgme-icon { width: 16px; height: 16px; }
.bgme .bgme-event-card__actions .bgme-textlink { flex-basis: 100%; }

/* Our Philosophy (own copy so it never depends on the theme's stylesheet handle) */
.mobg-philosophy { background: #F7F3EA; border-block: 1px solid #D8D3C4; padding: clamp(1.75rem, 4vw, 3rem) max(1.25rem, calc((100% - 1320px) / 2)); text-align: left; }
.mobg-philosophy > * { margin-left: 0; margin-right: 0; max-width: none; }
.mobg-philosophy .mobg-philosophy__title { margin: 0 0 .5rem; font-family: var(--mobg-f-head, 'Tagesschrift', serif); font-weight: 400; font-size: clamp(2rem, 1.55rem + 1.55vw, 2.75rem); line-height: 1.12; color: #031441; }
.mobg-philosophy .mobg-philosophy__slogan { margin: 0 0 1rem; font-family: var(--mobg-f-head, 'Tagesschrift', serif); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); line-height: 1.2; color: #B5410B; }
.mobg-philosophy .mobg-philosophy__text { max-width: 66ch; margin: 0 0 1em; font-size: 1.05rem; line-height: 1.75; color: #141B33; }
.mobg-philosophy .mobg-philosophy__text strong { font-weight: 800; color: #031441; }
.mobg-philosophy .mobg-philosophy__sign { margin: 1.25rem 0 0; font-size: 1.1rem; color: #031441; }

/* Philosophy: text on the left, the Ministry logo on the right */
.mobg-philosophy .mobg-philosophy__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 2rem 3rem; align-items: center; max-width: none; }
.mobg-philosophy .mobg-philosophy__body { min-width: 0; }
.mobg-philosophy .mobg-philosophy__logo { margin: 0; display: flex; justify-content: flex-end; }
.mobg-philosophy .mobg-philosophy__logo img { display: block; width: 100%; max-width: 560px; height: auto; background: transparent; }
@media (max-width: 860px) { .mobg-philosophy .mobg-philosophy__grid { grid-template-columns: minmax(0, 1fr); } .mobg-philosophy .mobg-philosophy__logo { justify-content: flex-start; } .mobg-philosophy .mobg-philosophy__logo img { max-width: 380px; } }

/* Wide screens: dropdowns, search and the count with the view buttons all sit in ONE row, level with the dropdowns */
@media (min-width: 1280px) {
	.bgme-hub .bgme-fbar { display: flex; align-items: center; flex-wrap: nowrap; gap: 1rem; }
	.bgme-hub .bgme-fbar__main { flex: 0 0 auto; grid-template-columns: repeat(3, 190px); gap: .75rem; }
	.bgme-hub .bgme-fbar__row { flex: 1 1 auto; min-width: 0; margin-top: 0; flex-wrap: nowrap; align-items: center; gap: .75rem; }
	.bgme-hub .bgme-search { flex: 1 1 200px; min-width: 0; max-width: none; }
	.bgme-hub .bgme-search input[type="search"], .bgme-hub .bgme-search .mobg-btn { min-height: 62px; }
	.bgme-hub .bgme-fbar__tools { margin-left: auto; flex: 0 0 auto; gap: .75rem; }
	.bgme-hub .bgme-fbar__clear { white-space: nowrap; }
}
/* Poster background: plain white like the homepage cards */
.bgme .bgme-event-card__poster, .bgme-hub .bgme-event-card__poster { background: #fff; }

/* Library numbers in the "Bring Your Own Game" panel (replaces the crest). */
.bgme .bgme-libstats{align-self:center;justify-self:end;min-width:15rem;background:#fff;border:2px solid #031441;padding:.8rem 1rem}
.bgme .bgme-libstats__title{display:block;margin:0 0 .5rem;font-size:.72rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--bgme-thistle,#6b3fa0)}
.bgme .bgme-libstats dl{margin:0;display:grid;gap:.55rem}
.bgme .bgme-libstats dl>div{display:grid;gap:.1rem}
.bgme .bgme-libstats dt{font-size:.82rem;color:#4f5666;font-weight:500}
.bgme .bgme-libstats dd{margin:0;font-family:var(--bgme-head,'Tagesschrift',serif);font-size:1.6rem;line-height:1.1;color:#031441}
.bgme .bgme-libstats dd small{font-family:inherit;font-size:.9rem;color:#4f5666}
@media(max-width:630px){.bgme .bgme-byog{grid-template-columns:1fr!important}.bgme .bgme-libstats{justify-self:stretch;min-width:0}.bgme .bgme-libstats dl{grid-template-columns:repeat(3,1fr);gap:.5rem}.bgme .bgme-libstats dd{font-size:1.2rem}.bgme .bgme-libstats dt{font-size:.72rem}}
