/*
 * Deppeler Courses — front end.
 *
 * Follows the deppeler.ch design: Muller type, burgundy titles, red accents,
 * soft-shadow cards with 3px corners, script section titles (Better Friend).
 * The fonts are the ones the site already loads; nothing external is loaded here.
 *
 * Override on :root or .dc-root:
 *   --dc-accent (red)   --dc-title (burgundy)   --dc-button (petrol)
 *   --dc-text  --dc-muted  --dc-border  --dc-radius  --dc-gap  --dc-font  --dc-script-font
 */

.dc-root {
	--_red: var(--dc-accent, #e0062f);
	--_title: var(--dc-title, #8f1f2c);
	--_button: var(--dc-button, #02435a);
	--_text: var(--dc-text, #3c3c3b);
	--_muted: var(--dc-muted, #777);
	--_bg: var(--dc-bg, #fff);
	--_soft: var(--dc-soft, #f5f5f5);
	--_line: var(--dc-border, #e5e5e5);
	--_radius: var(--dc-radius, 3px);
	--_gap: var(--dc-gap, 40px);
	--_font: var(--dc-font, Muller, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif);
	--_script: var(--dc-script-font, "Better Friend Regular", "Better Friend", "Brush Script MT", cursive);
	--_shadow: 0 0 10px rgba(0, 0, 0, 0.15);
	--_shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.18);
	font-family: var(--_font);
	color: var(--_text);
	box-sizing: border-box;
}

.dc-root *,
.dc-root *::before,
.dc-root *::after {
	box-sizing: inherit;
}

.dc-root [hidden] {
	display: none !important;
}

/* Neutralize theme content styles (Astra .entry-content lists/links). */
.dc-root ul.dc-tags,
.dc-root ul.dc-card__speakers {
	margin-left: 0;
	padding: 0;
	list-style: none;
}

.dc-root ul.dc-tags > li,
.dc-root ul.dc-card__speakers > li {
	margin: 0;
	padding: 0;
}

.dc-root .dc-card a.dc-card__link,
.dc-root a.dc-speaker-card,
.dc-root a.dc-btn {
	text-decoration: none;
	box-shadow: none;
}

.dc-icon {
	flex: none;
	vertical-align: -0.15em;
}

/* ---------- Script section title ("Events", "Speakers"…) ---------- */

.dc-root .dc-script-title {
	margin: 0 0 28px;
	font-family: var(--_script);
	font-size: clamp(3rem, 2.2rem + 3vw, 4.75rem);
	font-weight: 400;
	line-height: 1.1;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	color: #000;
}

/* ---------- Specialty "D" marker ---------- */

.dc-d {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 12px;
	border-radius: 0 6px 6px 0;
	background: var(--dc-d, var(--_red));
}

.dc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0 0 14px;
}

.dc-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--_text);
}

/* ---------- Filters ---------- */

.dc-filters {
	margin: 0 0 24px;
}

.dc-filters__toggle {
	display: none;
}

.dc-filters__panel {
	display: grid;
	grid-template-columns: minmax(220px, 1.5fr) repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
	align-items: end;
	padding: 0 0 24px;
	border-bottom: 1px solid var(--_line);
}

.dc-filters .dc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.dc-root .dc-filters label {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--_muted);
}

.dc-root .dc-filters select,
.dc-root .dc-filters input[type="search"] {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	font-family: var(--_font);
	font-size: 15px;
	color: var(--_text);
	background-color: var(--_bg);
	border: 1px solid var(--_line);
	border-radius: var(--_radius);
	box-shadow: none;
	transition: border-color 0.15s ease;
}

.dc-root .dc-filters select,
.dc-root .dc-sort select {
	padding-right: 36px;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23777' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	text-overflow: ellipsis;
	cursor: pointer;
}

.dc-root .dc-filters select:hover,
.dc-root .dc-filters input[type="search"]:hover {
	border-color: #c9c9c9;
}

.dc-search {
	position: relative;
	display: block;
}

.dc-search .dc-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	color: var(--_muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.dc-root .dc-filters .dc-search input[type="search"] {
	padding-left: 40px;
}

.dc-root .dc-filters select:focus-visible,
.dc-root .dc-filters input:focus-visible,
.dc-root .dc-sort select:focus-visible {
	border-color: var(--_button);
	outline: 2px solid rgba(2, 67, 90, 0.25);
	outline-offset: 0;
}

.dc-root a:focus-visible,
.dc-root button:focus-visible,
.dc-root summary:focus-visible {
	outline: 2px solid var(--_button);
	outline-offset: 3px;
}

.dc-results {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin: 0 0 32px;
	font-size: 14px;
}

.dc-results__right {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 24px;
}

.dc-root p.dc-results__count {
	margin: 0;
	color: var(--_muted);
}

.dc-root .dc-results__reset {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--_red);
}

.dc-sort {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.dc-root .dc-sort label {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--_muted);
}

.dc-root .dc-sort select {
	height: 38px;
	margin: 0;
	padding-left: 12px;
	font-family: var(--_font);
	font-size: 14px;
	color: var(--_text);
	background-color: var(--_bg);
	border: 1px solid var(--_line);
	border-radius: var(--_radius);
}

/* ---------- Grid & cards ---------- */

.dc-grid {
	display: grid;
	grid-template-columns: repeat(var(--dc-cols, 3), minmax(0, 1fr));
	gap: var(--_gap);
	margin: 0;
}

.dc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--_bg);
	border-radius: var(--_radius);
	box-shadow: var(--_shadow);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.dc-card:hover,
.dc-card:focus-within {
	box-shadow: var(--_shadow-hover);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.dc-card,
	.dc-card:hover,
	.dc-card:focus-within {
		transform: none;
		transition: none;
	}
}

.dc-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--_soft);
}

