/* ============================================================
   ENERGIE Klingler — Modern Static Site Stylesheet
   Barlow font (bundled locally), no external dependencies
   ============================================================ */

/* ---------- Font-face ---------- */
@font-face {
  font-family: 'Barlow';
  src: local(''),
       url('images/fonts/barlow-v4-latin-regular.woff2') format('woff2'),
       url('images/fonts/barlow-v4-latin-regular.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Barlow';
  src: local(''),
       url('images/fonts/barlow-v4-latin-700.woff2') format('woff2'),
       url('images/fonts/barlow-v4-latin-700.woff')  format('woff');
  font-weight: 700;
  font-style: normal;
}

/* ---------- CSS custom properties ---------- */
:root {
  --col-dark:    #1e2530;
  --col-dark2:   #252e39;
  --col-primary: #0057a8;
  --col-green:   #5aa832;
  --col-orange:  #e8820c;
  --col-light:   #f5f6f8;
  --col-text:    #1f2328;
  --col-muted:   #57606a;
  --col-border:  #e5e7eb;
  --col-surface: #f7f8fa;
  --col-white:   #ffffff;
  --radius:      10px;
  --shadow:      0 4px 16px rgba(0,0,0,.12);
  --max-w:       1100px;
  --nav-h:       64px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--col-text);
  background: var(--col-light);
}

a             { color: var(--col-primary); text-decoration: none; }
a:hover       { text-decoration: underline; }
img           { max-width: 100%; height: auto; display: block; }
ul            { list-style: disc; padding-left: 1.4rem; }
li            { margin-bottom: .35rem; }
strong        { font-weight: 700; }
hr            { border: none; border-top: 1px solid var(--col-border); margin: 1.5rem 0; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .6rem;
  color: var(--col-dark2);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem;  color: var(--col-primary); margin-top: 1.2rem; }
h3 { font-size: 1.05rem; color: var(--col-muted);   font-weight: 400; margin-top: .4rem; }
h4 { font-size: 1rem; }

p  { margin-bottom: .75rem; }

/* ---------- Utility ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Site Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--col-dark);
  height: var(--nav-h);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo img {
  height: 44px;
  width: auto;
}
.site-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav a {
  display: inline-block;
  padding: .4rem .85rem;
  border-radius: 20px;
  color: var(--col-light);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--col-primary);
  color: var(--col-white);
  text-decoration: none;
}
.site-nav li.active a {
  color: var(--col-white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--col-light);
  border-radius: 2px;
}

/* ---------- Sub-page header banner ---------- */
.sub-header-img {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow: hidden;
  max-height: 215px;
}
.sub-header-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ---------- Hero (Homepage only) ---------- */
.hero {
  position: relative;
  background: var(--col-dark2);
  padding: 5rem 1.25rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--col-dark) 0%, var(--col-dark2) 60%, #2a3b20 100%);
  opacity: .85;
}
.hero-accent {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--col-primary), var(--col-green), var(--col-orange));
}
.hero h1 {
  position: relative;
  color: var(--col-white);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.35;
}

