/* ==========================================================================
   07 – KOMPETENZEN (6 Seiten: Entwicklung, Fertigungsverfahren, Werkstoffe,
   Mengen & Abmessungen, Logistik, Qualitätsmanagement)
   ==========================================================================
   Gehört zu: template-kompetenzen.php
   Werkstoff-Slider-Verhalten:        assets/js/werkstoff-slider.js
   Fertigungsverfahren-Akkordeon:     assets/js/fertigungsverfahren-akkordeon.js
   ========================================================================== */

/* --------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------- */
.kt-hero { background: var(--gray-lt); border-bottom: 1px solid var(--line); padding: 56px 40px; }
.kt-hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.kt-hero-text { min-width: 0; }
.kt-hero-media { border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.14); aspect-ratio: 16/10; position: relative; }
.kt-hero-media img, .kt-hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kt-hero-media img { transform: scale(1.12); animation: ktZoom 20s ease-out forwards; }
@keyframes ktZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .kt-hero-media img { animation: none; transform: none; } }
@media (max-width: 820px) { .kt-hero-inner { grid-template-columns: 1fr; gap: 30px; } .kt-hero-media { aspect-ratio: 16/9; } }
.kt-breadcrumb { font-size: 13px; color: var(--gray); margin-bottom: 18px; }
.kt-breadcrumb a { color: var(--gray); text-decoration: none; }
.kt-breadcrumb a:hover { color: var(--blue); }
.kt-breadcrumb span { color: var(--black); font-weight: 700; }
.kt-hero .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.kt-hero .eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--blue); }
.kt-hero h1 { font-size: clamp(2rem,4vw,2.9rem); font-weight: 700; color: var(--black); letter-spacing: -.02em; line-height: 1.12; margin-bottom: 16px; }
.kt-hero h1 span { color: var(--blue); }
.kt-hero-sub { font-size: 17px; line-height: 1.6; color: var(--gray); max-width: 620px; }
.kt-quick { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.kt-quick a { display: inline-flex; align-items: center; gap: 9px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; font-size: 14.5px; font-weight: 700; color: var(--black); text-decoration: none; transition: border-color .18s, color .18s; }
.kt-quick a:hover { border-color: var(--blue); color: var(--blue); }
.kt-quick a svg { width: 17px; height: 17px; color: var(--blue); }

/* --------------------------------------------------------------------
   GEMEINSAME SEKTIONS-RAHMEN
   -------------------------------------------------------------------- */
/* .mt-section/.mt-inner/.mt-section--alt/.mt-lead: siehe 03-buttons-komponenten.css
   (gemeinsamer Baustein, wird auch von den Branchen-Seiten genutzt). */

/* --------------------------------------------------------------------
   KENNZAHLEN-BAND (Werkstoffe: Count-up · Mengen&Abmessungen: statisch)
   Beide Varianten teilen sich hier bewusst EIN Bauteil (im Original zwei
   fast identische Komponenten ".kpi-band"/".ma-band") – siehe KORREKTUREN.md.
   -------------------------------------------------------------------- */
.kpi-band { background: var(--gray-lt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 40px; }
.kpi-inner { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; text-align: center; }
.kpi-item { position: relative; padding: 4px 12px; }
.kpi-item + .kpi-item::before { content: ''; position: absolute; left: 0; top: 10%; bottom: 10%; width: 1px; background: var(--line); }
.kpi-num { font-size: clamp(1.65rem,3.3vw,2.3rem); font-weight: 700; color: var(--blue); line-height: 1.05; letter-spacing: -.02em; display: flex; align-items: baseline; justify-content: center; gap: 3px; }
.kpi-num .sfx { font-size: .55em; font-weight: 700; }
.kpi-label { font-size: 13.5px; font-weight: 700; color: var(--black); margin-top: 8px; }
.kpi-sub { font-size: 12px; color: var(--gray); margin-top: 2px; line-height: 1.4; }
@media (max-width: 700px) {
	.kpi-inner { grid-template-columns: 1fr; gap: 20px; }
	.kpi-item + .kpi-item::before { display: none; }
	.kpi-item + .kpi-item { border-top: 1px solid var(--line); padding-top: 18px; }
}

/* --------------------------------------------------------------------
   LEISTUNGS-KARTEN (ke-card) / ABMESSUNGS-KARTEN (ma-card) / ZERTIFIKATE (qm-cert)
   teilen sich das ke-icon-Format
   -------------------------------------------------------------------- */
.ke-icon { width: 48px; height: 48px; border-radius: 11px; background: linear-gradient(135deg,var(--blue),var(--blue-dk)); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease; overflow: hidden; }
.ke-icon img { width: 24px; height: 24px; object-fit: contain; filter: brightness(0) invert(1); }
.ke-icon svg { width: 24px; height: 24px; color: #fff; }

.ke-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 22px; }
.ke-card { border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; background: var(--white); transition: box-shadow .2s, transform .2s, border-color .2s; }
.ke-card:hover { box-shadow: 0 12px 34px rgba(0,0,0,.08); transform: translateY(-3px); border-color: var(--blue); }
.ke-card:hover .ke-icon { transform: translateY(-3px) scale(1.06); box-shadow: 0 8px 20px rgba(0,150,255,.28); }
.ke-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--black); margin-bottom: 9px; }
.ke-card p { font-size: 14.5px; line-height: 1.6; color: var(--gray); }