.dc-root .dc-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.dc-card:hover .dc-card__img {
	transform: scale(1.04);
}

.dc-card__img--empty {
	background: var(--_soft);
}

.dc-date {
	position: absolute;
	top: 20px;
	left: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 60px;
	padding: 8px 12px 7px;
	line-height: 1;
	text-align: center;
	background: var(--_bg);
	border-radius: var(--_radius);
}

.dc-date__day {
	font-size: 24px;
	font-weight: 500;
	white-space: nowrap;
	color: var(--_title);
}

.dc-date__month {
	margin-top: 5px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--_red);
}

/* Same pill as the category badges on deppeler.ch. */
.dc-badge {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
	background: var(--_red);
	border-radius: 999px;
}

.dc-badge--full {
	background: var(--_title);
}

.dc-badge--cancelled {
	background: var(--_muted);
}

.dc-card--cancelled .dc-card__img,
.dc-card--past .dc-card__img {
	filter: grayscale(0.9);
	opacity: 0.85;
}

.dc-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 32px 36px 34px;
}

.dc-root .dc-card__title {
	display: -webkit-box;
	margin: 0 0 14px;
	overflow: hidden;
	font-family: var(--_font);
	font-size: 21px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
	-webkit-line-clamp: var(--dc-title-lines, 3);
	-webkit-box-orient: vertical;
	color: var(--_title);
}

.dc-root .dc-card__link {
	color: inherit;
}

/* Whole card clickable. */
.dc-card__link::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
}

.dc-root .dc-card__date,
.dc-root .dc-card__where {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--_muted);
}

.dc-root .dc-card__date {
	font-weight: 500;
	color: var(--_text);
}

.dc-card__speakers {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 18px 0 0;
}

.dc-card__speakers li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--_text);
}

.dc-avatar,
.dc-root img.dc-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 30px;
	height: 30px;
	object-fit: cover;
	font-size: 12px;
	font-weight: 500;
	color: var(--_muted);
	background: var(--_soft);
	border-radius: 50%;
}

.dc-avatar--lg,
.dc-root img.dc-avatar--lg {
	width: 64px;
	height: 64px;
}

.dc-root .dc-card__meta {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--_muted);
}

/* "VIEW COURSE", like "READ MORE" on the homepage. */
.dc-card__more {
	margin-top: auto;
	padding-top: 24px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--_red);
}

/* ---------- Empty state & past ---------- */

.dc-empty {
	padding: 56px 24px;
	text-align: center;
	background: var(--_soft);
	border-radius: var(--_radius);
}

.dc-root .dc-empty__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 500;
	color: var(--_title);
}

.dc-root .dc-empty a {
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--_red);
}

.dc-past {
	margin-top: calc(var(--_gap) * 1.5);
	padding-top: 32px;
	border-top: 1px solid var(--_line);
}

.dc-past summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: var(--_gap);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--_red);
	cursor: pointer;
}

/* ---------- Buttons & links ---------- */

/* Same as the site's buttons ("Add to cart"). */
.dc-root .dc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 14px 24px;
	font-family: var(--_font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	color: #fff;
	background: var(--_button);
	border: 0;
	border-radius: 2px;
	transition: background-color 0.15s ease;
}

.dc-root .dc-btn:hover,
.dc-root .dc-btn:focus {
	color: #fff;
	background: #01303f;
}

.dc-root .dc-btn--block {
	display: flex;
	width: 100%;
}

.dc-root .dc-btn--disabled,
.dc-root .dc-btn--disabled:hover {
	color: var(--_muted);
	background: var(--_soft);
	cursor: not-allowed;
}

.dc-root .dc-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--_red);
}

.dc-root .dc-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Single course ---------- */

/* Page wrapper (theme layout untouched). */
.dc-root.dc-single {
	width: 100%;
	padding: 48px 0 80px;
}

/* Neutralize theme article boxes (e.g. Astra "separate container" padding/background). */
.dc-root .dc-container > article.dc-course,
.dc-root .dc-container > article.dc-speaker {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* Same box as the site's Elementor sections: 1140px centred, 10px inside. */
.dc-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--dc-container, 1140px);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--dc-gutter, 10px);
	padding-left: var(--dc-gutter, 10px);
}

