/* ============================================
   Johannes Selinger – Energie- & Kaufberatung
   ============================================ */

:root {
  --navy: #1b3a4b;
  --navy-dark: #12262f;
  --gold: #c9922f;
  --gold-light: #e0b565;
  --bg: #f7f5f1;
  --bg-card: #ffffff;
  --text: #22303a;
  --text-muted: #5a6b74;
  --border: #e2ded4;
  --radius: 10px;
  --max-width: 1120px;
  font-size: 17px;
}

* { box-sizing: border-box; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-wrap: break-word;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Verhindert, dass Grid-/Flex-Kinder ihre Kachel breiter machen als der
   verfügbare Platz – die häufigste Ursache für horizontales Scrollen auf
   dem Handy (Grid-/Flex-Kinder haben sonst eine implizite Mindestbreite,
   die sich am unumbrochenen Inhalt orientiert). */
.grid-2 > *, .grid-3 > *, .about-grid > *, .contact-grid > *, .steps > * {
  min-width: 0;
}

a { color: var(--navy); }
a:hover { color: var(--gold); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
header.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand img { height: 42px; width: 42px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--gold-light);
  font-weight: 400;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: #eef2f4;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--gold-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  nav.main-nav {
    display: none;
    width: 100%;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    padding: 10px 0 16px;
  }
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 72px 0 84px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero .container > div {
  min-width: 0;
}

@media (max-width: 780px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.25;
  margin: 0 0 18px;
  overflow-wrap: break-word;
}

.hero p.lead {
  font-size: 1.15rem;
  color: #dbe3e7;
  margin-bottom: 28px;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,146,47,0.15);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-visual {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 28px;
}

.hero-visual ul {
  margin: 0;
  padding-left: 20px;
  color: #dbe3e7;
}
.hero-visual li { margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--navy-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  margin-left: 12px;
}
.btn-outline:hover {
  background: #fff;
  color: var(--navy);
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: #efece3; }

h2.section-title {
  font-size: 1.9rem;
  color: var(--navy);
  margin-bottom: 10px;
}

p.section-intro {
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 780px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.card .icon {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
}

.card h3 {
  color: var(--navy);
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.card p { color: var(--text-muted); margin: 0 0 14px; }

.card a.card-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--gold);
}
.card a.card-link:hover { color: var(--navy); }

/* ---------- Notice / disclaimer ---------- */
.notice {
  background: #fdf6e8;
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  border-radius: 6px;
  margin: 32px 0;
}
.notice strong { color: var(--navy); }

/* ---------- Resource / Erklärbox (z. B. Energieausweis verstehen) ---------- */
.resource-box {
  background: #fdf6e8;
  border: 1px solid #f0dfb8;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.resource-box h4 { margin: 0 0 8px; color: var(--navy); }
.resource-box strong { color: var(--navy); }

/* ---------- Lists in content ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  color: var(--text);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
  background: rgba(201,146,47,0.15);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ---------- Steps ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 30px 24px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h4 { margin: 8px 0 8px; color: var(--navy); }
.step p { margin: 0; color: var(--text-muted); }

/* ---------- Quote ---------- */
.quote {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding-left: 24px;
  margin: 36px 0;
}

/* ---------- About photo ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: var(--radius);
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(27,58,75,0.18);
}
.about-photo .about-logo {
  width: 42%;
  max-width: 150px;
  aspect-ratio: auto;
  object-fit: contain;
  border: none;
  box-shadow: none;
  border-radius: 0;
  margin: 20px auto 0;
  display: block;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info .item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-info .item .icon {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px;
}
.contact-info .item strong { display: block; color: var(--navy); }

form.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
form.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 0.92rem;
}
form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 18px;
  font-family: inherit;
  font-size: 0.98rem;
  background: #fff;
}
form.contact-form textarea { min-height: 130px; resize: vertical; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-dark);
  color: #cfd8dc;
  padding: 40px 0 24px;
  font-size: 0.9rem;
}
footer.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}
footer.site-footer a { color: #cfd8dc; }
footer.site-footer a:hover { color: var(--gold-light); }
footer.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  font-size: 0.82rem;
  color: #8fa0a8;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 54px 0;
}
.page-hero h1 { margin: 0 0 10px; font-size: 2.1rem; }
.page-hero p { color: #dbe3e7; margin: 0; max-width: 640px; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--gold-light); }

/* ---------- Foto-Banner (ganze Breite, mit Bildunterschrift) ---------- */
.photo-banner {
  margin: 40px 0;
}
.photo-banner img {
  width: 100%;
  aspect-ratio: 16/8;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(27,58,75,0.14);
}
.photo-banner figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Foto neben Text (z. B. "So arbeite ich") ---------- */
.photo-text-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}
.photo-text-grid > * { min-width: 0; }
@media (max-width: 780px) {
  .photo-text-grid { grid-template-columns: 1fr; }
}
.photo-text-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(27,58,75,0.14);
}
.photo-text-grid .steps {
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ---------- Mobile (Smartphones, ~480px und schmäler) ---------- */
@media (max-width: 480px) {
  :root { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { padding: 12px 16px; }
  .brand img { height: 34px; width: 34px; }
  .brand-name { font-size: 0.95rem; }
  .brand-tagline { font-size: 0.68rem; }

  .hero { padding: 40px 0 48px; }
  .hero-logo { width: 64px; height: 64px; margin-bottom: 16px; }
  .hero-badge { font-size: 0.75rem; padding: 6px 12px; }
  .hero h1 { font-size: 1.55rem; line-height: 1.32; margin-bottom: 14px; }
  .hero p.lead { font-size: 0.97rem; margin-bottom: 22px; }
  .hero-visual { padding: 18px; }

  .btn { padding: 11px 18px; font-size: 0.92rem; }
  .btn-outline { margin-left: 0; margin-top: 10px; }

  section { padding: 40px 0; }
  h2.section-title { font-size: 1.32rem; margin-bottom: 8px; }
  p.section-intro { font-size: 0.95rem; margin-bottom: 26px; }

  .card { padding: 22px 20px; }
  .card h3 { font-size: 1.1rem; }
  .step { padding: 26px 20px 20px; }
  .resource-box { padding: 18px 20px; }

  .quote { font-size: 1.02rem; padding-left: 16px; margin: 24px 0; }

  .photo-banner { margin: 28px 0; }
  .photo-banner img { aspect-ratio: 4/3; }
  .photo-banner figcaption { font-size: 0.8rem; }

  .page-hero { padding: 32px 0; }
  .page-hero h1 { font-size: 1.4rem; }
  .page-hero p { font-size: 0.95rem; }

  .about-photo .about-logo { width: 55%; }
}
