/**
 * Mindfulness in Museums – Training Portal  v1.0.1
 * Layout & structure — kleuren volledig aanpasbaar via Elementor Style-tabblad.
 */

/* ── Login notice (niet-ingelogde gebruikers) ────────────────────────────── */
.mim-login-notice {
	padding: 16px 20px;
	border-radius: 8px;
	font-style: italic;
	opacity: 0.8;
}
.mim-login-notice a {
	font-weight: 600;
	text-decoration: underline;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
.mim-training-portal *,
.mim-training-portal *::before,
.mim-training-portal *::after { box-sizing: border-box; }

.mim-training-portal ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mim-training-portal p { margin: 0; }

/* ── Portal wrapper ──────────────────────────────────────────────────────── */
.mim-training-portal { width: 100%; }

/* ── Portal header ───────────────────────────────────────────────────────── */
.mim-portal-header { margin-bottom: 40px; }

.mim-portal-title {
	margin: 0 0 10px;
	padding: 0;
	line-height: 1.2;
}

.mim-portal-subtitle {
	margin: 0;
	padding: 0;
	line-height: 1.6;
}

/* ── Accordion stack ─────────────────────────────────────────────────────── */
.mim-weeks-accordion {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ── Week item ───────────────────────────────────────────────────────────── */
.mim-week-item {
	/* overflow hidden op het item zelf — border-radius afgedekt via Elementor */
}

/* ── Week header / accordion trigger ────────────────────────────────────── */
.mim-week-header {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: none;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	text-align: left;

	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	width: 100%;
	padding: 18px 24px;
	transition: background-color 0.2s ease;
}

.mim-week-header:focus {
	outline: none;
}

.mim-week-header:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
	border-radius: inherit;
}

/* ── Week badge ──────────────────────────────────────────────────────────── */
.mim-week-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	font-weight: 700;
	font-size: 0.8em;
	letter-spacing: 0.03em;
	flex-shrink: 0;
}

/* ── Week title ──────────────────────────────────────────────────────────── */
.mim-week-title-text {
	flex: 1;
	min-width: 0;
	font-weight: 500;
}

/* ── Week date ───────────────────────────────────────────────────────────── */
.mim-week-date {
	font-size: 0.85em;
	opacity: 0.65;
	white-space: nowrap;
}

/* ── Status badge ────────────────────────────────────────────────────────── */
.mim-week-status {
	display: inline-flex;
	align-items: center;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
	text-transform: uppercase;
}

/* ── Chevron icon ────────────────────────────────────────────────────────── */
.mim-week-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-left: auto;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mim-week-item.mim-active .mim-week-icon {
	transform: rotate(180deg);
}

/* ── Week content – CSS grid accordion animation ─────────────────────────── */
/*
 * Techniek: grid-template-rows van 0fr → 1fr.
 * 'display:grid' blijft altijd staan (ook op [hidden]) zodat
 * de transitie kan werken. visibility:hidden zorgt voor
 * screen-reader verberging terwijl de animatie loopt.
 */
.mim-week-content {
	display: grid;
	grid-template-rows: 1fr;
	overflow: hidden;
	transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0s 0s;
	visibility: visible;
}

.mim-week-content[hidden] {
	display: grid;               /* override HTML hidden */
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0s 0.35s; /* verberg pas na animatie */
}

.mim-week-content-inner {
	overflow: hidden;
	min-height: 0;
}

/* ── Week intro ──────────────────────────────────────────────────────────── */
.mim-week-intro {
	margin-bottom: 32px;
	line-height: 1.7;
}
.mim-week-intro > *:last-child { margin-bottom: 0; }

/* ── Upcoming / unavailable notice ──────────────────────────────────────── */
.mim-upcoming-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	font-style: italic;
	opacity: 0.7;
}
.mim-notice-icon {
	font-size: 1.2em;
	flex-shrink: 0;
}

