/* Wiederverwendbare Bausteine: Icons, Kontakt-Karten, Branchen-Grid, Tabellen, Hero/Parallax */

.text {
	max-width: 1100px;
	margin: 80px auto 100px;
	padding: 0 30px;
	display: block;
}

.text_full {
	max-width: 1440px;
	margin: 80px auto 100px;
	padding: 0 30px;
	display: block;
}

/* Zufällige Foto-Galerie (3-5 Bilder, siehe includes/photo-gallery.php) */

.photo-gallery {
	display: flex;
	height: 380px;
}

.photo-gallery-item {
	flex: 1;
	overflow: hidden;
}

.photo-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.full-height {
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.icon {
	width: 60px;
	fill: var(--color-primary);
	margin: 0 auto;
	height: auto;
	display: inline-block;
	font-size: 2.75rem;
	transition: transform .2s ease;
}

.quad {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	padding: 30px;
}

.quad a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #e6f0ff;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.8125rem;
	letter-spacing: .05em;
}

.quad a::after {
	content: "→";
	transition: transform .2s ease;
}

.quad a:hover {
	color: var(--color-white);
}

.quad a:hover::after {
	transform: translateX(4px);
}

.quad .icon {
	margin-bottom: 14px;
	display: block;
}

.border {
	border-bottom: 1px solid var(--color-border);
	border-right: 1px solid var(--color-border);
	transition: background-color .2s ease;
}

.border:hover {
	background-color: rgba(255, 255, 255, .05);
}

.border:hover .icon {
	transform: translateY(-4px);
}

.border img,
.border .branch {
	margin: 10px 20px;
	display: block;
}

.border .centering {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.branches {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
}

.border:nth-child(5n) {
	border-right: 0;
}

/* Kontakt-Karten (E-Mail / Adresse / Telefon) */

.contact-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 100px;
	margin: 0 auto;
}

.contact-link .icon {
	display: block;
	width: 36px;
	fill: var(--color-primary);
	color: var(--color-primary);
	transition: transform .2s ease;
}

.contact-info {
	display: block;
	line-height: 1.3;
	text-align: center;
}

.contact-text {
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 1px;
	color: var(--color-text);
}

.contact-link:hover .icon {
	transform: translateY(-4px);
}

/* Produkttabelle (Lieferprogramm) - CSS-Grid statt <table>, siehe responsive.css fuer die mobile Kartenansicht */

.products-caption {
	display: block;
	color: var(--color-white);
	font-family: 'Droid Serif', serif;
	font-style: italic;
	font-size: 1.875rem;
	line-height: 1.3;
	margin-bottom: 48px;
}

/* Haarlinien auf Blau: aus Weiß abgeleitet statt Grau */
.products-grid {
	--products-rule: rgba(255, 255, 255, .35);
	display: grid;
	grid-template-columns: 1.1fr 1.4fr 1.3fr 1.1fr 1fr;
	color: var(--color-white);
	text-align: left;
	font-size: 1.125rem;
	line-height: 1.55;
	font-variant-numeric: tabular-nums;
	border-bottom: 1px solid var(--products-rule);
}

.products-grid-head,
.products-din,
.products-row {
	display: contents;
}

.products-grid-head [role="columnheader"] {
	padding: 0 16px 14px;
	font-size: 0.8125rem;
	line-height: 1.125rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	border-bottom: 1px solid var(--color-white);
}

.products-grid-head [role="columnheader"]:first-child,
.products-row [role="cell"]:first-child {
	padding-left: 0;
}

.products-row [role="cell"] {
	padding: 0 16px 40px;
}

/* Verfahren als Zeilentitel */
.products-row [role="cell"]:first-child {
	font-weight: 700;
	font-size: 1.25rem;
}

.products-din [role="cell"] {
	grid-column: 1 / -1;
	padding: 28px 0 20px;
	font-family: 'Droid Serif', serif;
	font-style: italic;
	font-size: 0.9375rem;
}

/* Trennlinie vor jeder Werkstoffgruppe, außer der ersten direkt unter dem Tabellenkopf */
.products-din:not(:nth-child(2)) [role="cell"] {
	border-top: 1px solid var(--products-rule);
}

