/* Aplomb Events — matches the original aplombmartialarts.com/events page */

.ape {
	--ape-blue: #0241a1;
	--ape-light: #9ab3d9;
	--ape-text: #443e51;
	--ape-font: "Satoshi", "Satoshi-Variable", sans-serif;
	padding: 5rem 0;
	font-family: var(--ape-font);
	color: var(--ape-blue);
	-webkit-font-smoothing: antialiased;
}
.ape *, .ape *::before, .ape *::after { box-sizing: border-box; }
.ape-container { max-width: 1320px; margin: 0 auto; padding: 0 1rem; }
.ape ul { margin: 0; padding: 0; list-style: none; }
.ape li::before, .ape li::marker { content: none; }

.ape-sr {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ape-admin-note {
	margin: 0 0 2rem; padding: .75rem 1rem;
	border: 2px dashed #d63638; background: #fff6f6; color: #8a1f1f;
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ape-admin-note code { padding: 0 .3em; background: rgba(0,0,0,.06); font-size: 13px; }

.ape-title {
	margin: 0 0 4rem;
	font-family: var(--ape-font);
	font-size: 2.5rem;
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.12;
	text-align: center;
	color: var(--ape-blue);
}
@media (min-width: 768px) { .ape-title { font-size: 3rem; } }

/* ---------- Layout ---------- */
.ape-layout { display: flex; flex-direction: column; gap: 2rem; }

/* Side (original): filters 3/12 + gap 1/12 + grid 8/12 */
@media (min-width: 1024px) {
	.ape-layout--side { flex-direction: row; align-items: flex-start; gap: 0; }
	.ape-layout--side .ape-filters { flex: 0 0 25%; padding-right: 1.5rem; }
	.ape-layout--side .ape-grid-wrap { flex: 0 0 66.667%; margin-left: 8.333%; }
	.ape-layout--nofilters .ape-grid-wrap { flex-basis: 100%; margin-left: 0; }
}

/* Top: one horizontal filter bar above a full-width grid.
   Events | Locations | Start Date | End Date | Clear Dates — each its own column, bottoms aligned. */
.ape-layout--top { gap: 3rem; }
.ape-layout--top .ape-grid-wrap { width: 100%; }
.ape-layout--top .ape-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1.5rem 2rem;
	padding: 0 0 2.5rem;
	border-bottom: 2px solid var(--ape-blue);
}
.ape-layout--top .ape-filter { flex: 1 1 13rem; min-width: 0; max-width: 22rem; margin: 0; }
.ape-layout--top .ape-filter--clear { flex: 0 0 auto; display: flex; align-items: center; min-height: 3.125rem; }
.ape-layout--top .ape-clear { margin: 0; white-space: nowrap; }
@media (max-width: 639px) {
	.ape-layout--top .ape-filter { flex-basis: 100%; max-width: none; }
	.ape-layout--top .ape-filter--clear { min-height: 0; }
}

/* ---------- Filters ---------- */
.ape-filter { margin-bottom: 2rem; }
.ape-filter__title {
	margin: 0 0 .75rem;
	font-family: var(--ape-font);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.28;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--ape-blue);
}
.ape-filter__title label { cursor: pointer; }
.ape-select { position: relative; }
.ape-select select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	margin: 0;
	padding: .75rem 2.75rem .75rem 1rem;
	border: 2px solid var(--ape-blue);
	border-radius: 0;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%230241a1' d='M27.68 9.319c-.426-.426-1.117-.426-1.543 0L16 19.457 5.862 9.319c-.426-.426-1.117-.426-1.543 0s-.426 1.117 0 1.543l10.909 10.909c.205.205.482.32.771.32s.567-.115.771-.32l10.909-10.909c.426-.426.426-1.117 0-1.543z'/%3E%3C/svg%3E") no-repeat right 1rem center / 1rem;
	font-family: var(--ape-font);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--ape-blue);
	cursor: pointer;
}
.ape-select select:focus,
.ape-date input:focus,
.ape-date-input:focus { outline: none; box-shadow: 0 0 0 4px var(--ape-light); }

.ape-date { display: block; margin-bottom: .75rem; }
.ape-date__prefix {
	display: block;
	margin-bottom: .35rem;
	font-size: .875rem;
	font-weight: 500;
	color: var(--ape-blue);
}
.ape-date input,
.ape-date-input {
	width: 100%;
	margin: 0;
	padding: 4px .75rem;
	min-height: 2.5rem;
	border: 2px solid var(--ape-blue);
	border-radius: 0;
	background: #fff;
	font-family: var(--ape-font);
	font-size: 1rem;
	font-weight: 700;
	color: var(--ape-blue);
}
.ape-clear,
.ape-clear:hover,
.ape-clear:focus {
	display: inline-flex;
	margin: .25rem 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-family: var(--ape-font);
	font-size: 1rem;
	font-weight: 700;
	text-transform: none;
	color: var(--ape-blue);
	cursor: pointer;
}
.ape-clear:hover { text-decoration: underline; text-underline-offset: 3px; }

