/* ==========================================================================
   PCC.Expert – Layout & Design
   Farben und Maße zentral als Variablen. Texte liegen in /content/.
   ========================================================================== */

@font-face {
  font-family: "Teko";
  src: url("../fonts/Teko-latin.woff2") format("woff2"),
       url("../fonts/Teko-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --c-primary: #253789;     /* Dunkelblau */
  --c-secondary: #1c9fdb;   /* Hellblau */
  --c-white: #fff;
  --c-bg: #eceaea;
  --font: "Teko", sans-serif;
  --container: 1250px;
  --shadow: 0 0 20px 0 rgba(0, 0, 0, .5);
  --fs-text: 26px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-primary);
  background-color: var(--c-bg);
  background-image: url("../img/bg-page.jpg");
  background-image: image-set(url("../img/bg-page.webp") type("image/webp"), url("../img/bg-page.jpg") type("image/jpeg"));
  background-position: 0 800px;
  background-repeat: repeat-y;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

a { color: var(--c-secondary); text-decoration: none; transition: color .3s; }
a:hover { color: var(--c-primary); }

h1, h2, h3, h4 { font-family: var(--font); font-weight: 400; margin: 0; }

p { margin: 0 0 .9rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

/* ---------- Hintergrund mit leichtem Parallax (Position setzt main.js) ---------- */

.bg-layer { display: none; }
html.js body { background-image: none; }
html.js .bg-layer {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../img/bg-page.jpg");
  background-image: image-set(url("../img/bg-page.webp") type("image/webp"), url("../img/bg-page.jpg") type("image/jpeg"));
  background-repeat: repeat-y;
  background-position: 0 var(--bg-y, 800px);
  pointer-events: none;
}

/* ---------- Übergangsseite beim Seitenwechsel ---------- */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  background: var(--c-secondary);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
html.js .page-loader { display: block; }
html.js body.is-loading .page-loader,
.page-loader.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease;
}
/* Ankunft auf der neuen Seite: sofort sichtbar, ohne Einblenden (verhindert Aufblinken) */
.page-loader.is-arriving {
  opacity: 1;
  visibility: visible;
  transition: none;
}
/* Loader: drei ineinandergreifende Zahnräder (Drehzahl passend zur Zähnezahl 12 / 8 / 10) */
.gears {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: auto;
  transform: translate(-50%, -50%);
  overflow: visible;
}
.gear {
  fill: var(--c-white);
  transform-box: fill-box;
  transform-origin: center;
  animation: gear-spin 3s linear infinite;
}
.gear-b { animation-name: gear-spin-back; animation-duration: 2s; }
.gear-c { animation-name: gear-spin-back; animation-duration: 2.5s; opacity: .85; }
@keyframes gear-spin      { to { transform: rotate(360deg); } }
@keyframes gear-spin-back { to { transform: rotate(-360deg); } }

/* ---------- Kopfzeile ---------- */

.header-bar {
  position: relative;
  z-index: 900;
  background: var(--c-white);
  border-bottom: 10px solid var(--c-secondary);
  padding: 0 10px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: block; flex: 0 0 40%; }
.logo img { display: block; width: auto; transition: height .5s ease; }
.logo-full { height: 150px; margin: 10px 0; }
.logo-small { display: none !important; height: 50px; }

.main-nav { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 60%; }

.nav-pills, .lang-switch {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-pills li, .lang-switch li { margin-left: 6px; }

.nav-pills a, .lang-switch a {
  display: flex;
  align-items: center;
  min-height: 55px;
  padding: 0 10px;
  font-size: 22px;
  line-height: 1;
  padding-top: 3px;
  color: var(--c-secondary);
  background: var(--c-white);
  border: 4px solid var(--c-secondary);
  border-radius: 30px;
  transition: all .3s;
}

.nav-pills a:hover, .nav-pills .active a,
.lang-switch a:hover, .lang-switch .active a {
  color: var(--c-white);
  background: var(--c-secondary);
  border-color: var(--c-secondary);
}

/* Sprachumschalter: etwas abgesetzt vom Hauptmenü */
.main-nav .lang-switch { margin-left: 16px; }
.main-nav .lang-switch li { margin-left: 4px; }
.main-nav .lang-switch a { min-height: 40px; font-size: 18px; padding: 3px 9px 0; border-width: 3px; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  cursor: pointer;
  transition: background .3s;
}
.menu-toggle svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.menu-toggle:hover { background: var(--c-white); color: var(--c-primary); }

/* Kopfzeile nach dem Scrollen fixiert */
.site-header.is-sticky .header-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--c-secondary);
  border-bottom-color: var(--c-white);
  box-shadow: 25px 0 20px 0 rgba(0, 0, 0, .5);
  animation: fadeIn .4s ease;
}
.site-header.is-sticky .logo-full { display: none; }
.site-header.is-sticky .logo-small { display: block !important; margin: 10px 0; }
.site-header.is-sticky .nav-pills a,
.site-header.is-sticky .lang-switch a { border-color: var(--c-white); }

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

