/* ==========================================================================
   HAC Referenzen – Head and Code GmbH
   Farben nach Brand Manual: Blauviolett #2e2382, Pink #e5007d, Gelb #ffdd00,
   Blauviolett-Tints #e8e6f4 / #bcb4da / #9184be, Grau #f6f6f6 / #ececec /
   #dadada / #626262, Gradient 45°, Schrift Montserrat.
   ========================================================================== */

.hac-ref {
	--hac-violet: #2e2382;
	--hac-violet-50: #9184be;
	--hac-violet-30: #bcb4da;
	--hac-violet-10: #e8e6f4;
	--hac-pink: #e5007d;
	--hac-yellow: #ffdd00;
	--hac-grey-05: #f6f6f6;
	--hac-grey-10: #ececec;
	--hac-grey-20: #dadada;
	--hac-grey-75: #626262;
	--hac-gradient: linear-gradient(45deg, #2e2382 0%, #e5007d 100%);
	--hac-radius: 4px;
	--hac-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

	font-family: var(--hac-font);
	color: var(--hac-grey-75);
	-webkit-font-smoothing: antialiased;
}

.hac-ref *,
.hac-ref *::before,
.hac-ref *::after {
	box-sizing: border-box;
}

.hac-ref-inner {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 40px);
}

/* --- Kicker & Labels ------------------------------------------------------ */

.hac-ref-kicker {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hac-pink);
}

.hac-ref-label {
	margin: 0 0 18px;
	padding-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hac-grey-75);
	border-bottom: 3px solid var(--hac-yellow);
	display: inline-block;
	min-width: 140px;
}

/* --- Archiv-Hero --------------------------------------------------------- */

.hac-ref-hero {
	padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
	background: var(--hac-violet-10);
}

.hac-ref-hero__title {
	margin: 0 0 18px;
	font-family: var(--hac-font);
	font-size: clamp(40px, 7vw, 86px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	background: var(--hac-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.hac-ref-hero__lead {
	max-width: 58ch;
	font-size: clamp(16px, 1.2vw, 18px);
	line-height: 1.65;
	color: var(--hac-grey-75);
}

.hac-ref-hero__lead p {
	margin: 0 0 12px;
}

.hac-ref-hero__lead p:last-child {
	margin-bottom: 0;
}

/* --- Filter -------------------------------------------------------------- */

.hac-ref-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: clamp(24px, 3vw, 36px);
}

.hac-ref-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	font-family: var(--hac-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--hac-violet);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--hac-grey-20);
	border-radius: var(--hac-radius);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hac-ref-pill:hover {
	border-color: var(--hac-violet);
}

.hac-ref-pill.is-active,
.hac-ref-pill[aria-pressed="true"] {
	color: #fff;
	background: var(--hac-violet);
	border-color: var(--hac-violet);
}

.hac-ref-pill.is-active:hover,
.hac-ref-pill.is-active:focus,
.hac-ref-pill.is-active:active {
	color: #fff !important;
}

.hac-ref-pill:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(229, 0, 125, 0.24);
}

.hac-ref-pill__count {
	font-size: 13px;
	font-weight: 700;
	color: var(--hac-grey-75);
}

.hac-ref-pill.is-active .hac-ref-pill__count {
	color: var(--hac-yellow);
}

/* --- Kachelraster -------------------------------------------------------- */

.hac-ref-body {
	padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 96px);
	background: var(--hac-grey-05);
}

.hac-ref-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(20px, 2vw, 28px);
}

@media (max-width: 1100px) {
	.hac-ref-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.hac-ref-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.hac-ref-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.hac-ref-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--hac-grey-10);
	border-radius: var(--hac-radius);
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.hac-ref-card:hover {
	transform: translateY(-4px);
	border-color: var(--hac-violet-30);
	box-shadow: 0 20px 40px rgba(46, 35, 130, 0.12);
}

.hac-ref-card[hidden] {
	display: none;
}

.hac-ref-card__media {
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	background: var(--hac-grey-10);
}

.hac-ref-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.4s ease;
}

.hac-ref-card:hover .hac-ref-card__img {
	transform: scale(1.03);
}

.hac-ref-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(45deg, #f6f6f6 0 10px, #ececec 10px 20px);
}

.hac-ref-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px 22px 22px;
}

.hac-ref-card__cat {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hac-pink);
}

.hac-ref-card__title {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--hac-violet);
}

.hac-ref-card__title a {
	color: inherit;
	text-decoration: none;
}

.hac-ref-card__title a:hover {
	color: var(--hac-pink);
}

.hac-ref-card__desc {
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--hac-grey-75);
}

.hac-ref-card__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	font-size: 14px;
	font-weight: 700;
	color: var(--hac-violet);
}

.hac-ref-card__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--hac-violet);
	transition: background 0.25s ease, transform 0.25s ease;
}

.hac-ref-card__arrow svg {
	width: 14px;
	height: 14px;
	fill: #fff;
}

.hac-ref-card:hover .hac-ref-card__arrow {
	background: var(--hac-pink);
	transform: translateX(3px);
}

.hac-ref-empty {
	margin: 40px 0;
	font-size: 16px;
	color: var(--hac-grey-75);
}

.hac-ref-pagination {
	margin-top: 48px;
}

.hac-ref-pagination .page-numbers {
	display: inline-block;
	margin-right: 6px;
	padding: 10px 16px;
	font-weight: 600;
	color: var(--hac-violet);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--hac-grey-20);
	border-radius: var(--hac-radius);
}