.ape-layout--top .ape-date-input { display: block; min-height: 3.125rem; padding: .7rem 1rem; }
.ape-layout--top .ape-select select { min-height: 3.125rem; }

/* ---------- Grid: --ape-cols per row on desktop (shortcode columns=""), 2 on tablet, 1 on phones ---------- */
.ape-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .ape-grid { grid-template-columns: repeat(min(2, var(--ape-cols, 3)), minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ape-grid { grid-template-columns: repeat(var(--ape-cols, 3), minmax(0, 1fr)); gap: 2.5rem 2rem; } }
.ape-layout--side .ape-grid { column-gap: 3.125rem; }
.ape-empty { margin: 1rem 0 0; font-size: 1.125rem; color: var(--ape-blue); }
.ape-empty[hidden], .ape-card[hidden] { display: none !important; }

/* ---------- Card ---------- */
.ape-card { position: relative; height: 100%; }
.ape-card__main {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--ape-blue);
	background: #fff;
	transition: .2s ease-in-out;
}

.ape-card__media { position: relative; }
.ape-card__image {
	position: relative;
	background: #dfe5f1 center / cover no-repeat;
}
.ape-card__image::before { content: ""; display: block; padding-bottom: 63.43%; }
.ape-card__image::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
.ape-card__cover { position: absolute; inset: 0; z-index: 5; }

.ape-card__date {
	position: absolute;
	top: 2rem;
	left: 0;
	z-index: 10;
	padding: .75rem 1.75rem;
	border: 1px solid #fff;
	border-left: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	color: #fff;
	pointer-events: none;
}
.ape-card__time {
	position: absolute;
	top: 2.75rem;
	right: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: .4rem;
	padding-right: 1.25rem;
	font-size: 1rem;
	font-weight: 500;
	color: #fff;
	pointer-events: none;
}
.ape-card__time svg { width: 18px; height: 18px; flex-shrink: 0; }

.ape-card__content {
	flex: 1 1 auto;
	padding: 2rem 2rem 1rem;
	background: var(--ape-blue);
	color: #fff;
	transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.ape-card__info { margin-bottom: 20px !important; }
.ape-card__info li { display: flex; align-items: flex-start; margin-bottom: 12px; }
.ape-card__info li:last-child { margin-bottom: 0; }

.ape-card__category {
	display: inline-flex !important;
	width: min-content;
	white-space: nowrap;
	padding: .25rem .5rem;
	border: 1px solid #fff;
	font-size: 10px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #fff;
}
.ape-card__location svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 3px 12px 0 0;
	fill: #fff;
}
.ape-card__location address { display: flex; flex-direction: column; font-style: normal; }
.ape-card__address,
.ape-card__place {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	color: #fff;
	text-decoration: none;
}
.ape-card__address:hover address { text-decoration: underline; text-underline-offset: 3px; }

.ape-card__title {
	margin: 0 0 12px;
	font-family: var(--ape-font);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.25;
	color: #fff;
}
.ape-card__title a { color: #fff; text-decoration: none; transition: color .3s; }
.ape-card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.ape-card__excerpt {
	margin: 0 0 1rem;
	font-size: .875rem;
	line-height: 1.5;
	color: #fff;
}
.ape-card__excerpt a { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Hover: the blue panel turns white with blue text (original behavior) */
.ape-card__main:hover .ape-card__content { background: #fff; color: var(--ape-blue); }
.ape-card__main:hover .ape-card__title,
.ape-card__main:hover .ape-card__title a,
.ape-card__main:hover .ape-card__excerpt,
.ape-card__main:hover .ape-card__address,
.ape-card__main:hover .ape-card__place,
.ape-card__main:hover .ape-card__category { color: var(--ape-blue); }
.ape-card__main:hover .ape-card__category { border-color: var(--ape-blue); }
.ape-card__main:hover .ape-card__location svg { fill: var(--ape-blue); }

@media (min-width: 1100px) {
	.ape-grid[style*="--ape-cols: 3"] .ape-card__content,
	.ape-grid[style*="--ape-cols: 4"] .ape-card__content { padding: 1.75rem 1.5rem .75rem; }
	.ape-grid[style*="--ape-cols: 4"] .ape-card__title { font-size: 1.25rem; }
}
@media (max-width: 640px) {
	.ape { padding: 3rem 0; }
	.ape-card__date { top: 1.25rem; padding: .5rem 1rem; font-size: .9375rem; }
	.ape-card__time { top: 1.75rem; padding-right: .875rem; font-size: .9375rem; }
	.ape-card__content { padding: 1.5rem 1.25rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
	.ape-card__main, .ape-card__content, .ape-card__title a { transition: none; }
}

/* =====================================================================
   Single event: [aplomb_event]  (matches the original /event/... pages)
   ===================================================================== */
.ape-single { padding: 4rem 0 0; }

.ape-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 2rem !important;
	font-size: 1rem;
	color: var(--ape-blue);
}
.ape-breadcrumbs li:not(:last-child)::after { content: "/" !important; display: inline-block; margin: 0 4px; }
.ape-breadcrumbs a { color: var(--ape-blue); text-decoration: none; }
.ape-breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.ape-single__title {
	margin: 0 0 20px;
	font-family: var(--ape-font);
	font-size: 2rem;
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.2;
	color: var(--ape-blue);
}

.ape-single__image {
	position: relative;
	margin-bottom: 4rem;
	background: #dfe5f1 center / cover no-repeat;
}
.ape-single__image::before { content: ""; display: block; padding-top: 45%; }

.ape-single__flex { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 4rem; }
.ape-single__sidebar { order: 2; }
.ape-single__main { order: 1; min-width: 0; }
@media (min-width: 1024px) {
	.ape-single__flex { flex-direction: row; align-items: stretch; gap: 3.125rem; }
	.ape-single__sidebar { order: 1; flex: 0 0 calc(33.3% - 1.5625rem); }
	.ape-single__main { order: 2; flex: 1 1 auto; }
}

.ape-single__box { padding: 1.5rem; border: 1px solid var(--ape-blue); color: var(--ape-blue); }
.ape-single__box:not(:last-child) { margin-bottom: 2rem; }
.ape-single__label {
	margin: 0 0 20px;
	font-family: var(--ape-font);
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .025rem;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--ape-blue);
}
.ape-single__organizer li {
	display: flex;
	align-items: flex-start;
	font-size: .875rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--ape-blue);
}
.ape-single__organizer li:not(:last-child) { margin-bottom: 8px; }
.ape-single__organizer svg { flex: 0 0 18px; width: 18px; height: 18px; margin: 0 12px 0 0; }
.ape-single__place { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ape-blue); }
.ape-single__address { color: var(--ape-blue); text-decoration: none !important; }
.ape-single__address address { font-style: normal; }
.ape-single__address span { display: block; }
.ape-single__address span:not(:last-child) { margin-bottom: 4px; }
.ape-single__address:hover span { text-decoration: underline; text-underline-offset: 3px; }