/* ---------- Titelbild ---------- */

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-bottom: 10px solid var(--c-primary);
}

/* Parallax: Bildebene ist breiter als der Rahmen und wandert beim Scrollen nach links (siehe main.js) */
.hero-bg {
  --parallax-x: 240px;
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% + var(--parallax-x));
  background-image: url("../img/header.jpg");
  background-image: image-set(url("../img/header.webp") type("image/webp"), url("../img/header.jpg") type("image/jpeg"));
  /* Startausschnitt wie beim statischen Bild, danach wandert das Bild nach links */
  background-position: calc(50% - var(--parallax-x) / 2) top;
  background-size: cover;
  will-change: transform;
}

/* ---------- Inhalt ---------- */

.site-main { position: relative; }

.card {
  position: relative;
  background: var(--c-white);
  box-shadow: var(--shadow);
}

.card-intro, .card-page {
  margin-top: -200px;
  border-radius: 30px 30px 0 0;
  padding: 50px;
}
.card-page { padding-bottom: 100px; }

.page-title {
  font-size: 60px;
  line-height: 1;
  color: var(--c-secondary);
  margin-bottom: 20px;
}

.section-title {
  font-size: 50px;
  line-height: 1;
  color: var(--c-secondary);
  margin-bottom: 20px;
}

.text { font-size: var(--fs-text); line-height: 1.5; }
.text::after { content: ""; display: table; clear: both; }
.text a { font-size: var(--fs-text); }
.text ul { margin: 0 0 .9rem; padding-left: 40px; }
.text ul ul { list-style: circle; margin: 0; }

.alignright {
  float: right;
  width: 400px;
  height: 400px;
  margin: 0 0 0 16px;
  object-fit: cover;
}

/* Rechtstexte (Impressum, Datenschutz) */
.legal { font-size: 24px; }
.legal h1 { font-size: 70px; line-height: 1.2; color: var(--c-secondary); margin: 8px 0 16px; }
.legal h2 { font-size: 32px; line-height: 1.2; margin: 8px 0 16px; }
.legal h3 { font-size: 28px; line-height: 1.2; margin: 8px 0 16px; }
.legal h4 { font-size: 24px; line-height: 1.2; margin: 8px 0 16px; }
.legal strong { font-weight: 600; }
.legal a { word-break: break-word; }

/* ---------- Bildleiste (Startseite) ---------- */

.slider-strip {
  position: relative;
  z-index: 500;
  margin-top: -20px;
  --slider-gap: 20px;  /* gleicher Abstand oben, unten, links, rechts und zwischen den Bildern */
  padding: var(--slider-gap);
  background: var(--c-secondary);
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, .5);
}

.slider { overflow: hidden; }
.slider-track {
  display: flex;
  gap: var(--slider-gap);
  transition: transform .5s ease;
}
.slide {
  flex: 0 0 calc((100% - 4 * var(--slider-gap)) / 5);
  margin: 0;
}
.slide picture { display: block; }
.slide img {
  display: block;
  width: 100%;
  border: 5px solid var(--c-white);
  border-radius: 20px;
}

/* ---------- Kooperation ---------- */