.products-din .block-label {
	background: var(--color-primary-dark);
	display: inline-block;
	padding: 5px 14px;
	border-radius: 90px;
}

.products-row .label {
	display: none;
	font-size: 0.8125rem;
	line-height: 1.125rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--color-white);
	opacity: .85;
	padding-bottom: 4px;
}

.contact-us {
	font-family: 'Droid Serif', serif;
	font-style: italic;
	font-size: 1.5rem;
	line-height: 1.4;
	text-align: center;
	color: var(--color-white);
	margin-top: 72px;
}

.contact-us-action {
	text-align: center;
	margin-top: 24px;
}

/* Heller Button für blaue Flächen */
.btn.btn-light {
	background: var(--color-white);
	color: var(--color-primary-dark);
}

.btn.btn-light:hover {
	background: var(--color-primary-dark);
	color: var(--color-white);
}

.bg-blue .btn.btn-light:focus-visible {
	outline-offset: 3px;
}

/* Unterseiten-Hero: einfacher, immer sichtbarer Streifen direkt unter dem Header (kein Parallax, kein JS nötig) */

.page-hero {
	position: relative;
	height: 480px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.page-hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: fadein 1.2s ease, scalein 1.2s ease;
}

.page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .35);
}

.page-hero-title {
	position: relative;
	z-index: 1;
	color: var(--color-white);
	text-align: center;
	text-transform: uppercase;
	font-size: 3.5rem;
	line-height: 1.1;
	letter-spacing: .06em;
	font-weight: 700;
	padding: 0 20px;
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

/* Hero-Bilder & Parallax-Reveal (Startseite) */

.hintergrundbild {
	position: relative;
	width: 100%;
	top: 0;
	left: 0;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: 50% 50%;
	overflow: hidden;
	display: block;
}

.hintergrundbild img {
	width: 100%;
}

@keyframes scalein {
	from { transform: scale(1.1); }
	to { transform: scale(1); }
}

@keyframes fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

.popup {
	opacity: 0;
	transform: translateY(32px) scale(.97);
	transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
}

.popup.visible {
	opacity: 1;
	transform: none;
}

.parallax {
	min-height: 400px;
}

.parallax .hintergrundbild img,
.parallax h1 {
	visibility: hidden;
}

.parallax.visible h1 {
	visibility: visible;
	animation: fadein 2s;
}

.parallax.visible .hintergrundbild {
	position: absolute;
}

.parallax.visible .hintergrundbild img {
	visibility: visible;
	animation: fadein 2s, scalein 2s;
}

/* Prozess-Schritte (Prototyp -> Vorserie -> Serie): hellblaue Boxen */
.process-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin: 40px 0 48px;
}

.process-step {
	padding: 32px 28px;
	background: var(--color-primary-light);
	border-radius: 8px;
	color: var(--color-text-strong);
}

.process-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-primary);
	color: var(--color-white);
	font-weight: 700;
	font-size: 1.125rem;
	margin-bottom: 20px;
}

.process-step .heading-sm {
	margin-top: 0;
}

.process-step p {
	font-size: 1.125rem;
	line-height: 1.55;
}

.process-step p:last-child {
	margin-bottom: 0;
}

/* Prüf-Karten (Werkstoff / Bauteil) */
.test-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	margin: 24px 0 36px;
}

.test-card {
	background: var(--color-bg);
	border-radius: 8px;
	padding: 32px 32px 28px;
	font-size: 1.125rem;
	line-height: 1.55;
	color: var(--color-dark);
}

.test-card .heading-xs:first-child {
	margin-top: 0;
}

.test-card ul:last-child {
	margin-bottom: 0;
}

/* Allgemeiner Button (z.B. Google-Maps-Link) */
.btn {
	display: inline-block;
	background: var(--color-primary-dark);
	color: var(--color-white);
	border: none;
	border-radius: 90px;
	padding: 14px 36px;
	margin-top: 10px;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease;
}

.btn:hover {
	background: var(--color-primary);
	color: var(--color-white);
}

