/* Homepage modules — podcast strip, events, news grid */

.itm-home-podcasts {
	--itm-home-podcasts-height-scale: 0.7;
	--itm-home-podcasts-fade: 0.65;
	position: relative;
	width: 100%;
	margin: 0 0 8px;
	padding: calc(10px + 26px * var(--itm-home-podcasts-height-scale)) 0 calc(8px + 18px * var(--itm-home-podcasts-height-scale));
	overflow: hidden;
	isolation: isolate;
}

.itm-home-podcasts--has-bg {
	color: #fff;
	background-color: var(--itm-bg, #f0f2f5);
	background-image: var(--itm-home-podcasts-bg-image);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.itm-home-podcasts--has-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: var(--itm-bg, #f0f2f5);
	opacity: var(--itm-home-podcasts-fade, 0.65);
}

.itm-home-podcasts__inner {
	position: relative;
	z-index: 2;
	width: 100%;
}

.itm-home-podcasts--has-bg .section-title,
.itm-home-podcasts--has-bg .itm-podcast-highlights-title,
.itm-home-podcasts--has-bg h2 {
	color: #fff;
	font-size: 1.125rem;
	margin: 0 0 14px;
}

.itm-podcast-scroll-wrap {
	position: relative;
	--itm-home-podcasts-edge: clamp(48px, 8vw, 110px);
}

.itm-podcast-scroll-wrap::before,
.itm-podcast-scroll-wrap::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 12px;
	width: var(--itm-home-podcasts-edge);
	pointer-events: none;
	z-index: 1;
}

.itm-podcast-scroll-wrap::before {
	left: 0;
	background: linear-gradient(to right, var(--itm-bg, #f0f2f5), transparent);
}

.itm-podcast-scroll-wrap::after {
	right: 0;
	background: linear-gradient(to left, var(--itm-bg, #f0f2f5), transparent);
}

.itm-podcast-highlights.itm-layout-scroll {
	--itm-podcast-visible: 5;
	--itm-podcast-gap: 16px;
	display: flex;
	flex-wrap: nowrap;
	gap: var(--itm-podcast-gap);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	padding: 2px var(--itm-home-podcasts-edge) 10px;
	scroll-padding-inline: var(--itm-home-podcasts-edge);
}

.itm-layout-scroll .itm-podcast-card {
	display: flex;
	flex-direction: column;
	flex: 0 0 calc((100% - (var(--itm-podcast-visible) - 1) * var(--itm-podcast-gap)) / var(--itm-podcast-visible));
	width: calc((100% - (var(--itm-podcast-visible) - 1) * var(--itm-podcast-gap)) / var(--itm-podcast-visible));
	min-width: 0;
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.itm-layout-scroll .itm-podcast-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(82, 82, 91, 0.12);
}

.itm-podcast-thumb {
	position: relative;
}

.itm-podcast-thumb-link {
	display: block;
}

.itm-podcast-thumb img,
.itm-podcast-thumb-fallback {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	background: linear-gradient(135deg, #1f2937, #111827);
}

.itm-podcast-thumb-label {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--itm-accent, #52525b);
}

.itm-podcast-thumb-label--latest {
	background: #111827;
}

.itm-play-trigger--thumb {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 3;
	text-decoration: none;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

.itm-play-trigger__circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.88);
	color: #fff;
}

.itm-layout-scroll .itm-podcast-card-link {
	display: flex;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

.itm-layout-scroll .itm-podcast-info {
	padding: 12px 14px 14px;
}

.itm-layout-scroll .itm-podcast-date {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--itm-accent, #52525b);
	margin-bottom: 6px;
}

.itm-layout-scroll .itm-podcast-title {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	color: var(--itm-heading, #111);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 900px) {
	.itm-podcast-highlights.itm-layout-scroll { --itm-podcast-visible: 3; }
}
@media (max-width: 560px) {
	.itm-podcast-highlights.itm-layout-scroll { --itm-podcast-visible: 2; --itm-podcast-gap: 12px; }
}

/* Upcoming events */
.itm-home-events {
	margin: 2.5rem 0;
}

.itm-home-events-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.itm-home-events-title {
	margin: 0;
	font-size: 1.35rem;
}

.itm-home-events-all {
	font-weight: 600;
	text-decoration: none;
	color: var(--itm-accent, #52525b);
	white-space: nowrap;
}

.itm-home-events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}

.itm-home-event-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
}

.itm-home-event-media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.itm-home-event-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.itm-home-event-card:hover .itm-home-event-media img {
	transform: scale(1.04);
}

.itm-home-event-body {
	padding: 1rem 1.1rem 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	flex: 1;
}

.itm-home-event-date {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--itm-accent, #52525b);
}

.itm-home-event-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.itm-home-event-title a {
	text-decoration: none;
	color: inherit;
}

.itm-home-event-location {
	margin: 0;
	font-size: 0.9rem;
	color: #666;
}

.itm-home-event-cta {
	margin-top: auto;
	padding-top: 0.65rem;
	font-weight: 700;
	font-size: 0.88rem;
	text-decoration: none;
	color: var(--itm-accent, #52525b);
}

/* Latest news grid */
.itm-latest-posts-title {
	margin: 0 0 1.25rem;
	font-size: 1.35rem;
}

.itm-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}

.itm-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.itm-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
	opacity: 1;
}

.itm-post-card__media {
	aspect-ratio: 16 / 10;
	background: #e5e7eb;
	overflow: hidden;
}

.itm-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itm-post-card__body {
	padding: 1rem 1.05rem 1.15rem;
	display: grid;
	gap: 0.4rem;
}

.itm-post-card__meta {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--itm-accent, #52525b);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.itm-post-card__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--itm-heading, #111);
}

.itm-post-card__excerpt {
	margin: 0;
	font-size: 0.92rem;
	color: var(--muted, #6b7280);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

body.has-itm-news-slider .hero {
	display: none;
}
