/* ============================================================
   EVENTS PAGE
   Extracted from the main style.css to cut unused CSS weight on
   every OTHER page - loads only on the Events page template now.
   One dead-code line was dropped during the move: '.hero-btns .btn
   { justify-content: space-between; }' targeted an element that
   doesn't exist anywhere in page-events.php's markup (verified via
   grep) - it had zero visual effect before this move and still has
   none now, just without the extra bytes.
   ============================================================ */

/* ============================================================
   EVENTS PAGE
   ============================================================ */
.events-hero { position: relative; overflow: hidden; padding: 90px 0; }
.events-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.events-hero .container { position: relative; z-index: 1; }
.events-hero-content { max-width: 560px; }
.events-hero-title { font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; color: var(--green-mid); margin-bottom: 16px; line-height: 1.25; }
.events-hero-desc { font-size: 18px; font-weight: 300; color: var(--text-dark); line-height: 1.7; }

@media (max-width: 768px) {
	.events-hero { padding: 64px 0; }
	.events-hero-content { max-width: 100%; }
}
@media (max-width: 480px) {
	.events-hero { padding: 48px 0; }
	.events-hero-title { font-size: 24px; }
	.events-hero-desc { font-size: 15px; }
}


/* ------------------------------------------------------------
   The rest of this file (event cards, filters, sort dropdown,
   photo stack, video modal) was originally misplaced inside
   blog-single.css during the first CSS-split pass - it lived
   right next to the Blog Detail section in the original style.css
   with no separating section header, so the extraction script
   swept it up by line-range alone. Moved here where it belongs.
   ------------------------------------------------------------ */

.events-listing { padding: 60px 0 90px; background: var(--white); }

.ev-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.ev-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ev-heading { font-family: var(--font-heading); font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; color: var(--green-dark); margin: 0; }
.ev-count { font-size: 13px; font-weight: 600; color: var(--gold); background: #F1EBDD; padding: 6px 14px; border-radius: 50px; white-space: nowrap; }

.ev-toolbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ev-year-filters { display: flex; align-items: center; gap: 6px; padding: 8px; background: #eaf0ea; border-radius: 60px;}
.ev-filter { font-size: 14px; font-weight: 500; color: var(--gray-500); padding: 8px 16px; border-radius: 50px; background: transparent; transition: var(--transition); }
.ev-filter:hover { color: var(--green-mid); }
.ev-filter.is-active { background: var(--green-mid); color: var(--white); box-shadow: 0px 6px 16px -8px #0A5634B2; }
.ev-sort { position: relative; }
.ev-sort-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.ev-sort-custom { position: relative; }
.ev-sort-toggle {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 14px;
	font-weight: 500;
	padding: 9px 20px;
	border: 1px solid var(--gray-200);
	border-radius: 50px;
	background: var(--white);
	color: var(--text-dark);
	cursor: pointer;
	height: 50px;
	transition: var(--transition);
}
.ev-sort-toggle:hover                       { border-color: var(--green-mid); }
.ev-sort-custom.is-open .ev-sort-toggle     { border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(28,138,89,0.15); }
.ev-sort-chevron                            { width: 10px; height: 6px; color: var(--gray-500); flex-shrink: 0; transition: transform 0.2s ease; }
.ev-sort-custom.is-open .ev-sort-chevron    { transform: rotate(180deg); color: var(--green-mid); }

.ev-sort-list {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 100%;
	background: var(--white);
	border: 1px solid var(--gray-200);
	border-radius: 16px;
	box-shadow: 0 16px 40px -12px rgba(20,64,31,0.22);
	padding: 6px;
	list-style: none;
	z-index: 10;
}
.ev-sort-option {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-dark);
	padding: 10px 14px;
	border-radius: 10px;
	white-space: nowrap;
	cursor: pointer;
	transition: var(--transition);
}
.ev-sort-option:hover      { background: #EAF0EA; }
.ev-sort-option.is-selected { background: var(--green-mid); color: var(--white); }

.ev-cards { display: flex; flex-direction: column; gap: 28px; }
.ev-card { background: #F1EBDD; border-radius: 26px; padding: 36px 40px 40px; }

.ev-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.ev-title { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--green-dark); margin: 0; }
.ev-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ev-meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; color: var(--text-dark); white-space: nowrap; }
.ev-meta-item svg { width: 16px; height: 16px; color: var(--green-mid); flex-shrink: 0; }

.ev-desc { border-left: 3px solid var(--gold); padding-left: 18px; margin-bottom: 46px; }
.ev-desc p { font-size: 18px; font-weight: 300; color: var(--gray-600); line-height: 1.7; margin: 0 0 10px; }
.ev-desc p:last-child { margin-bottom: 0; }

.ev-photo { position: relative; display: block; border-radius: 16px; overflow: hidden; padding: 6px; background: var(--white); box-shadow: 0 14px 26px -10px rgba(0,0,0,0.28); border: none; margin: 0; font: inherit; text-align: left; width: 100%; }
.ev-photo img, .ev-photo video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.ev-photo-pin { position: absolute; top: 1px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 2px 5px rgba(0,0,0,0.35); z-index: 2; }

/* Video thumbnails are buttons (open the lightbox) but look identical to a photo,
   plus a centered play badge. */
.ev-photo-video { cursor: pointer; }
.ev-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: var(--green-mid); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px -6px rgba(0,0,0,0.45); pointer-events: none; z-index: 2; }
.ev-play-btn svg { width: 20px; height: 20px; margin-left: 2px; }

.ev-photos-3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: stretch; }
.ev-photo-main { min-height: 340px; transform: rotate(-2deg); }
.ev-photo-main img, .ev-photo-main video { height: 100%; }
.ev-photo-stack { display: flex; flex-direction: column; gap: 20px; }
.ev-photo-stack .ev-photo { flex: 1; max-height: 240px; }
.ev-photo-stack .ev-photo:nth-child(1) { transform: rotate(2deg); }
.ev-photo-stack .ev-photo:nth-child(2) { transform: rotate(-1.5deg); }