/* Zertifikate: je Zertifikat eine Zeile (Vorschau + Text/Button nebeneinander) */
.cert-list {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin: 32px 0 40px;
}

.cert-card {
	display: flex;
	align-items: center;
	gap: 28px;
	background: var(--color-bg);
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
	transition: box-shadow .2s ease;
}

.cert-card:hover {
	box-shadow: 0 16px 36px rgba(0, 0, 0, .12);
}

.cert-preview {
	position: relative;
	display: block;
	flex: 0 0 150px;
	width: 150px;
	padding: 0;
	border: 0;
	background: none;
	overflow: hidden;
	border-radius: 4px;
	cursor: zoom-in;
}

.cert-preview img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: top;
	transition: transform .3s ease;
}

.cert-preview:hover img,
.cert-preview:focus-visible img {
	transform: scale(1.05);
}

.cert-preview-badge {
	position: absolute;
	right: 6px;
	bottom: 6px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(36, 49, 106, .85);
	color: var(--color-white);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cert-preview-badge svg {
	width: 14px;
	height: 14px;
}

.cert-info {
	flex: 1;
	text-align: left;
}

.cert-info h3 {
	margin: 0 0 6px;
	font-size: 1rem;
	padding-top: 0;
}

.cert-info p {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--color-text-strong);
	margin: 0 0 14px;
}

.cert-info .btn {
	margin-top: 0;
	padding: 10px 22px;
	font-size: 0.6875rem;
}

/* Zertifikate: Lightbox für die große Vorschau */
.cert-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 20, .85);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	z-index: 20000;
	animation: fadein .2s ease;
}

.cert-lightbox-content {
	position: relative;
	max-width: min(600px, 90vw);
	max-height: 90vh;
}

.cert-lightbox-content img {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	border-radius: 6px;
	box-shadow: 0 25px 70px rgba(0, 0, 0, .5);
}

.cert-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-primary-dark);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	line-height: 1;
	transition: background .2s ease;
}

.cert-lightbox-close:hover {
	background: var(--color-primary);
}

/* Branchen: kompaktere Kacheln, hellere Beschriftung auf Dunkel */
.branches .quad {
	aspect-ratio: 5 / 4;
}

.branches .branch {
	color: #d4d6de;
}

.branches .icon {
	width: 52px;
}

/* Unternehmen: Meilensteine als Zeitleiste zwischen Haarlinien */
.milestones {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	margin: 48px 0 56px;
	padding: 32px 0;
	border-top: 1px solid rgba(51, 102, 204, .35);
	border-bottom: 1px solid rgba(51, 102, 204, .35);
}

.milestones dt {
	font-family: 'Droid Serif', serif;
	font-style: italic;
	font-size: 2.5rem;
	line-height: 1.1;
	color: var(--color-primary);
	margin-bottom: 12px;
}

.milestones dd {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--color-text-strong);
}

/* Kontakt: hervorgehobene Telefonnummer und E-Mail, jeweils ganze Fläche klickbar */
.contact-highlights {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0 0 44px;
}

.text a.contact-highlight {
	display: inline-flex;
	align-items: center;
	gap: 22px;
	padding: 24px 36px 24px 24px;
	background: var(--color-primary-light);
	border-radius: 8px;
	color: var(--color-primary-dark);
	text-decoration: none;
	transition: background-color .2s ease;
}

.text a.contact-highlight:hover {
	background: #dce5f8;
	color: var(--color-primary-dark);
}

.contact-highlight-icon {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--color-primary);
	position: relative;
	transition: background-color .2s ease;
}

.contact-highlight-icon::before {
	content: "";
	position: absolute;
	inset: 16px;
	background: var(--color-white);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}

.contact-highlight-icon--phone {
	--icon: url("../images/icons/phone.svg");
}

.contact-highlight-icon--mail {
	--icon: url("../images/icons/mail.svg");
}

.contact-highlight:hover .contact-highlight-icon {
	background: var(--color-primary-dark);
}

.contact-highlight-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.contact-highlight-label {
	font-size: 0.875rem;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--color-primary);
}

.contact-highlight-value {
	font-size: 2.125rem;
	line-height: 1.15;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