.ma-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 22px; }
.ma-card { border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; background: var(--white); }
.ma-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--black); margin-bottom: 9px; }
.ma-card > p { font-size: 14.5px; line-height: 1.6; color: var(--gray); margin-bottom: 18px; }
.ma-specs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.ma-specs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ma-spec-k { color: var(--gray); }
.ma-spec-v { color: var(--black); font-weight: 700; text-align: right; }

.qm-certs { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.qm-cert { border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 26px 22px; text-align: center; transition: box-shadow .2s, transform .2s, border-color .2s; }
.qm-cert:hover { box-shadow: 0 14px 34px rgba(0,0,0,.09); transform: translateY(-3px); border-color: rgba(0,150,255,.25); }
.qm-cert-badge { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; background: var(--blue-lt); display: flex; align-items: center; justify-content: center; }
.qm-cert-badge svg { width: 26px; height: 26px; color: var(--blue-dk); }
.qm-cert-norm { font-size: 1.05rem; font-weight: 700; color: var(--black); letter-spacing: -.01em; margin-bottom: 6px; }
.qm-cert-desc { font-size: 12.5px; line-height: 1.5; color: var(--gray); }
@media (max-width: 820px) { .qm-certs { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 460px) { .qm-certs { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------
   VERFAHRENS-KACHELN (pv-card) – aufklappbar
   -------------------------------------------------------------------- */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 20px; }
.pv-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pv-card:hover { border-color: rgba(0,150,255,.4); box-shadow: 0 10px 28px rgba(0,0,0,.06); }
.pv-card-head { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 26px 24px; display: flex; align-items: flex-start; gap: 16px; font-family: inherit; }
.pv-card-head .ke-icon { margin-bottom: 0; flex-shrink: 0; }
.pv-card-headtext { flex: 1; }
.pv-card-headtext h3 { font-size: 1.1rem; font-weight: 700; color: var(--black); margin-bottom: 6px; }
.pv-card-headtext p { font-size: 13.5px; color: var(--gray); line-height: 1.5; }
.pv-card-toggle { position: relative; width: 22px; height: 22px; flex-shrink: 0; margin-top: 4px; }
.pv-card-toggle::before, .pv-card-toggle::after { content: ''; position: absolute; background: var(--blue); border-radius: 2px; transition: transform .25s ease; }
.pv-card-toggle::before { top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; }
.pv-card-toggle::after { left: 50%; top: 0; height: 100%; width: 2px; margin-left: -1px; }
.pv-card-head[aria-expanded="true"] .pv-card-toggle::after { transform: rotate(90deg); opacity: 0; }
.pv-more { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.22,1,.36,1); }
.pv-more-inner { padding: 0 24px 26px 88px; }
.pv-more-inner p { font-size: 14px; line-height: 1.65; color: var(--gray); margin-bottom: 14px; }
.pv-more-inner ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 8px 20px; }
.pv-more-inner li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--gray); line-height: 1.5; }
.pv-more-inner li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-lt); border: 2px solid var(--blue); }
@media (max-width: 600px) { .pv-more-inner { padding-left: 24px; } }

/* --------------------------------------------------------------------
   WERKSTOFF-SLIDER (sl-card) – Autoplay per requestAnimationFrame
   -------------------------------------------------------------------- */
.sl-wrap { position: relative; }
.sl-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: none; }
.sl-track::-webkit-scrollbar { display: none; }
.sl-card { flex: 0 0 300px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--white); transition: box-shadow .2s, transform .2s; }
.sl-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.1); transform: translateY(-3px); }
.sl-top { background: linear-gradient(150deg,var(--blue),var(--blue-dk)); padding: 26px 24px; position: relative; overflow: hidden; }
.sl-top::after { content: ''; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.1); }
.sl-code { font-size: 1.9rem; font-weight: 700; color: #fff; letter-spacing: -.02em; position: relative; z-index: 2; }
.sl-ic { position: absolute; right: 20px; bottom: 18px; z-index: 2; }
.sl-ic img { width: 30px; height: 30px; object-fit: contain; }
.sl-ic svg { width: 30px; height: 30px; color: rgba(255,255,255,.85); }
.sl-body { padding: 22px 24px; }
.sl-body h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--black); }
.sl-body p { font-size: 13.5px; line-height: 1.6; color: var(--gray); margin-bottom: 16px; }
.sl-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.sl-tag { font-size: 11.5px; font-weight: 700; color: var(--blue-dk); background: var(--blue-lt); border-radius: 16px; padding: 5px 11px; }
.sl-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.sl-btn, .sl-playpause { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--gray); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .18s, color .18s; }
.sl-btn:hover, .sl-playpause:hover { border-color: var(--blue); color: var(--blue); }
.sl-btn svg, .sl-playpause svg { width: 16px; height: 16px; }
.sl-download { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; background: var(--blue-lt); border-radius: 12px; }
.sl-download span { font-size: 14px; font-weight: 700; color: var(--black); flex: 1; min-width: 200px; }