.ape-single__info {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	justify-content: space-between;
	margin-bottom: 48px;
	padding: 2rem;
	border: 1px solid var(--ape-blue);
	color: var(--ape-blue);
}
.ape-single__info-item { flex: 1 1 12rem; }
.ape-single__info-label {
	margin: 0 0 .35rem;
	font-family: var(--ape-font);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ape-blue);
}
.ape-single__info-value { display: flex; align-items: center; margin: 0; font-size: 1rem; color: var(--ape-blue); }
.ape-single__info-value svg { flex: 0 0 18px; width: 18px; height: 18px; margin-right: 8px; }

/* Event description */
.ape-single__content { font-size: 1rem; line-height: 1.6; color: var(--ape-blue); }
.ape-single__content > * { margin: 0 0 1rem; }
.ape-single__content > *:last-child { margin-bottom: 0; }
.ape-single__content p, .ape-single__content li, .ape-single__content div { color: var(--ape-blue); }
.ape-single__content a { color: var(--ape-blue); text-decoration: underline; text-underline-offset: 3px; transition: color .5s; }
.ape-single__content a:hover { color: var(--ape-light); }
.ape-single__content img { max-width: 100%; height: auto; }
.ape-single__content ul { margin-left: 1.25rem; list-style: disc; }
.ape-single__content ol { margin-left: 1.25rem; list-style: decimal; }

/* Add to calendar: pill buttons (original .lc-button) */
.ape-single__calendar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 1rem;
	margin-top: 1rem;
}
.ape-pill {
	display: inline-block;
	margin-top: 1rem;
	padding: .5rem .75rem;
	border: 1px solid var(--ape-blue);
	border-radius: 100px;
	font-family: var(--ape-font);
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .025em;
	text-transform: uppercase;
	text-decoration: none !important;
	color: var(--ape-blue);
	transition: background-color .15s ease, color .15s ease;
}
.ape-pill:hover, .ape-pill:focus-visible { background: #333; border-color: #333; color: #fff; }

/* Share */
.ape-share { margin-top: 64px; }
.ape-share__list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 20px; }
.ape-share__list li { position: relative; }
.ape-share__link,
.ape-share__link:hover,
.ape-share__link:focus {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ape-blue);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--ape-blue);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.ape-share__link svg { width: 16px; height: 16px; }
.ape-share__link:hover, .ape-share__link:focus-visible { background: var(--ape-blue); color: #fff; }
.ape-share__copied {
	position: absolute;
	top: 50%;
	left: 100%;
	white-space: nowrap;
	font-size: .875rem;
	font-weight: 700;
	color: var(--ape-blue);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) translateX(0);
	transition: .2s;
}
.ape-share__copied.is-copied { opacity: 1; transform: translateY(-50%) translateX(10px); }

@media (max-width: 640px) {
	.ape-single { padding-top: 2.5rem; }
	.ape-single__image { margin-bottom: 2.5rem; }
	.ape-single__info { padding: 1.5rem; }
	.ape-single__calendar { justify-content: flex-start; }
}