.dc-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
	margin-bottom: 64px;
}

.dc-hero__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--_soft);
	border-radius: var(--_radius);
}

.dc-root .dc-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.dc-root .dc-hero__title {
	margin: 0 0 20px;
	font-family: var(--_font);
	font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.75rem);
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
	color: var(--_title);
}

.dc-root .dc-hero__when,
.dc-root .dc-hero__where {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 17px;
	color: var(--_text);
}

.dc-hero__when .dc-icon,
.dc-hero__where .dc-icon {
	color: var(--_red);
}

.dc-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 64px;
	align-items: start;
}

.dc-single__aside {
	position: sticky;
	top: 32px;
}

.dc-panel {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px 30px 30px;
	background: var(--_bg);
	border-radius: var(--_radius);
	box-shadow: var(--_shadow);
}

.dc-details {
	margin: 0;
}

.dc-details > div {
	display: grid;
	grid-template-columns: 100px minmax(0, 1fr);
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--_line);
}

.dc-details > div:last-child {
	border-bottom: 0;
}

.dc-root .dc-details dt {
	margin: 0;
	overflow-wrap: anywhere;
	hyphens: auto;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.9;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--_muted);
}

.dc-root .dc-details dd {
	margin: 0;
	font-size: 15px;
	color: var(--_text);
}

.dc-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.dc-status::before {
	width: 8px;
	height: 8px;
	content: "";
	background: #3a9a5b;
	border-radius: 50%;
}

.dc-status--few::before {
	background: var(--_red);
}

.dc-status--full::before,
.dc-status--cancelled::before {
	background: var(--_muted);
}

.dc-ics {
	justify-content: center;
}

.dc-content {
	font-size: 16px;
	line-height: 1.75;
}

.dc-section-block {
	margin-top: 72px;
}

.dc-root .dc-h2 {
	margin: 0 0 28px;
	font-family: var(--_script);
	font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	font-weight: 400;
	line-height: 1.1;
	text-transform: none;
	color: #000;
}

.dc-related .dc-h2 {
	text-align: center;
}

.dc-speaker-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.dc-root .dc-speaker-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	color: var(--_text);
	background: var(--_bg);
	border-radius: var(--_radius);
	box-shadow: var(--_shadow);
	transition: box-shadow 0.25s ease;
}

.dc-root .dc-speaker-card:hover {
	box-shadow: var(--_shadow-hover);
}

.dc-speaker-card__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.dc-speaker-card__name {
	font-size: 17px;
	font-weight: 500;
	color: var(--_title);
}

.dc-speaker-card__spec {
	font-size: 14px;
	color: var(--_muted);
}

/* ---------- Speaker page ---------- */

.dc-speaker__head {
	display: flex;
	align-items: center;
	gap: 40px;
	margin-bottom: 40px;
}

.dc-root img.dc-speaker__img {
	flex: none;
	width: 180px;
	height: 180px;
	object-fit: cover;
	border-radius: 50%;
}

.dc-root .dc-speaker__spec {
	margin: -8px 0 14px;
	font-size: 17px;
	color: var(--_muted);
}

.dc-speaker__links {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
}

.dc-archive__head {
	margin-bottom: 24px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.dc-root {
		--_gap: var(--dc-gap, 28px);
	}

	.dc-grid {
		grid-template-columns: repeat(min(var(--dc-cols, 3), 2), minmax(0, 1fr));
	}
}

@media (max-width: 921px) {
	.dc-hero,
	.dc-single__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.dc-single__aside {
		position: static;
		order: -1;
	}
}

@media (max-width: 767px) {
	.dc-root {
		--_gap: var(--dc-gap, 24px);
	}

	.dc-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.dc-card__body {
		padding: 26px 26px 28px;
	}

	.dc-root .dc-filters__toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 46px;
		padding: 0 18px;
		font-family: var(--_font);
		font-size: 15px;
		font-weight: 500;
		color: var(--_text);
		background: var(--_bg);
		border: 1px solid var(--_line);
		border-radius: var(--_radius);
		cursor: pointer;
	}

	.dc-root .dc-filters__toggle:hover,
	.dc-root .dc-filters__toggle:focus,
	.dc-root .dc-filters.is-open .dc-filters__toggle {
		color: var(--_text);
		background: var(--_soft);
		border-color: var(--_line);
	}

	.dc-filters__active {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		font-size: 12px;
		color: #fff;
		background: var(--_red);
		border-radius: 999px;
	}

	.dc-filters__panel {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 16px;
	}

	/* Collapsed by default once JS is running. */
	.dc-js .dc-filters__panel {
		display: none;
	}

	.dc-js .dc-filters.is-open .dc-filters__panel {
		display: grid;
	}

	.dc-results {
		margin-bottom: 24px;
	}

	.dc-root.dc-single {
		padding-top: 24px;
	}

	.dc-speaker__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.dc-root img.dc-speaker__img {
		width: 128px;
		height: 128px;
	}
}

@media (min-width: 768px) {
	.dc-filters__active {
		display: none;
	}
}
