/* ─── Events page ──────────────────────────────────────────── */

.ev-section {
	padding: 3rem 0 5rem;
}

.ev-layout {
	display: grid;
	grid-template-columns: minmax(420px, 1.2fr) minmax(0, .8fr);
	gap: 1.75rem;
	align-items: start;
}

/* ── Calendar widget ──────────────────────────────────────── */

.ev-cal-wrap {
	position: sticky;
	top: 90px;
	background: #fff;
	border: 1px solid rgba(47, 125, 77, .15);
	border-radius: 1.15rem;
	box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
	overflow: visible;
}

.ev-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.3rem;
	background: linear-gradient(135deg, #15803d, #166534);
	border-radius: 1.15rem 1.15rem 0 0;
	color: #fff;
}

.ev-cal-nav-btn {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: .3rem .5rem;
	border-radius: .4rem;
	display: flex;
	align-items: center;
	line-height: 1;
	transition: background .15s;
}

.ev-cal-nav-btn:hover {
	background: rgba(255, 255, 255, .2);
}

.ev-cal-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.ev-cal-grid {
	padding: 1rem 1.15rem;
}

.ev-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: .3rem;
}

.ev-cal-weekdays span {
	text-align: center;
	font-size: .72rem;
	font-weight: 600;
	color: #9ca3af;
	text-transform: uppercase;
	padding: .35rem 0;
}

.ev-cal-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	align-items: stretch;
}

.ev-cal-day {
	position: relative;
	min-height: 86px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	font-size: .9rem;
	color: #374151;
	border-radius: .45rem;
	cursor: default;
	user-select: none;
	transition: background .12s;
	padding: .32rem .3rem .28rem;
	min-width: 0;
	overflow: hidden;
}

.ev-cal-day.other-month {
	color: #d1d5db;
}

.ev-cal-day.today {
	background: #dcfce7;
}

.ev-cal-day.has-event {
	cursor: pointer;
	font-weight: 700;
	color: #15803d;
}

.ev-cal-day.has-event:hover {
	background: #f0fdf4;
}

.ev-cal-day-num {
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.2;
	align-self: center;
	min-width: 1.25rem;
	text-align: center;
	color: inherit;
}

.ev-cal-day.today .ev-cal-day-num {
	background: #15803d;
	color: #fff;
	border-radius: 999px;
	padding: .12rem .35rem;
}

.ev-cal-events {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: .28rem;
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.ev-cal-event-title {
	display: block;
	font-size: .62rem;
	line-height: 1.3;
	font-weight: 600;
	padding: .13rem .28rem;
	border-radius: .22rem;
	background: #e6f4ea;
	color: #166534;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ev-cal-more {
	font-size: .58rem;
	font-weight: 700;
	color: #15803d;
	line-height: 1.2;
	padding-left: .12rem;
}

.ev-cal-day.other-month .ev-cal-event-title,
.ev-cal-day.other-month .ev-cal-more {
	opacity: .45;
}

/* popup */

.ev-popup-wrap {
	padding: 0 1.15rem 1.1rem;
}

.ev-popup {
	background: #f9fafb;
	border: 1px solid rgba(47, 125, 77, .18);
	border-radius: .75rem;
	padding: .9rem 1rem;
}

.ev-popup h4 {
	font-size: .82rem;
	font-weight: 700;
	color: #14532d;
	margin: 0 0 .3rem;
	line-height: 1.35;
}

.ev-popup-meta {
	font-size: .73rem;
	color: #6b7280;
	display: flex;
	flex-direction: column;
	gap: .2rem;
	margin-bottom: .55rem;
}

.ev-popup-link {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	font-size: .76rem;
	font-weight: 600;
	color: #15803d;
	text-decoration: none;
}

.ev-popup-link:hover {
	text-decoration: underline;
}

.ev-popup-sep {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: .65rem 0;
}

/* ── Upcoming events grid ─────────────────────────────────── */

.ev-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.1rem;
}

.ev-layout > div:last-child {
	max-width: 560px;
}

.ev-card {
	background: #fff;
	border: 1px solid rgba(47, 125, 77, .13);
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}

.ev-card:hover {
	box-shadow: 0 12px 28px rgba(15, 23, 42, .13);
	transform: translateY(-3px);
}

.ev-card-img-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f3f4f6;
}

.ev-card-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ev-card-date-badge {
	position: absolute;
	top: .75rem;
	left: .75rem;
	background: #15803d;
	color: #fff;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	padding: .28rem .65rem;
	border-radius: .4rem;
	line-height: 1.4;
}

.ev-card-date-tbc {
	background: #9ca3af;
}

.ev-card-body {
	padding: 1rem 1.1rem 1.15rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ev-card-type {
	display: inline-block;
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #15803d;
	padding: .18rem .55rem;
	background: #f0fdf4;
	border-radius: 999px;
	margin-bottom: .55rem;
	width: fit-content;
}

.ev-card-title {
	font-size: .97rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 .45rem;
	line-height: 1.3;
}

.ev-card-location {
	font-size: .78rem;
	color: #6b7280;
	display: flex;
	align-items: flex-start;
	gap: .3rem;
	margin-bottom: .8rem;
	flex: 1;
	line-height: 1.4;
}

.ev-card-actions {
	display: flex;
	gap: .55rem;
	flex-wrap: wrap;
}

.ev-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .5rem .9rem;
	background: #15803d;
	color: #fff;
	font-size: .78rem;
	font-weight: 600;
	border-radius: .45rem;
	text-decoration: none;
	transition: background .2s;
}

.ev-btn-primary:hover {
	background: #166534;
	color: #fff;
}

.ev-btn-outline {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .5rem .9rem;
	border: 1.5px solid #15803d;
	color: #15803d;
	font-size: .78rem;
	font-weight: 600;
	border-radius: .45rem;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.ev-btn-outline:hover {
	background: #15803d;
	color: #fff;
}

/* empty state */

.ev-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	background: #f9fafb;
	border-radius: 1rem;
	border: 1px dashed #bbf7d0;
	color: #6b7280;
}

.ev-empty p {
	margin: 0;
	font-size: .95rem;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1024px) {
	.ev-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.ev-cal-wrap {
		position: static;
	}

	.ev-layout > div:last-child {
		max-width: none;
	}

	.ev-grid {
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	}
}

@media (max-width: 540px) {
	.ev-cal-day {
		min-height: 70px;
		padding: .25rem .2rem;
	}

	.ev-cal-event-title {
		font-size: .56rem;
	}

	.ev-cal-more {
		font-size: .54rem;
	}

	.ev-grid {
		grid-template-columns: 1fr;
	}
}
