/* Photovoltaik-Seite. Wird nur geladen, wenn der Seiteninhalt data-dl-css="photovoltaik" enthält (functions.php). */
.pv {
  --pv-red: #bd0926;
  --pv-red-dark: #9c0010;
  --pv-ink: #222326;
  --pv-muted: #464a53;
  --pv-line: #dfe1e6;
  --pv-tint: #f5f5f5;
  --pv-night: #1b1c20;
  --pv-night-text: #e8e9ed;
  --pv-night-muted: #b6b9c3;
  --pv-glow: #ff6b7d;
  color: var(--pv-ink);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: clip;
}
.pv *, .pv *::before, .pv *::after { box-sizing: border-box; }
.pv h1, .pv h2, .pv h3 { display: block; border: 0; padding: 0; text-wrap: balance; overflow-wrap: break-word; }
.pv h1 { margin: 0 0 24px; color: var(--pv-red); font-size: clamp(2.15rem, 4.3vw, 3.75rem); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; }
.pv h2 { margin: 0 0 20px; color: var(--pv-ink); font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.pv h3 { margin: 0 0 8px; color: var(--pv-ink); font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
.pv p { max-width: 62ch; margin: 0 0 18px; text-wrap: pretty; }
.pv p:last-child { margin-bottom: 0; }
.pv a { color: var(--pv-red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.pv a:hover { color: var(--pv-red-dark); text-decoration-thickness: 2px; }
.pv :is(a, summary):focus-visible { outline: 3px solid var(--pv-red); outline-offset: 4px; border-radius: 4px; }
.pv ul, .pv ol, .pv dl, .pv dd { margin: 0; padding: 0; }
.pv li { list-style: none; }
.pv img { display: block; max-width: 100%; height: auto; }
.pv figure { margin: 0; }

.pv-section { padding: clamp(56px, 7vw, 104px) 0; }
.pv-section--tint { background: var(--pv-tint); }
.pv-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.pv-split--wide-text { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.pv-split--top { align-items: start; }
.pv-split > * { min-width: 0; }
.pv-photo img { width: 100%; border-radius: 24px; }

/* Buttons */
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }
.pv a.pv-button { display: inline-block; padding: 14px 32px; border-radius: 8px; background: var(--pv-red); color: #fff; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; transition: background-color .25s ease; }
.pv a.pv-button:hover { background: var(--pv-red-dark); color: #fff; }
.pv a.pv-button--light { background: #fff; color: var(--pv-red-dark); }
.pv a.pv-button--light:hover { background: var(--pv-tint); color: var(--pv-red-dark); }
.pv a.pv-textlink { font-weight: 700; }

/* Hero */
.pv-hero { padding: clamp(32px, 5vw, 72px) 0 clamp(56px, 7vw, 96px); }
.pv-hero .pv-split { gap: clamp(32px, 6vw, 96px); }
.pv-lead { font-size: 1.2rem; line-height: 1.65; }
.pv-points { display: grid; gap: 10px; margin-top: 28px; }
.pv-points li { position: relative; padding-left: 32px; }
.pv-points li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 7px; height: 13px; border: solid var(--pv-red); border-width: 0 3px 3px 0; transform: rotate(40deg); }
.pv-hero .pv-photo img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 28px; }

/* Vorteile */
.pv-rows { display: grid; }
.pv-rows > div { padding: 26px 0; border-top: 1px solid var(--pv-line); }
.pv-rows > div:last-child { border-bottom: 1px solid var(--pv-line); }
.pv-rows p { margin: 0; }

/* Energiesystem (dunkel) */
.pv-system { background: var(--pv-night); color: var(--pv-night-text); }
.pv-system h2 { color: #fff; }
.pv-system a { color: #fff; }
.pv-system a:hover { color: #fff; }
.pv-system :is(a, summary):focus-visible { outline-color: #fff; }
.pv-system .pv-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.pv-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); --pv-gap: 72px; gap: var(--pv-gap); margin-top: clamp(48px, 6vw, 80px); }
.pv-flow-stage { position: relative; }
.pv-flow-stage h3 { margin-bottom: 22px; color: #fff; font-size: 1.05rem; }
.pv-flow-stage ul { display: grid; gap: 18px; }
.pv-flow-stage li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.pv-flow-stage strong { display: block; color: #fff; line-height: 1.35; }
.pv-flow-stage li > div > span { color: var(--pv-night-muted); font-size: .98rem; line-height: 1.55; }
.pv-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pv-red); color: #fff; font-size: 1.05rem; }
.pv-flow-stage + .pv-flow-stage h3 { position: relative; }
.pv-flow-stage + .pv-flow-stage h3::before {
  content: ""; position: absolute; top: 50%; margin-top: -1px; left: calc(-1 * var(--pv-gap) + 8px); width: calc(var(--pv-gap) - 40px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--pv-glow) 0 6px, transparent 6px 12px);
  background-size: 12px 2px;
  animation: pv-flow 1.1s linear infinite;
}
.pv-flow-stage + .pv-flow-stage h3::after {
  content: ""; position: absolute; top: 50%; margin-top: -7px; left: -28px; border: solid transparent; border-width: 7px 0 7px 11px; border-left-color: var(--pv-glow);
}
@keyframes pv-flow { to { background-position: 12px 0; } }
@keyframes pv-flow-down { to { background-position: 0 12px; } }

/* Dachcheck */
.pv-checklist { display: grid; gap: 0; margin-top: 8px; }
.pv-checklist li { position: relative; padding: 18px 0 18px 40px; border-top: 1px solid var(--pv-line); }
.pv-checklist li:last-child { border-bottom: 1px solid var(--pv-line); }
.pv-checklist li::before { content: ""; position: absolute; left: 6px; top: 1.45em; width: 7px; height: 13px; border: solid var(--pv-red); border-width: 0 3px 3px 0; transform: rotate(40deg); }
.pv-checklist strong { display: block; font-size: 1.05rem; }
.pv-photo--crop img { aspect-ratio: 4 / 3; object-fit: cover; }
.pv p.pv-aside { margin-top: 28px; }

/* Ablauf */
.pv-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-top: 48px; counter-reset: pvstep; }
.pv-steps li { position: relative; counter-increment: pvstep; padding-top: 68px; }
.pv-steps li::before { content: counter(pvstep); position: absolute; top: 0; left: 0; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pv-red); color: #fff; font-weight: 800; }
.pv-steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 56px; right: -20px; height: 2px; background: var(--pv-line); }
.pv-steps p { margin: 0; font-size: 1rem; line-height: 1.6; }

/* Förderung */
.pv-facts > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 8px 32px; padding: 22px 0; border-top: 1px solid #cfd2d8; }
.pv-facts > div:last-child { border-bottom: 1px solid #cfd2d8; }
.pv-facts dt { font-weight: 700; }
.pv-facts dd { max-width: 62ch; }

/* FAQ */
.pv-faq details { border-top: 1px solid var(--pv-line); }
.pv-faq details:last-child { border-bottom: 1px solid var(--pv-line); }
.pv-faq summary { position: relative; padding: 20px 48px 20px 0; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none; }
.pv-faq summary::-webkit-details-marker { display: none; }
.pv-faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border: solid var(--pv-red); border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform .25s ease; }
.pv-faq details[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
.pv-faq details > p { padding: 0 48px 22px 0; }

/* Abschluss */
.pv-cta { background: var(--pv-red); color: #fff; }
.pv-cta h2 { color: #fff; }
.pv-cta a { color: #fff; }
.pv-cta a:hover { color: #fff; }
.pv-cta :is(a):focus-visible { outline-color: #fff; }
.pv-cta .pv-actions { margin-top: 28px; }
.pv-cta a.pv-textlink { text-decoration-thickness: 2px; }

@media (max-width: 1199px) {
  .pv-flow { --pv-gap: 48px; }
  .pv-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .pv-steps li:nth-child(3n)::after, .pv-steps li:last-child::after { display: none; }
}
@media (max-width: 991px) {
  .pv-split, .pv-split--wide-text { grid-template-columns: minmax(0, 1fr); }
  .pv-hero .pv-photo { order: -1; }
  .pv-hero .pv-photo img { aspect-ratio: 4 / 3; }
  .pv-flow { grid-template-columns: minmax(0, 1fr); --pv-gap: 56px; }
  .pv-flow-stage + .pv-flow-stage h3::before, .pv-flow-stage + .pv-flow-stage h3::after { display: none; }
  .pv-flow-stage + .pv-flow-stage::before {
    content: ""; position: absolute; top: -46px; left: 21px; width: 2px; height: 32px;
    background: repeating-linear-gradient(180deg, var(--pv-glow) 0 6px, transparent 6px 12px);
    background-size: 2px 12px;
    animation: pv-flow-down 1.1s linear infinite;
  }
  .pv-flow-stage + .pv-flow-stage::after { content: ""; position: absolute; top: -16px; left: 15px; border: solid transparent; border-width: 10px 7px 0 7px; border-top-color: var(--pv-glow); }
  .pv-photo--first { order: -1; }
}
@media (max-width: 767px) {
  .pv-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pv-steps li { padding: 0 0 32px 64px; min-height: 76px; }
  .pv-steps li:not(:last-child)::after { display: block; top: 44px; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; }
  .pv-steps li:nth-child(3n)::after { display: block; }
  .pv-facts > div { grid-template-columns: minmax(0, 1fr); }
  .pv-actions { gap: 16px 24px; }
  .pv a.pv-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pv-flow-stage + .pv-flow-stage h3::before, .pv-flow-stage + .pv-flow-stage::before { animation: none; }
  .pv-faq summary::after { transition: none; }
}
