/* ============================================================
   Events — all event-specific styles
   Archive, single post, gallery grid, and lightbox overrides.
   ============================================================ */


/* ---- Section headings (Current / Upcoming, Past Events) ---- */

.events-section-heading {
	margin-bottom: 32px;
	color: var(--electric);
}


/* ---- 4-column grid for Past Events ---- */

.blog-four-cols .archive-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-gap: 25px;
}

.blog-four-cols .archive-list>article~article {
	margin-top: 0 !important;
}


/* ---- Event card: date and excerpt ---- */

.event-date-meta {
	color: var(--navy);
	margin-top: 8px;
}

.event-date-label {
	font-weight: 600;
	margin-right: 4px;
}

.event-excerpt {
	color: var(--navy);
	margin-top: 12px;
}


/* ---- Event meta box on single event page ---- */

.event-meta-box {
	background: #d1ebfa;
	border-radius: 10px;
	padding: 24px 28px;
	margin-bottom: 40px;
}

.event-meta-title {
	margin-bottom: 20px;
	color: var(--navy);
}

.event-meta-box--has-map {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	padding: 0;
	overflow: hidden;
}

.event-meta-box--has-map .event-meta-inner {
	padding: 24px 28px;
}

.event-meta-map {
	min-height: 260px;
	border-radius: 0 10px 10px 0;
	overflow: hidden;
}

.event-meta-map iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 260px;
}

.event-meta-inner {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.event-meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--navy);
}

.event-meta-icon {
	flex-shrink: 0;
	color: var(--navy);
	line-height: 1;
}

.event-meta-label {
	font-weight: 700;
	min-width: 52px;
}

.event-meta-value {
	color: #333;
}

.event-meta-value a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}


/* ---- Gallery: title and grid ---- */

.event-gallery-title {
	margin-top: 48px;
	margin-bottom: 20px;
	color: var(--navy);
}

p+.event-gallery-title,
.editor-content p+.event-gallery-title {
	margin-top: 48px;
}

.mwa-single-post .gallery {
	display: grid !important;
	grid-gap: 12px;
	margin-top: 0;
	margin-bottom: 40px;
	width: 100% !important;
}

.mwa-single-post .gallery-columns-1 {
	grid-template-columns: 1fr;
}

.mwa-single-post .gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.mwa-single-post .gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.mwa-single-post .gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.mwa-single-post .gallery-item {
	margin: 0 !important;
	width: 100% !important;
}

/* Fixed ratio so portrait and landscape images crop to a uniform tile */
.mwa-single-post .gallery-item .gallery-icon {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 12px;
}

.mwa-single-post .gallery-item .gallery-icon a {
	display: block;
	width: 100%;
	height: 100%;
}

.mwa-single-post .gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px !important;
	transition: opacity 0.2s ease;
}

.mwa-single-post .gallery-item a:hover img {
	opacity: 0.88;
}

/* Hide captions in the gallery grid — they display in the lightbox instead */
.gallery .gallery-item figcaption {
	display: none !important;
}


/* ---- Magnific Popup lightbox overrides ---- */

/* Remove dark rectangle + drop-shadow behind the image */
.mfp-figure::after {
	display: none !important;
}

.mfp-event-gallery .mfp-figure {
	position: relative;
	cursor: default !important;
}

.mfp-event-gallery .mfp-figure figure {
	margin: 0;
}

.mfp-gallery .mfp-image-holder .mfp-figure {
	cursor: default !important;
}

img.mfp-img {
	max-height: 75vh !important;
	padding: 40px 0 !important;
	box-shadow: none !important;
	cursor: default !important;
}

.mfp-event-gallery button.mfp-close {
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	text-align: center !important;
	line-height: 0 !important;
	font-size: 0 !important;
	background: transparent !important;
	position: absolute !important;
	top: -20px !important;
	right: 0 !important;
	cursor: pointer !important;
}

.mfp-event-gallery button.mfp-close svg {
	display: block;
	width: 44px;
	height: 44px;
	pointer-events: none;
}

.mfp-event-gallery button.mfp-close:hover,
.mfp-event-gallery button.mfp-close:focus {
	opacity: 1;
}

.mfp-event-gallery button.mfp-arrow {
	position: absolute !important;
	top: 50% !important;
	margin-top: -28px !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	background: transparent !important;
	opacity: 0.85;
}

.mfp-event-gallery button.mfp-arrow-left {
	left: -65px !important;
}

.mfp-event-gallery button.mfp-arrow-right {
	right: -65px !important;
}

.mfp-event-gallery button.mfp-arrow::before,
.mfp-event-gallery button.mfp-arrow::after {
	display: none !important;
}

.mfp-event-gallery button.mfp-arrow svg {
	display: block;
	width: 44px;
	height: 44px;
}

.mfp-event-gallery button.mfp-arrow:hover,
.mfp-event-gallery button.mfp-arrow:focus {
	opacity: 1;
}

.mfp-event-gallery .mfp-bottom-bar {
	background: transparent !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 4px;
	padding-top: 10px;
}

.mfp-event-gallery .mfp-counter {
	position: static !important;
	order: -1;
	font-size: 16px !important;
	color: #fff !important;
}

.mfp-event-gallery .mfp-title {
	order: 0;
	font-size: 14px;
	color: #ddd;
	line-height: 1.4;
}

.mfp-event-gallery .mfp-title:empty {
	display: none !important;
}

/* Reset global theme figcaption styles that bleed into the lightbox */
.mfp-figure figcaption,
.mfp-figure figcaption a {
	position: static !important;
	background: transparent !important;
	padding: 0 !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	z-index: auto !important;
	color: #fff !important;
}


/* ---- Responsive ---- */

@media only screen and (max-width: 1100px) {
	.blog-four-cols .archive-list {
		grid-template-columns: repeat(2, 1fr);
		grid-gap: 20px;
	}
}

@media only screen and (max-width: 900px) {

	.mwa-single-post .gallery-columns-3,
	.mwa-single-post .gallery-columns-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (max-width: 600px) {
	.blog-four-cols .archive-list {
		grid-template-columns: 1fr;
	}

	.event-meta-box {
		padding: 18px 16px;
	}

	.event-meta-box--has-map {
		grid-template-columns: 1fr;
	}

	.event-meta-box--has-map .event-meta-inner {
		padding: 18px 16px;
	}

	.event-meta-map,
	.event-meta-map iframe {
		min-height: 220px;
		border-radius: 0 0 10px 10px;
	}
}

@media only screen and (max-width: 540px) {

	.mwa-single-post .gallery-columns-2,
	.mwa-single-post .gallery-columns-3,
	.mwa-single-post .gallery-columns-4 {
		grid-template-columns: 1fr;
	}
}