.card-coop {
  z-index: 400;
  padding: 50px 50px 100px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.partner {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 50px;
  overflow: hidden;
  background: var(--c-white);
  border: 5px solid var(--c-primary);
  border-radius: 30px;
  cursor: pointer;
}

.partner-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-info {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: var(--c-white);
  transition: all .5s cubic-bezier(.77, 0, .175, 1);
}

.partner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--c-primary);
  transition: opacity .5s cubic-bezier(.77, 0, .175, 1);
}
.partner-icon svg { width: 14px; height: 16px; fill: currentColor; }

.partner-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  text-align: center;
  transition: opacity .3s cubic-bezier(.77, 0, .175, 1);
}

.partner-name { font-size: 30px; line-height: 1.2; letter-spacing: 2px; color: var(--c-secondary); }
.partner-link { padding-top: 10px; }
.partner-link a { font-size: 20px; letter-spacing: 1.5px; color: var(--c-primary); }
.partner-link a:hover { color: var(--c-secondary); }

.partner:hover .partner-info,
.partner.is-open .partner-info { width: 100%; height: 100%; }
.partner:hover .partner-icon,
.partner.is-open .partner-icon { opacity: 0; }
.partner:hover .partner-inner,
.partner.is-open .partner-inner { opacity: 1; transition-delay: .5s; }

/* ---------- Kontaktbereich & Fußzeile ---------- */

.site-footer { position: relative; z-index: 450; margin-top: -45px; }

.contact-box {
  position: relative;
  z-index: 200;
  display: flex;
  background-color: var(--c-primary);
  background-image: url("../img/bg-footer.jpg");
  background-image: image-set(url("../img/bg-footer.webp") type("image/webp"), url("../img/bg-footer.jpg") type("image/jpeg"));
  background-position: center right;
  background-repeat: no-repeat;
  border: 10px solid var(--c-primary);
  border-radius: 0 0 25px 25px;
  box-shadow: 0 15px 25px 0 rgba(0, 0, 0, .5);
  padding: 39px 50px 44px;
}

.contact-col, .address-col { flex: 0 0 50%; }
/* Links im blauen Kontaktbereich: Hellblau, beim Drüberfahren Weiß */
.contact-box a:hover, .contact-box a:focus { color: var(--c-white); }

.contact-title { font-size: 50px; line-height: 1.44; color: var(--c-white); margin-bottom: 9px; }

.contact-form { display: flex; flex-direction: column; gap: 10px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 26px;
  line-height: 1.4;
  color: var(--c-primary);
  background: var(--c-white);
  border: 1px solid #69727d;
  border-radius: 25px;
  padding: 8px 16px;
  outline: none;
}
.contact-form textarea { resize: vertical; min-height: 158px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--c-primary); opacity: .6; }
.contact-form input:focus,
.contact-form textarea:focus { box-shadow: 0 0 0 2px var(--c-secondary); }

.contact-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  font-family: var(--font);
  font-size: 26px;
  line-height: 1;
  color: var(--c-white);
  background: var(--c-secondary);
  border: 0;
  border-radius: 25px;
  cursor: pointer;
  transition: filter .3s;
}
.contact-form button svg { width: 20px; height: 20px; fill: currentColor; }
.contact-form button:hover { filter: brightness(1.1); }

.hp { position: absolute; left: -9999px; }

.form-msg {
  font-size: 24px;
  color: var(--c-white);
  background: var(--c-secondary);
  border-radius: 25px;
  padding: 8px 16px 4px;
}
.form-msg-error, .form-msg-invalid { background: #c0392b; }

.address-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--c-white);
  font-size: 35px;
  line-height: 1.5;
}
.address-col img { margin-top: 10px; margin-bottom: 20px; }

.footer-bottom {
  display: flex;
  align-items: flex-start;
  padding: 19px 10px 30px;
}
.footer-nav, .footer-mid, .copyright { flex: 0 0 33%; }
.footer-mid { flex-basis: 34%; }

.footer-menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-menu a {
  display: block;
  padding: 0 15px;
  font-size: 26px;
  line-height: 1.5;
  color: var(--c-primary);
  border-right: 1px solid var(--c-primary);
}
.footer-menu a:hover, .footer-menu .active a { color: var(--c-secondary); }

.copyright { margin: 0; text-align: right; font-size: 26px; }
.copyright a { font-size: 26px; }

/* ---------- Nach-oben-Button ---------- */