/* A video always renders as the large item; when it's the third media item this
   mirrors the grid (stack moves left, video/main moves right) instead of tilting -
   the tilts on ev-photo-main / ev-photo-stack above still apply either way. */
.ev-photos-3.ev-main-right { grid-template-columns: 1fr 1.4fr; }
.ev-photos-3.ev-main-right .ev-photo-main { order: 2; }
.ev-photos-3.ev-main-right .ev-photo-stack { order: 1; }

/* Exactly 2 items sit flat, side by side, no tilt. */
.ev-photos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ev-photos-2 .ev-photo { max-height: 260px; transform: none; }

.ev-photos-1 .ev-photo { min-height: 300px; transform: rotate(-1deg); }

.ev-empty { text-align: center; font-size: 16px; color: var(--gray-500); padding: 60px 0; }

/* Video lightbox */
.ev-video-modal { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 20px; }
.ev-video-modal.open { display: flex; }
.ev-video-modal-overlay { position: absolute; inset: 0; background: rgba(11,58,38,0.75); backdrop-filter: blur(3px); }
.ev-video-modal-dialog { position: relative; z-index: 1; width: 100%; max-width: 900px; }
.ev-video-modal-close { position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--white); background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.ev-video-modal-close:hover { background: rgba(255,255,255,0.28); }
#evVideoPlayer { display: block; width: 100%; max-height: 80vh; border-radius: 12px; background: #000; }
.ev-video-modal-iframe-wrap { display: none; position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.ev-video-modal-iframe-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body.ev-modal-open { overflow: hidden; }

@media (max-width: 900px) {
	.ev-photos-3, .ev-photos-3.ev-main-right { grid-template-columns: 1fr; }
	.ev-photos-3.ev-main-right .ev-photo-main, .ev-photos-3.ev-main-right .ev-photo-stack { order: initial; }
	.ev-photo-main { min-height: 260px; }
	.ev-photo-stack { flex-direction: row; }
	.ev-photo-stack .ev-photo { min-height: 200px; }
}
@media (max-width: 640px) {
	.events-listing { padding: 44px 0 56px; }
	.ev-card { padding: 26px 22px 28px; border-radius: 20px; }
	.ev-title { font-size: 20px; }
	.ev-toolbar { gap: 16px; }
	.ev-toolbar-right { width: 100%; justify-content: space-between; }
	.ev-year-filters { flex-wrap: wrap; }
	.ev-photos-2, .ev-photo-stack { grid-template-columns: 1fr; flex-direction: column; }
	.ev-photos-2 .ev-photo, .ev-photo-stack .ev-photo { min-height: 220px; }
	.ev-desc{margin-bottom: 40px;}
	.ev-desc p { font-size: 14px; }
	.ev-video-modal-close { top: -40px; }
	.ev-play-btn { width: 46px; height: 46px; }
	.ev-play-btn svg { width: 16px; height: 16px; }
}