/* ── Section layout ──────────────────────────────────────────────────────── */
.mim-section + .mim-section { margin-top: 36px; }

.mim-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0 0 12px;
	font-size: 0.95em;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border-bottom: 1px solid currentColor;
	opacity: 0.85; /* lichte visuele scheiding zonder vaste kleur */
}

.mim-section-icon {
	font-size: 1em;
	flex-shrink: 0;
	opacity: 1;
}

/* ── PDF kaartjes ────────────────────────────────────────────────────────── */
.mim-pdf-list {
	display: grid;
	grid-template-columns: 1fr;  /* Elementor override via NUMBER control */
	gap: 10px;
}

.mim-pdf-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	text-decoration: none;
	border-radius: 10px;
	transition: background-color 0.2s ease,
	            box-shadow       0.2s ease,
	            transform        0.18s cubic-bezier(0.4, 0, 0.2, 1),
	            color             0.2s ease;
	cursor: pointer;
	overflow: hidden;
}

.mim-pdf-card:hover { transform: translateY(-2px); }
.mim-pdf-card:active { transform: translateY(0); }

.mim-pdf-card__icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	opacity: 0.8;
	transition: opacity 0.2s ease;
}
.mim-pdf-card:hover .mim-pdf-card__icon { opacity: 1; }

.mim-pdf-card__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1;
}

.mim-pdf-card__name {
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mim-pdf-card__meta {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.5;
}

.mim-pdf-card__dl {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: auto;
	opacity: 0.35;
	transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mim-pdf-card:hover .mim-pdf-card__dl {
	opacity: 1;
	transform: translateY(3px);
}

/* ── Video's ──────────────────────────────────────────────────────────────── */
.mim-videos-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mim-video-title {
	margin: 0 0 8px;
	font-weight: 600;
	font-size: 0.95em;
}

/* Responsive 16:9 iframe embed */
.mim-video-iframe-wrap {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	border-radius: 8px;
	overflow: hidden;
}
.mim-video-iframe-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Native video element */
.mim-video-native {
	display: block;
	width: 100%;
	border-radius: 8px;
}

/* Video link (externe URL zonder embed) */
.mim-video-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	text-decoration: none;
	font-weight: 500;
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.mim-video-link:hover { transform: translateX(3px); }

.mim-video-link__icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

/* ── Audio ────────────────────────────────────────────────────────────────── */
.mim-audio-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mim-audio-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mim-audio-title {
	font-weight: 600;
	font-size: 0.95em;
}

.mim-audio-wrap {
	border-radius: 8px;
	overflow: hidden;
}

.mim-audio-player {
	display: block;
	width: 100%;
	max-width: 600px;
}

/* ── Resources ────────────────────────────────────────────────────────────── */
.mim-resources-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mim-resource-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	text-decoration: none;
	font-weight: 400;
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
	line-height: 1.5;
}
.mim-resource-link:hover { transform: translateX(3px); }

.mim-resource-link__icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	opacity: 0.6;
	transition: opacity 0.2s ease;
}
.mim-resource-link:hover .mim-resource-link__icon { opacity: 1; }

/* ── Research ─────────────────────────────────────────────────────────────── */
.mim-research-content {
	line-height: 1.75;
}
.mim-research-content > *:last-child { margin-bottom: 0; }
.mim-research-content a { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.mim-week-header {
		gap: 8px 10px;
		padding: 14px 16px;
	}
	.mim-week-date {
		width: 100%;
		order: 10;
	}
	.mim-week-icon {
		margin-left: 0;
	}
	.mim-pdf-list {
		grid-template-columns: 1fr !important; /* altijd 1 kolom op mobiel */
	}
	.mim-week-content-inner {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
}

/* ── prefers-reduced-motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.mim-week-content,
	.mim-week-content[hidden],
	.mim-week-icon,
	.mim-pdf-card,
	.mim-video-link,
	.mim-resource-link,
	.mim-week-header {
		transition: none;
	}
}
