/**
 * Events directory + single event (full-width heroes, map, calendar).
 */

.itm-events-page,
.itm-single-event {
	width: 100%;
}

/* Directory hero — full bleed */
.itm-events-dir-hero {
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100vw;
	min-height: clamp(280px, 42vw, 420px);
	display: grid;
	align-items: end;
	background: linear-gradient(135deg, #1f2937, #111827 55%, #374151);
	color: #fff;
	overflow: hidden;
}

.itm-events-dir-hero__media {
	position: absolute;
	inset: 0;
}

.itm-events-dir-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itm-events-dir-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.72));
}

.itm-events-dir-hero__text {
	position: relative;
	z-index: 1;
	width: min(var(--itm-content-width, 1200px), calc(100% - 2rem));
	margin: 0 auto;
	padding: 2.5rem 0 1.75rem;
}

.itm-events-dir-hero__eyebrow {
	margin: 0 0 0.35rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.75rem;
	font-weight: 700;
	opacity: 0.85;
}

.itm-events-dir-hero__title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.1;
	color: #fff;
}

.itm-events-dir-hero__subtitle {
	margin: 0.5rem 0 1.1rem;
	max-width: 36rem;
	opacity: 0.9;
}

.itm-events-view-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.itm-events-view-tabs a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: rgba(255,255,255,0.12);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	text-decoration: none;
	border: 1px solid rgba(255,255,255,0.18);
}

.itm-events-view-tabs a.is-active,
.itm-events-view-tabs a:hover {
	background: #fff;
	color: #111;
	opacity: 1;
}

.itm-events-dir-body {
	width: min(var(--itm-content-width, 1200px), calc(100% - 2rem));
	margin: 0 auto;
	padding: 1.75rem 0 3rem;
}

.itm-events-dir-body h2 {
	margin: 0 0 1rem;
}

.itm-events-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.itm-event-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--itm-radius-lg, 16px);
	overflow: hidden;
	background: var(--itm-bg-elevated, #fff);
	border: 1px solid var(--itm-border);
	color: inherit;
	text-decoration: none;
	box-shadow: var(--itm-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.itm-event-card:hover {
	transform: translateY(-2px);
	opacity: 1;
	box-shadow: var(--itm-shadow-lg);
}

.itm-event-card__media {
	min-height: 160px;
	background: linear-gradient(135deg, #d4d4d8, #a1a1aa);
	background-size: cover;
	background-position: center;
	position: relative;
}

.itm-event-card__body {
	padding: 1rem 1.05rem 1.15rem;
}

.itm-event-card__body h3 {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
	color: var(--itm-heading);
}

.itm-event-card__meta {
	margin: 0 0 0.45rem;
	color: var(--itm-text-muted);
	font-size: 0.88rem;
}

.itm-events-badge,
.itm-event-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: rgba(0,0,0,0.55);
	color: #fff;
}

.itm-event-card__media .itm-events-badge {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
}

.itm-event-badge.is-live {
	background: #16a34a;
}

/* List view */
.itm-events-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.itm-events-list a {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 0.9rem;
	align-items: center;
	padding: 0.65rem;
	border-radius: var(--itm-radius);
	border: 1px solid var(--itm-border);
	background: var(--itm-bg-elevated, #fff);
	color: inherit;
	text-decoration: none;
}

.itm-events-list img,
.itm-events-list__ph {
	width: 96px;
	height: 72px;
	border-radius: 10px;
	object-fit: cover;
	background: #d4d4d8;
}

.itm-events-list strong {
	display: block;
	color: var(--itm-heading);
}

.itm-events-list small {
	display: block;
	margin-top: 0.2rem;
	color: var(--itm-text-muted);
}

/* Month calendar */
.itm-events-month__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.itm-events-month__head h2 {
	margin: 0;
}

.itm-events-month__dow,
.itm-events-month__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.35rem;
}

.itm-events-month__dow span {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--itm-text-muted);
	text-align: center;
}

.itm-events-month__day {
	min-height: 88px;
	padding: 0.4rem;
	border-radius: 10px;
	border: 1px solid var(--itm-border);
	background: var(--itm-bg-elevated, #fff);
}

.itm-events-month__day.is-out {
	opacity: 0.45;
}

.itm-events-month__date {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	margin-bottom: 0.25rem;
}

.itm-events-month__day a {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	margin-top: 0.2rem;
	color: var(--itm-accent);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Directory map */
.itm-events-directory-map,
.itm-event-map {
	width: 100%;
	height: 360px;
	border-radius: var(--itm-radius-lg, 16px);
	border: 1px solid var(--itm-border);
	background: #e5e7eb;
	z-index: 0;
}

.itm-events-map-legend {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.itm-events-map-legend a {
	display: block;
	padding: 0.75rem 0.9rem;
	border-radius: 12px;
	border: 1px solid var(--itm-border);
	background: var(--itm-bg-elevated, #fff);
	color: inherit;
	text-decoration: none;
}

.itm-events-map-legend strong {
	display: block;
	color: var(--itm-heading);
}

.itm-events-map-legend span {
	color: var(--itm-text-muted);
	font-size: 0.85rem;
}

/* Single event full-bleed hero */
.itm-event-hero {
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100vw;
	min-height: clamp(320px, 48vw, 520px);
	display: grid;
	align-items: end;
	background: #111827;
	color: #fff;
	overflow: hidden;
}

.itm-event-hero-media {
	position: absolute;
	inset: 0;
}

.itm-event-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itm-event-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.78));
}

.itm-event-hero-content {
	position: relative;
	z-index: 1;
	width: min(var(--itm-content-width, 1200px), calc(100% - 2rem));
	margin: 0 auto;
	padding: 2.5rem 0 2rem;
}

.itm-event-hero-crumb a {
	color: rgba(255,255,255,0.85);
	font-weight: 600;
	text-decoration: none;
}

.itm-event-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.75rem 0 0.85rem;
}

.itm-event-title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.4rem);
	line-height: 1.08;
	color: #fff;
}

