/*
 * Macan 4 campaign — styles for this page only.
 *
 * Every rule is scoped to .m4c or uses an m4c-* class, so this file only
 * reaches the Macan 4 Campaign template. main.css and additional.css still
 * style the hero (.page-header) and the CF7 offer form (.tc-form).
 *
 * --m4c-accent is set inline from content.php (#1E304B, or #3C1A22 with ?accent=2).
 */

.m4c {
	--m4c-accent: #1E304B;
	--m4c-on-accent: #ffffff;
}

/* ---------- Intro: accent-coloured bullets ---------- */
.m4c .m4c-intro .simple-text-block-content li::before {
	background-color: var(--m4c-accent);
}
.m4c .m4c-intro__eyebrow {
	margin-bottom: 1.5rem;
}

/* ---------- Detailed equipment accordion ---------- */
.m4c-specs {
	max-width: 100%;
	background: var(--m4c-accent);
	color: var(--m4c-on-accent);
	padding-top: 40px;
	padding-bottom: 40px;
}
.m4c-specs .block-title {
	padding: 0;
}
.m4c-specs .block-title h2 {
	color: var(--m4c-on-accent);
}
.m4c-specs__accordion {
	margin-top: 18px;
}
.m4c-specs__item {
	border-top: 1px solid var(--m4c-on-accent);
}
.m4c-specs__item:last-child {
	border-bottom: 1px solid var(--m4c-on-accent);
}
.m4c-specs__header {
	width: 100%;
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	color: var(--m4c-on-accent);
	font: inherit;
}
.m4c-specs__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}
.m4c-specs__icon-mask {
	width: 28px;
	height: 28px;
	display: block;
	background-color: var(--m4c-on-accent);
	-webkit-mask: var(--icon-url) no-repeat center;
	mask: var(--icon-url) no-repeat center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.m4c-specs__title {
	font-weight: 600;
	overflow-wrap: break-word;
	min-width: 0;
}
.m4c-specs__toggle {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	font-size: 22px;
	line-height: 1;
}
.m4c-specs__toggle-minus,
.m4c-specs__item.is-open .m4c-specs__toggle-plus {
	display: none;
}
.m4c-specs__item.is-open .m4c-specs__toggle-minus {
	display: inline;
}
.m4c-specs__body {
	display: none;
	padding: 0 0 14px 56px;
}
.m4c-specs__item.is-open .m4c-specs__body {
	display: block;
}
.m4c-specs__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.m4c-specs__list li {
	margin: 6px 0;
	line-height: 1.5;
}
@media (max-width: 768px) {
	.m4c-specs__header {
		grid-template-columns: 36px 1fr 36px;
	}
	.m4c-specs__body {
		padding-left: 48px;
	}
}

/* ---------- Gallery carousel and lightbox ---------- */
.m4c-gallery {
	background: var(--m4c-accent);
	padding-top: 40px;
	padding-bottom: 40px;
}
.m4c-gallery__inner {
	position: relative;
	display: flex;
	align-items: center;
}
.m4c-gallery__swiper {
	flex: 1;
	overflow: hidden;
}
.m4c-gallery__slide {
	height: 140px;
	overflow: hidden;
	display: block;
}
.m4c-gallery__thumb {
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.m4c-gallery__img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}
.m4c-gallery__arrow {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	opacity: 0.9;
}
.m4c-gallery__arrow:hover {
	opacity: 1;
}
.m4c-gallery__arrow::before,
.m4c-gallery__lightbox-nav::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--m4c-on-accent);
	-webkit-mask: var(--m4c-arrow-left) no-repeat center;
	mask: var(--m4c-arrow-left) no-repeat center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.m4c-gallery__arrow--right::before,
.m4c-gallery__lightbox-nav--right::before {
	-webkit-mask-image: var(--m4c-arrow-right);
	mask-image: var(--m4c-arrow-right);
}

.m4c-gallery__lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 150ms ease;
}
.m4c-gallery__lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.m4c-gallery__lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
}
.m4c-gallery__lightbox-dialog {
	position: relative;
	width: 100%;
	height: 100svh;
	display: grid;
	place-items: center;
	padding: 24px;
	box-sizing: border-box;
}
.m4c-gallery__lightbox-stage {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 48px;
	align-items: center;
	gap: 12px;
	width: min(1200px, calc(100vw - 144px));
}
.m4c-gallery__lightbox-swiper {
	width: 100%;
	overflow: hidden;
}
.m4c-gallery__lightbox-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}
.m4c-gallery__lightbox-img {
	max-width: 100%;
	max-height: 85svh;
	object-fit: contain;
}
.m4c-gallery__lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border: 0;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 26px;
	cursor: pointer;
	z-index: 1;
}
.m4c-gallery__lightbox-nav {
	width: 48px;
	height: 48px;
	border: 0;
	background: rgba(255, 255, 255, 0.15);
	cursor: pointer;
}
.m4c-gallery__lightbox-nav::before {
	background-color: #fff;
}
body.m4c-lock {
	overflow: hidden;
}
@media (max-width: 768px) {
	.m4c-gallery__arrow {
		flex-basis: 20px;
		width: 20px;
		height: 20px;
	}
	.m4c-gallery__slide {
		height: 90px;
	}
	.m4c-gallery__lightbox-nav {
		display: none;
	}
	.m4c-gallery__lightbox-stage {
		grid-template-columns: 1fr;
		width: 100%;
	}
	.m4c-gallery__lightbox-dialog {
		padding: 12px;
	}
	.m4c-gallery__lightbox-img {
		max-width: 100vw;
		max-height: 90svh;
	}
}

/* ---------- Offer and lead form (layout comes from the global .tc-form) ---------- */
/* Make the image box match car.png's trimmed aspect ratio (1600×529). */
.m4c-offer .tc-form__taycan-img-wrapper {
	padding-top: 33.1%;
}
.m4c-offer .m4c-offer__desc {
	font-size: 1.2em;
}
.m4c-offer .m4c-offer__desc p {
	margin-bottom: 1rem;
}

/* ---------- Closing panel: image beside text ---------- */
.m4c-closing {
	display: grid;
	grid-template-columns: 1.5fr 1.2fr;
	background: #e6e6e6;
	max-width: 100%;
}
.m4c-closing__image {
	position: relative;
	overflow: hidden;
	min-height: 360px;
}
.m4c-closing__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.m4c-closing__panel {
	background: #ffffff;
	color: #000000;
	display: flex;
	align-items: center;
	padding: 56px 90px 56px 56px;
}
.m4c-closing__content h2 {
	margin: 0 0 18px 0;
	font-size: 44px;
	line-height: 1.1;
	font-weight: 700;
}
.m4c-closing__content p {
	margin: 0;
	max-width: 520px;
	font-size: 18px;
	line-height: 1.7;
}
.m4c-closing__content h2,
.m4c-closing__content p {
	overflow-wrap: break-word;
	min-width: 0;
}
@media (max-width: 900px) {
	.m4c-closing {
		grid-template-columns: 1fr;
	}
	.m4c-closing__image {
		min-height: 0;
	}
	.m4c-closing__image img {
		height: auto;
	}
	.m4c-closing__panel {
		padding: 28px 20px;
	}
	.m4c-closing__content h2 {
		font-size: 32px;
	}
}