/* ---------- Page content wrapper ---------- */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* ---------- Content grid (2-column) ---------- */
.content-grid {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  background: var(--col-white);
  border: 1px solid var(--col-border);
  border-top: 3px solid var(--col-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.content-grid .col-left,
.content-grid .col-right {
  flex: 1 1 0;
  min-width: 0;
}
.content-grid .col-left img {
  border-radius: var(--radius);
  margin-top: .75rem;
}
.div-text {
  font-style: italic;
  color: var(--col-muted);
  margin-bottom: .75rem;
}

/* ---------- Startseite lists ---------- */
.startseite_liste {
  list-style: none;
  padding: 0;
}
.startseite_liste li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .35rem 0;
  margin-bottom: .4rem;
}
.startseite_liste li::before {
  content: '✓';
  color: var(--col-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .05em;
}
.startseite_liste a {
  color: var(--col-text);
  font-weight: 400;
}
.startseite_liste a:hover { color: var(--col-primary); }

/* ---------- Timeline list (STATIONEN) ---------- */
.timeline-list {
  list-style: none;
  padding: 0;
}
.timeline-list li {
  padding: .55rem 0 .55rem 1.1rem;
  border-left: 3px solid var(--col-orange);
  margin-bottom: .75rem;
}

/* ---------- Certificate block ---------- */
.certificate-block {
  text-align: center;
  margin: 2rem 0;
}
.certificate-block img {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Back-to-top ---------- */
.gotop_fixed {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
}
.gotop_fixed a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--col-primary);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  opacity: .8;
  transition: opacity .2s, transform .2s;
  text-decoration: none;
}
.gotop_fixed a:hover {
  opacity: 1;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--col-dark);
  color: var(--col-light);
  padding: 1.75rem 0;
  margin-top: 3rem;
  border-top: 3px solid var(--col-primary);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-copy { font-size: .875rem; color: #aab; }
.footer-links a {
  color: var(--col-light);
  font-size: .875rem;
  margin-left: .5rem;
}
.footer-links a:hover { color: var(--col-orange); text-decoration: none; }

/* ============================================================
   SUBPAGE LAYOUTS
   ============================================================ */

/* ---------- Content logo icon ---------- */
.content_logo {
  float: right;
  margin: 0 0 1rem 1.5rem;
}
.content_logo img {
  max-width: 80px;
}

/* ---------- Section card ---------- */
.section-card {
  background: var(--col-white);
  border: 1px solid var(--col-border);
  border-top: 3px solid var(--col-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2rem;
  overflow: hidden;
}
.section-card::after { content: ''; display: table; clear: both; }

/* ---------- Two-column flex layout (subpages) ---------- */
.two-col {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}
.two-col .col-img  { flex: 0 0 auto; max-width: 320px; }
.two-col .col-text { flex: 1 1 0; min-width: 0; }
.two-col .col-img img { border-radius: var(--radius); }

/* ---------- Content full-width image blocks ---------- */
.Gebaeude_img {
  text-align: center;
  margin: 1.5rem 0;
}
.Gebaeude_img img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

/* ---------- Energiemanagement photo trio ---------- */
.Energiemanagement {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.Energiemanagement_01,
.Energiemanagement_02,
.Energiemanagement_03 {
  flex: 1 1 200px;
  text-align: center;
  font-size: .875rem;
}
.Energiemanagement_01 img,
.Energiemanagement_02 img,
.Energiemanagement_03 img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: .5rem;
}

/* ---------- Inline lists (Energiemanagement) ---------- */
.Energiemanagement_ul { margin: 1.5rem 0; }
.Energiemanagement_ul_01,
.Energiemanagement_ul_02 { margin-bottom: 1rem; }
.Energiemanagement_ul_liste { margin-bottom: .75rem; }

.Energie_einzeilig_ul { margin: 1.25rem 0; }
.Energie_einzeilig_ul_liste li { margin-bottom: .4rem; }

/* ---------- Reference table ---------- */
.referenzen { margin-top: 1rem; }

.ref-header,
.ref-row {
  display: grid;
  grid-template-columns: 130px 60px 1fr 140px 130px 180px;
  gap: 0;
  border-bottom: 1px solid var(--col-border);
}
.ref-header {
  background: var(--col-dark2);
  color: var(--col-white);
  font-weight: 700;
  font-size: .8rem;
}
.ref-row:nth-child(even) { background: var(--col-surface); }
.ref-row:hover           { background: #e8f0fb; }

.ref-header > div,
.ref-row    > div {
  padding: .55rem .75rem;
  font-size: .85rem;
  line-height: 1.4;
}
.ref-row .zelle_1 { font-weight: 700; color: var(--col-primary); }
.ref-row .zelle_2 { color: var(--col-muted); }
.ref-row .zelle_3 a { color: var(--col-primary); }
.ref-row .zelle_3 img { display: inline; vertical-align: middle; margin-right: .25rem; height: 14px; }

/* ---------- Contact page ---------- */
.contact-block {
  background: var(--col-white);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2rem;
}
.contact-block dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .4rem .75rem;
  margin: 1rem 0;
}
.contact-block dt { font-weight: 700; color: var(--col-muted); }
.contact-block dd { margin: 0; }

.contact-form {
  background: var(--col-white);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 640px;
}
.contact-form h3 { margin-bottom: 1rem; }
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: .3rem;
  font-size: .9rem;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  background: var(--col-surface);
}
.form-row textarea { resize: vertical; min-height: 160px; }
.form-row.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.form-row.checkbox-row input { margin-top: .2rem; flex-shrink: 0; }
.required-star { color: var(--col-orange); }

.btn-submit {
  background: var(--col-primary);
  color: var(--col-white);
  border: none;
  border-radius: 20px;
  padding: .6rem 1.8rem;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  margin-top: .5rem;
}
.btn-submit:hover          { background: #004490; }
.btn-submit:focus-visible  { outline: 3px solid var(--col-orange); outline-offset: 3px; }
.btn-submit:disabled       { opacity: .6; cursor: not-allowed; }

/* ---------- Form feedback banners ---------- */
.form-feedback {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .95rem;
  line-height: 1.5;
}
.form-feedback--success {
  background: #eaf6e4;
  border: 1px solid #88c96a;
  color: #2d6a14;
}
.form-feedback--error {
  background: #fef2e8;
  border: 1px solid var(--col-orange);
  color: #7a3a00;
}
.form-feedback--error a { color: #7a3a00; text-decoration: underline; }

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */
.legal-content h2 { margin-top: 1.5rem; }
.legal-content p  { margin-bottom: .65rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .ref-header,
  .ref-row {
    grid-template-columns: 110px 50px 1fr 110px 100px 140px;
  }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--col-dark);
    padding: .75rem 1rem 1rem;
    gap: .2rem;
  }
  .nav-toggle { display: flex; }

  .content-grid { flex-direction: column; }
  .two-col { flex-direction: column; }
  .two-col .col-img { max-width: 100%; }

  .ref-header { display: none; }
  .ref-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    padding: .5rem;
    gap: .25rem;
  }
  .ref-row .zelle_3 { grid-column: 1 / -1; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .Energiemanagement { flex-direction: column; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .hero { padding: 3rem 1rem; }
  .content-grid, .section-card, .contact-block, .contact-form { padding: 1.1rem; }
}

/* ---------- Camera slideshow ---------- */
.slideshow-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}
.cameraContents {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111;
  line-height: 0;
}
.cameraContent {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
/* first child sets the container height via normal flow */
.cameraContents .cameraContent:first-child {
  position: relative;
}
.cameraContent img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.cameraContent.cameracurrent {
  opacity: 1;
}