/* --------------------------------------------------------------------
   BILD-FEATURE-ZEILEN (lf-row) – Logistik, Qualitätsmanagement
   -------------------------------------------------------------------- */
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.lf-row.rev { direction: rtl; }
.lf-row.rev > * { direction: ltr; }
.lf-media { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 18px 44px rgba(0,0,0,.12); }
.lf-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-badge { position: absolute; left: 16px; bottom: 16px; z-index: 2; background: rgba(28,28,27,.8); backdrop-filter: blur(6px); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 8px 13px; border-radius: 8px; }
.lf-text h3 { font-size: clamp(1.4rem,2.6vw,1.9rem); font-weight: 700; color: var(--black); margin: 10px 0 16px; }
.lf-text p { font-size: 15px; line-height: 1.75; color: var(--gray); margin-bottom: 12px; }
.lf-punkte { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.lf-punkte li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.5; color: var(--black); }
.lf-punkte li::before { content: ''; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-lt); border: 2px solid var(--blue); }
@media (max-width: 820px) { .lf-row, .lf-row.rev { grid-template-columns: 1fr; gap: 28px; } .lf-row.rev { direction: ltr; } .lf-media { order: -1; } }

/* --------------------------------------------------------------------
   ABLAUF-SCHRITTE (ke-step) / VERWANDTE KOMPETENZEN (ke-link)
   -------------------------------------------------------------------- */
.ke-steps { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 22px; }
.ke-step { position: relative; padding: 28px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.ke-step-num { font-size: 2rem; font-weight: 700; color: var(--blue); opacity: .35; line-height: 1; margin-bottom: 14px; }
.ke-step h3 { font-size: 1.08rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.ke-step p { font-size: 14px; line-height: 1.55; color: var(--gray); }

.ke-links { display: flex; flex-direction: column; gap: 14px; }
.ke-link { display: flex; flex-direction: column; gap: 4px; position: relative; padding: 22px 56px 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.ke-link:hover { border-color: var(--blue); box-shadow: 0 10px 28px rgba(0,0,0,.06); transform: translateY(-2px); }
.ke-link-title { font-size: 1.15rem; font-weight: 700; color: var(--black); }
.ke-link-sub { font-size: 14px; color: var(--gray); }
.ke-link svg { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--blue); }

/* Gestaffelte Einblendungen (Scroll-Reveal) */
.ke-grid .ke-card, .ke-steps .ke-step, .ke-links .ke-link, .ma-grid .ma-card {
	opacity: 0; transform: translateY(24px);
	transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.fade-in-section.visible .ke-grid .ke-card,
.fade-in-section.visible .ke-steps .ke-step,
.fade-in-section.visible .ke-links .ke-link,
.fade-in-section.visible .ma-grid .ma-card { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
	.ke-grid .ke-card, .ke-steps .ke-step, .ke-links .ke-link, .ma-grid .ma-card { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------
   ZWISCHEN-CTA (schmales, zentriertes Inline-CTA)
   -------------------------------------------------------------------- */
.cta-inline-section { padding: 64px 40px; background: var(--blue-lt); text-align: center; }
.cta-inline-section h3 { font-size: clamp(1.3rem,2.4vw,1.8rem); font-weight: 700; color: var(--black); margin-bottom: 12px; }
.cta-inline-section p { font-size: 15px; color: var(--gray); max-width: 560px; margin: 0 auto 22px; line-height: 1.6; }

/* --------------------------------------------------------------------
   FAQ (Daten vorhanden, auf den Kompetenzen-Seiten bewusst NICHT
   sichtbar gerendert – siehe template-kompetenzen.php)
   -------------------------------------------------------------------- */

@media (max-width: 820px) {
	.kt-hero, .kpi-band, .cta-inline-section { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 600px) {
	.kt-hero, .kpi-band, .cta-inline-section { padding-top: 44px; padding-bottom: 44px; padding-left: 20px; padding-right: 20px; }
	.ke-grid, .ke-steps, .ma-grid, .pv-grid { grid-template-columns: 1fr; }
}
