/* =========================================================
   sonnenkompetenz.de – Grundgestaltung
   Farben: Firmenblau #445AC1, Dunkelblau #1D2A6B, Sonnengelb #FFC82E
   ========================================================= */

/* ---- Schriften (lokal auf dem eigenen Server, kein Google) ---- */
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/schriften/barlow-400.woff') format('woff')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/schriften/barlow-500.woff') format('woff')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/schriften/barlow-600.woff') format('woff')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/schriften/barlow-700.woff') format('woff')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/schriften/barlow-800.woff') format('woff')}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/schriften/barlow-condensed-600.woff') format('woff')}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/schriften/barlow-condensed-700.woff') format('woff')}

/* ---- Grundlagen ---- */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}
body{margin:0;overflow-x:clip;overflow-wrap:break-word;background:#FFFFFF;font-family:'Barlow',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;color:#1B2235;font-size:17px;line-height:1.55}
img,video{max-width:100%}
[hidden]{display:none !important}
section[id],div[id],form[id]{scroll-margin-top:96px}
a{color:#1D2A6B}a:hover{color:#445AC1}
:focus-visible{outline:3px solid #FFC82E;outline-offset:2px}
.springen{position:absolute;left:-9999px;top:8px;z-index:100;background:#1D2A6B;color:#FFFFFF;padding:10px 16px;border-radius:4px;font-weight:700}
.springen:focus{left:8px}

/* ---- Aus dem Entwurf ---- */
.nav a{text-decoration:none}
.btn-sun:hover{filter:brightness(0.95)}
.job:hover{background:#FFFFFF}
.card-img{transition:transform .4s ease}
article{transition:transform .25s ease, box-shadow .25s ease}
article:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(29,42,107,0.12)}
article:hover .card-img{transform:scale(1.04)}
.btn-sun,.btn-ghost{transition:transform .2s ease, filter .2s ease}
.btn-sun:hover,.btn-ghost:hover{transform:translateY(-2px)}
.btn-sun svg,.btn-ghost svg{transition:transform .2s ease}
.btn-sun:hover svg{transform:translateX(3px)}
.eyebrow::before{content:"";display:inline-block;width:22px;height:10px;background:#FFC82E;transform:skew(-18deg);margin-right:10px;vertical-align:1px}
.sticker{animation:wobble 6s ease-in-out infinite}
@keyframes wobble{0%,100%{transform:rotate(-10deg)}50%{transform:rotate(-4deg)}}
@media (prefers-reduced-motion: reduce){.sticker{animation:none}article,article:hover,.btn-sun:hover,.btn-ghost:hover{transform:none}}

/* ---- Bildwechsel oben: Querformat 4:3, damit mehr vom Bild zu sehen ist ---- */
.hero-photo{height:auto !important;aspect-ratio:4 / 3;max-height:520px}
.hero-punkt span{display:block;width:8px;height:8px;border-radius:4px;background:rgba(255,255,255,0.6);transition:width .3s ease}
.hero-punkt[aria-current="true"] span{width:22px;background:#FFC82E}
.hero-pause .ic-play{display:none}
.hero-pause.pausiert .ic-play{display:block}
.hero-pause.pausiert .ic-pause{display:none}

/* ---- Kopfzeile bleibt beim Scrollen oben ---- */
header{position:sticky;top:0;z-index:60;transition:box-shadow .2s ease}
header > div,header img{transition:padding .2s ease,height .2s ease}
header.gescrollt{box-shadow:0 6px 20px rgba(29,42,107,0.12)}
header.gescrollt > div{padding-top:6px !important;padding-bottom:6px !important}
header.gescrollt img{height:50px !important}
@media (prefers-reduced-motion: reduce){header,header > div,header img{transition:none}}

/* ---- Wechselnde Bilder: sanft überblenden, leicht heranzoomen ---- */
.wechsel{position:relative}
.wechsel-bild{transition:opacity 3s ease-in-out}
.wechsel-bild + .wechsel-bild{position:absolute;inset:0;width:100% !important;height:100% !important}
.wechsel-bild:not(.aktiv){opacity:0}
.wechsel-bild.aktiv{animation:heranzoomen 26s ease-out both}
.hero-bild{transition:opacity 2.8s ease-in-out !important}
.hero-bild.aktiv{animation:heranzoomen-sanft 24s ease-out both}
@keyframes heranzoomen-sanft{from{transform:scale(1)}to{transform:scale(1.02)}}
@keyframes heranzoomen{from{transform:scale(1)}to{transform:scale(1.04)}}
@media (prefers-reduced-motion: reduce){.wechsel-bild.aktiv,.hero-bild.aktiv{animation:none}.wechsel-bild{transition:none}}

/* ---- Menü-Knopf (nur Handy) ---- */
.menu-knopf{display:none;width:48px;height:48px;border:0;background:#F4F6FD;border-radius:4px;color:#1D2A6B;align-items:center;justify-content:center;cursor:pointer}

/* ---- Schnellkontakt-Leiste (nur Handy) ---- */
.schnellkontakt{display:none}

/* ---- Leistungs-Kacheln: Erklärtext zum Aufklappen ---- */
.mehr-knopf{font:inherit;font-weight:700;color:#1D2A6B;background:none;border:0;padding:10px 0;margin-top:6px;min-height:44px;cursor:pointer;display:inline-flex;gap:6px;align-items:center;text-decoration:underline;text-underline-offset:3px}
.mehr-knopf:hover{color:#445AC1}
.mehr-knopf svg{transition:transform .25s ease}
.mehr-knopf[aria-expanded="true"] svg{transform:rotate(180deg)}
.mehr-text{margin-top:4px;padding-top:12px;border-top:1px solid #E3E7F6;font-size:16px;line-height:1.55;color:#3A4256}
.mehr-text p{margin:0 0 10px}
.mehr-text .gut{background:#F4F6FD;border-left:4px solid #FFC82E;padding:8px 12px;border-radius:0 4px 4px 0;font-size:15px}
.mehr-text .gut strong{color:#1D2A6B}
.mehr-anfragen:not(.btn-sun){display:inline-block;margin-top:4px;background:#FFC82E;color:#1D2A6B;text-decoration:none;font-weight:700;padding:11px 16px;border-radius:4px}
.mehr-anfragen:not(.btn-sun):hover{filter:brightness(0.95);color:#1D2A6B}

/* ---- Projekte-Filter ---- */
.filter button{font:inherit;font-weight:600;font-size:15px;padding:10px 16px;border-radius:999px;border:1.5px solid #BAC3EE;background:#FFFFFF;color:#1D2A6B;min-height:44px;cursor:pointer}
.filter button[aria-pressed="true"]{border-color:#1D2A6B;background:#1D2A6B;color:#FFFFFF;font-weight:700}
.projekte figure.weg{display:none}
.projekte:not(.offen) figure.spaeter{display:none}

/* ---- Formular ---- */
.chip{display:inline-flex;gap:8px;align-items:center;border:1.5px solid #BAC3EE;padding:10px 14px;border-radius:999px;font-weight:600;font-size:15px;color:#1D2A6B;min-height:44px;cursor:pointer;background:#FFFFFF;user-select:none}
.chip input{margin:0;accent-color:#FFC82E;width:16px;height:16px}
.chip:has(input:checked){border-color:#1D2A6B;background:#1D2A6B;color:#FFFFFF}
.chip.an{border-color:#1D2A6B;background:#1D2A6B;color:#FFFFFF}
.feld{display:flex;flex-direction:column;gap:6px;font-weight:600;color:#1D2A6B;font-size:15px;min-width:0}
.feld input,.feld select,.feld textarea{font:inherit;font-weight:400;padding:12px 14px;border:1.5px solid #BAC3EE;border-radius:4px;min-height:48px;width:100%;background:#FFFFFF;color:#1B2235}
.feld.klein input,.feld.klein select{padding:10px 12px;min-height:46px}
.feld textarea{resize:vertical;min-height:auto}
.feld input:focus,.feld select:focus,.feld textarea:focus{border-color:#445AC1;outline:2px solid #445AC1;outline-offset:0}
.hp{position:absolute !important;left:-10000px !important;width:1px;height:1px;overflow:hidden}

/* ---- Fotos / Unterlagen hochladen ---- */
.foto-upload{display:flex;flex-direction:column;gap:10px}
.fu-titel{font-weight:700;color:#1D2A6B;font-size:16px}
.fu-titel span{font-weight:500;color:#4A5266}
.fu-hilfe{margin:0;font-size:14px;color:#4A5266}
.fu-knopf{position:relative;display:flex;gap:10px;align-items:center;justify-content:center;min-height:56px;border:1.5px dashed #445AC1;border-radius:6px;background:#F8F9FE;color:#1D2A6B;font-weight:700;cursor:pointer;padding:10px 14px;overflow:hidden}
.fu-knopf:hover{background:#EEF1FC}
.fu-knopf input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.fu-knopf:has(input:focus-visible){outline:3px solid #FFC82E;outline-offset:2px}
.fu-liste{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.fu-eintrag{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0}
.fu-eintrag img,.fu-dok{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:6px;display:block;background:#EEF1FC}
.fu-dok{display:flex;align-items:center;justify-content:center;font-weight:800;color:#445AC1;font-size:15px;border:1.5px solid #BAC3EE}
.fu-name{font-size:12px;color:#4A5266;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fu-weg{position:absolute;top:-10px;right:-10px;width:32px;height:32px;border-radius:50%;border:2px solid #FFFFFF;background:#1D2A6B;color:#FFFFFF;font:inherit;font-size:20px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0 0 2px}
.fu-weg:hover{background:#445AC1}
.fu-meldung{margin:0;font-size:14px;color:#5A4300;background:#FFF4D6;border-radius:4px;padding:8px 10px}

/* ---- Solarrechner ---- */
.sr-seg{background:transparent;color:#1D2A6B}
.sr-seg[aria-pressed="true"]{background:#1D2A6B;color:#FFFFFF}
.sr-mode{background:transparent;color:#FFFFFF}
.sr-mode[aria-pressed="true"]{background:#FFC82E;color:#1D2A6B}
.sr-tog{background:#FFFFFF;color:#1D2A6B}
.sr-tog .sr-check{display:none}
.sr-tog[aria-pressed="true"]{background:#1D2A6B;color:#FFFFFF;border-color:#1D2A6B !important}
.sr-tog[aria-pressed="true"] .sr-check{display:block}

/* ---- Rechtstexte ---- */
.text-seite{max-width:820px;margin:0 auto;padding:64px 24px 96px}
.text-seite h1{font-size:44px;line-height:1.1;color:#1D2A6B;margin:0 0 24px}
.text-seite h2{font-size:26px;color:#1D2A6B;margin:40px 0 8px}
.text-seite h3{font-size:20px;color:#1D2A6B;margin:28px 0 6px}
.text-seite p,.text-seite li{color:#3A4256}

@media (min-width: 1101px){.hero-badge{bottom:40px !important}}

/* ---- Tablet ---- */
@media (max-width: 1100px){
  .hero-badge{left:auto !important; right:0 !important; bottom:-54px !important}
}

/* ---- Handy ---- */
@media (max-width: 760px){
  body{font-size:16px;padding-bottom:76px;hyphens:auto;-webkit-hyphens:auto}
  .sr-mode{font-size:13px !important;padding:6px 4px !important}
  .hero-h1{font-size:40px !important}
  .h2{font-size:30px !important}
  .topbar-extra{display:none !important}
  .hero-photo{height:auto !important;aspect-ratio:4 / 3}
  .hero-cutout{height:260px !important; left:-10px !important; bottom:-40px !important}
  .hero-badge{max-width:180px !important; padding:10px 12px !important; font-size:14px !important}
  .sticker{zoom:.72}
  section > div{padding-top:56px !important;padding-bottom:56px !important;padding-left:16px !important;padding-right:16px !important}
  #start > div{padding-top:28px !important}
  header > div{padding:10px 16px !important;flex-wrap:nowrap !important}
  header img{height:46px !important}
  .menu-knopf{display:flex}
  .nav{display:none !important;position:absolute;left:0;right:0;top:100%;z-index:50;background:#FFFFFF;flex-direction:column;align-items:stretch !important;gap:0 !important;padding:8px 16px 16px;box-shadow:0 12px 24px rgba(29,42,107,0.15)}
  .nav.offen{display:flex !important}
  .nav a{padding:14px 4px;border-bottom:1px solid #E3E7F6;font-size:18px}
  .nav a.btn-sun{margin-top:12px;text-align:center;border-bottom:0}
  header.gescrollt > div{padding-top:6px !important;padding-bottom:6px !important}
  header.gescrollt img{height:38px !important}
  section[id],div[id],form[id]{scroll-margin-top:72px}
  #anfrage{padding:22px !important}
  .sr-box{padding:20px !important}
  .sr-big{font-size:48px !important}
  .schnellkontakt{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:40;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px 12px calc(12px + env(safe-area-inset-bottom));background:#FFFFFF;box-shadow:0 -6px 20px rgba(29,42,107,0.12)}
  .schnellkontakt a{display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;background:#1D2A6B;color:#FFFFFF;text-decoration:none;font-weight:700;font-size:14px;padding:9px 4px;border-radius:4px;min-height:52px}
  .schnellkontakt a.gelb{background:#FFC82E;color:#1D2A6B}
  .text-seite{padding:36px 16px 64px}
  .text-seite h1{font-size:32px}
  footer > div{padding-left:16px !important;padding-right:16px !important}
}
@media print{.schnellkontakt,.menu-knopf,video{display:none !important}}
@media (max-width: 760px){
  .hero-cap{display:none}
  div:has(> .hero-cap){bottom:auto !important;top:10px;right:auto !important;left:12%;padding:2px 4px 2px 6px !important}
}
@media (max-width: 760px){ .danke-foto{height:300px !important} }
@media (min-width: 761px){
  div:has(> .hero-cap){bottom:auto !important;top:16px;right:auto !important;left:17%}
}
@media (min-width: 761px){
  .sticker{top:auto !important;bottom:-34px;right:1% !important}
}