.scroll-top {
  position: fixed;
  right: 15px;
  bottom: 15px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 58px;
  color: var(--c-white);
  background: var(--c-secondary);
  border: 3px solid var(--c-white);
  border-radius: 30%;
  box-shadow: var(--shadow);
  transition: background .3s;
}
.scroll-top svg { width: 14px; height: 16px; fill: currentColor; }
.scroll-top:hover { color: var(--c-white); background: var(--c-primary); }

/* ---------- Mobiles Menü (Offcanvas) ---------- */

.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .8);
}
.offcanvas[hidden] { display: none; }

.offcanvas-panel {
  position: relative;
  width: 350px;
  max-width: 100%;
  height: 100vh;
  overflow-y: auto;
  padding: 50px;
  background: var(--c-secondary);
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, .2);
  animation: slideIn .6s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }

.offcanvas-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--c-white);
  cursor: pointer;
}
.offcanvas-close svg { width: 100%; height: 100%; fill: currentColor; }

.offcanvas-logo { display: block; width: 250px; margin: 0 auto; }

.vmenu {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  text-align: center;
}
.vmenu a {
  display: block;
  margin-top: 10px;
  padding: 4px 0 0;
  font-size: 22px;
  line-height: 1.5;
  color: var(--c-white);
  border: 3px solid var(--c-white);
  border-radius: 25px;
  transition: all .3s;
}
.vmenu-dark { margin-top: 30px; }
.vmenu-dark a { background: var(--c-primary); }
.vmenu a:hover, .vmenu .active a { color: var(--c-secondary); background: var(--c-white); }

.offcanvas .lang-switch { justify-content: center; margin-top: 30px; }
.offcanvas .lang-switch a { min-height: 40px; color: var(--c-white); background: transparent; border-color: var(--c-white); border-width: 3px; padding: 3px 14px 0; }
.offcanvas .lang-switch .active a,
.offcanvas .lang-switch a:hover { color: var(--c-secondary); background: var(--c-white); }

body.menu-open { overflow: hidden; }

/* ---------- Tablet (bis 1024px): mobile Kopfzeile ---------- */

@media (max-width: 1024px) {
  body { background-position: 0 0; }
  html.js .bg-layer { background-position: 0 var(--bg-y, 0px); }
  .container { max-width: 1024px; }
  .main-nav { display: none; }
  .menu-toggle { display: block; width: 50px; height: 50px; }
  .menu-toggle svg { width: 30px; height: 30px; }
  .logo { flex-basis: 70%; }
  .logo-full { height: 90px; margin: 10px 0 10px; }
  .site-header.is-sticky .logo-small { height: 40px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Smartphone (bis 767px) ---------- */

@media (max-width: 767px) {
  .container { max-width: 767px; }
  .menu-toggle { width: 40px; height: 40px; }
  .menu-toggle svg { width: 20px; height: 20px; }
  .hero { min-height: 400px; }
  .hero-bg {
    --parallax-x: 120px;
    background-image: url("../img/header.jpg");
    background-image: image-set(url("../img/header-1280.webp") type("image/webp"), url("../img/header.jpg") type("image/jpeg"));
  }
  .card-intro, .card-page { padding: 20px; }
  .card-page { padding-bottom: 100px; }
  .card-coop { padding: 20px 20px 100px; }
  .alignright { float: none; display: block; width: 100%; height: auto; margin: 0 0 20px; }
  .partner-grid { grid-template-columns: 1fr; }
  .slider-strip { --slider-gap: 8px; }
  .slide img { border-radius: 10px; border-width: 3px; }
  .contact-box { flex-direction: column; padding: 0 10px 10px; }
  .contact-col, .address-col { flex-basis: auto; }
  .address-col img { margin-top: 30px; }
  .footer-bottom { flex-direction: column; align-items: center; }
  .footer-menu { justify-content: center; }
  .footer-mid { display: none; }
  .copyright { text-align: center; margin-top: 40px; }
  .legal h1 { font-size: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gear { animation-duration: 9s; }
  .gear-b { animation-duration: 6s; }
  .gear-c { animation-duration: 7.5s; }
  .hero-bg { transform: none !important; width: 100%; background-position: top center; }
}