.itm-event-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1.25rem;
	margin-top: 0.85rem;
	font-weight: 600;
}

.itm-event-meta-row i {
	margin-right: 0.35rem;
	opacity: 0.9;
}

.itm-event-countdown {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	font-weight: 800;
}

.itm-event-countdown span {
	min-width: 4.25rem;
	padding: 0.55rem 0.65rem;
	border-radius: 12px;
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.18);
	text-align: center;
	font-size: 0.85rem;
}

.itm-event-countdown b {
	display: block;
	font-size: 1.25rem;
}

.itm-event-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 1.15rem;
}

.itm-event-hero-actions .btn-ghost {
	background: rgba(255,255,255,0.1);
	border-color: rgba(255,255,255,0.35);
	color: #fff;
}

.itm-event-hero-actions [aria-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.itm-event-rsvp-count {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.18);
	font-weight: 700;
	font-size: 0.85rem;
	color: #fff;
}

/* Attendees */
.itm-event-attendees {
	margin: 0 0 1.75rem;
}

.itm-event-attendees h2 {
	margin: 0 0 0.85rem;
}

.itm-event-attendees-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 0.85rem;
}

.itm-event-attendees-grid li {
	text-align: center;
}

.itm-event-attendees-grid a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	color: inherit;
	text-decoration: none;
}

.itm-event-attendees-grid img,
.itm-event-attendees-grid .avatar-fallback {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--itm-accent, #52525b);
}

.itm-event-attendees-grid span:last-child {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--itm-text-muted);
	max-width: 96px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.itm-event-layout {
	width: min(var(--itm-content-width, 1200px), calc(100% - 2rem));
	margin: 0 auto;
	padding: 1.75rem 0 2.5rem;
}

.itm-event-lead {
	font-size: 1.15rem;
	color: var(--itm-text-muted);
	margin: 0 0 1rem;
}

.itm-event-content {
	line-height: 1.7;
	margin-bottom: 1.75rem;
}

.itm-event-map-section h2,
.itm-events-related h2 {
	margin: 0 0 0.75rem;
}

.itm-event-map-address {
	margin: 0 0 0.75rem;
	color: var(--itm-text-muted);
}

.itm-event-map-directions {
	margin: 0.65rem 0 0;
}

.itm-events-related {
	width: min(var(--itm-content-width, 1200px), calc(100% - 2rem));
	margin: 0 auto 2.5rem;
}

.itm-events-past {
	margin-top: 2.5rem;
}

body.itm-events-surface .site-main {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

@media (max-width: 720px) {
	.itm-events-month__day {
		min-height: 64px;
	}
	.itm-events-list a {
		grid-template-columns: 72px 1fr;
	}
	.itm-events-list img,
	.itm-events-list__ph {
		width: 72px;
		height: 56px;
	}
	.itm-event-attendees-grid {
		grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
	}
	.itm-event-attendees-grid img,
	.itm-event-attendees-grid .avatar-fallback {
		width: 48px;
		height: 48px;
	}
}