.hac-ref-pagination .page-numbers.current {
	color: #fff;
	background: var(--hac-violet);
	border-color: var(--hac-violet);
}

/* --- Detailseite --------------------------------------------------------- */

.hac-ref-single {
	padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 8vw, 104px);
	background: var(--hac-grey-05);
}

.hac-ref-back {
	margin: 0 0 22px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.hac-ref-back a {
	color: var(--hac-grey-75);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hac-ref-back a:hover {
	color: var(--hac-pink);
}

.hac-ref-badge {
	margin: 0 0 14px;
}

.hac-ref-badge a {
	display: inline-block;
	padding: 7px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	background: var(--hac-pink);
	border-radius: var(--hac-radius);
	transition: background 0.2s ease;
}

.hac-ref-badge a:hover {
	color: #fff !important;
	background: var(--hac-violet);
}

.hac-ref-single__title {
	margin: 0 0 10px;
	font-size: clamp(36px, 5.5vw, 68px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	color: var(--hac-violet);
}

.hac-ref-single__subtitle {
	max-width: 34ch;
	margin: 0 0 clamp(28px, 4vw, 44px);
	font-size: clamp(19px, 2vw, 25px);
	font-weight: 700;
	line-height: 1.28;
	color: #1c1c1c;
}

.hac-ref-shot {
	margin: 0 0 clamp(32px, 4vw, 56px);
	border: 1px solid var(--hac-grey-10);
	border-radius: var(--hac-radius);
	overflow: hidden;
	background: #fff;
}

.hac-ref-shot__img {
	display: block;
	width: 100%;
	height: auto;
}

/* Kurzbeschreibung + Faktenbox */

.hac-ref-details {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
	margin-bottom: clamp(40px, 6vw, 80px);
}

@media (max-width: 860px) {
	.hac-ref-details {
		grid-template-columns: minmax(0, 1fr);
	}
}

.hac-ref-text {
	max-width: 52ch;
	font-size: 17px;
	line-height: 1.7;
	color: var(--hac-violet);
}

.hac-ref-text p {
	margin: 0 0 14px;
}

.hac-ref-text p:last-child {
	margin-bottom: 0;
}

.hac-ref-text--content {
	margin-top: 18px;
	color: var(--hac-grey-75);
}

.hac-ref-cta {
	margin: 28px 0 0;
}

.hac-ref-button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 15px 26px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	background: var(--hac-gradient);
	border-radius: 999px;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.hac-ref-button:hover,
.hac-ref-button:focus,
.hac-ref-button:active,
.hac-ref-button:visited {
	color: #fff !important;
}

.hac-ref-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(229, 0, 125, 0.26);
}

.hac-ref-button__arrow {
	width: 18px;
	height: 18px;
	fill: #fff;
	transition: transform 0.25s ease;
}

.hac-ref-button:hover .hac-ref-button__arrow {
	transform: translateX(4px);
}

.hac-ref-facts {
	padding: clamp(22px, 2.5vw, 32px);
	background: #fff;
	border: 1px solid var(--hac-grey-10);
	border-radius: var(--hac-radius);
}

.hac-ref-facts dl {
	margin: 0;
}

.hac-ref-facts dt {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hac-grey-75);
}

.hac-ref-facts dd {
	margin: 0 0 22px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--hac-violet);
}

.hac-ref-facts dd:last-child {
	margin-bottom: 0;
}

/* Galerie */

.hac-ref-gallery-section {
	margin-bottom: clamp(40px, 6vw, 80px);
}

.hac-ref-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 26px);
}

@media (max-width: 860px) {
	.hac-ref-gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.hac-ref-gallery-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.hac-ref-gallery-item {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 11;
	background: repeating-linear-gradient(45deg, #f6f6f6 0 10px, #ececec 10px 20px);
	border: 1px solid var(--hac-grey-10);
	border-radius: var(--hac-radius);
	overflow: hidden;
}

.hac-ref-gallery-item__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.hac-ref-gallery-item__label {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	color: var(--hac-violet);
	background: rgba(255, 255, 255, 0.94);
	border-radius: 3px;
}

/* Weitere Referenzen */

.hac-ref-related {
	padding-top: clamp(32px, 4vw, 48px);
	border-top: 1px solid var(--hac-grey-20);
}

.hac-ref-related__title {
	margin: 0 0 22px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hac-grey-75);
}

.hac-ref-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 24px);
}

@media (max-width: 860px) {
	.hac-ref-related__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.hac-ref-related__item {
	display: block;
	padding: 22px 24px;
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--hac-grey-10);
	border-left: 3px solid transparent;
	border-radius: var(--hac-radius);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hac-ref-related__item:hover {
	transform: translateY(-3px);
	border-left-color: var(--hac-pink);
	box-shadow: 0 16px 34px rgba(46, 35, 130, 0.1);
}

.hac-ref-related__name {
	display: block;
	margin-bottom: 6px;
	font-size: 19px;
	font-weight: 700;
	color: var(--hac-violet);
}

.hac-ref-related__desc {
	display: block;
	font-size: 15px;
	line-height: 1.5;
	color: var(--hac-grey-75);
}

/* --- Shortcode-Variante -------------------------------------------------- */

.hac-ref-shortcode {
	padding: clamp(24px, 4vw, 48px) 0;
}

@media (prefers-reduced-motion: reduce) {
	.hac-ref * {
		transition: none !important;
	}
}
