/* =========================================================
   SVB Rhein-Mosel GmbH – Global Stylesheet (style_svb.css)
   Barrierefrei optimiert
   ========================================================= */

/* ===== CSS Variablen ===== */
:root {
  --primary: #0e7abe;
  --dark: #003057;
  --light-bg: #f5f5f5;
  --text: #222;
  /* Kontrast erhöht: von #666 auf #555 für bessere Lesbarkeit */
  --muted: #555; 
  --accent: #f6b21a;
  --card-border: #e0e0e0;

  --error: #c0392b;
  --success: #2e7d32;
}

/* ===== Reset / Basics ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* A11y: 100% respektiert die Browser-Einstellungen des Users (z.B. "Große Schrift") */
html { font-size: 100%; }

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* A11y: Globaler Fokus-Stil für Tastatur-Nutzer */
:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Optional: Fokus-Ring bei Mausklicks unterdrücken, wenn gewünscht (aber :focus ist sicherer) */
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* A11y: Skip-Link Klasse (visuell versteckt, sichtbar bei Fokus) */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  z-index: 10000;
  font-weight: bold;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
}

/* Gemeinsamer Inhaltsrahmen */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header / Navigation ===== */
header {
  border-bottom: 1px solid var(--card-border);
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: url("helm_logo.png") center / contain no-repeat;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text {
  font-weight: 700;
  color: var(--dark);
  font-size: 0.875rem; /* 14px in rem */
}

.tagline {
  font-size: 0.75rem; /* 12px in rem */
  color: var(--muted);
  max-width: 520px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  font-size: 0.875rem; /* 14px */
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav a:hover { border-bottom-color: rgba(14, 122, 190, 0.35); color: var(--primary); }

nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* ===== Main ===== */
main {
  padding: 28px 0 40px;
  background: #fff;
}

/* =========================================================
   STARTSEITE (index.htm) – Home Grid / Panels / Hero
   ========================================================= */

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.panel {
  background: #fff;
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  overflow: hidden;
}

.panel.pad { padding: 26px; }

/* (1) Willkommen */
.welcome-title {
  font-size: 2.75rem; /* 44px */
  line-height: 1.06;
  font-weight: 800;
  color: #2b2b2b;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.welcome-text {
  /* A11y: Dunkleres Grau für besseren Kontrast (> 4.5:1) */
  color: #555; 
  font-size: 0.875rem; /* 14px */
  max-width: 520px;
}

.welcome-text p + p { margin-top: 10px; }

.cta-row { margin-top: 22px; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  font-size: 0.875rem; /* 14px */
  border: 0;
}

.cta-btn:hover { filter: brightness(0.97); }

/* (2) Bildhalter mit Farbsprung */
.hero-image-wrap {
  position: relative;
  min-height: 340px;
  background: #fff;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44%;
  background: var(--accent);
}

.hero-image {
  position: absolute;
  right: 18px;
  top: 18px;
  bottom: 18px;
  left: 18px;
  border-radius: 22px;
  background: #d8d8d8;
  background-image: url("home_hero_placeholder.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.hero-image-label {
  position: absolute;
  left: 22px;
  bottom: 22px;
  background: rgba(0, 0, 0, 0.75); /* A11y: Transparenz verringert für besseren Kontrast */
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.75rem; /* 12px */
}

/* (3) / (4) Teaser */
.teaser-title {
  font-size: 1.25rem; /* 20px */
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
}

.teaser-text {
  font-size: 0.875rem; /* 14px */
  color: var(--muted);
  margin-bottom: 14px;
}

.teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem; /* 14px */
}

.teaser-link:hover { text-decoration: underline; }

/* =========================================================
   SiGeKo / Gutachter – Services Grid
   ========================================================= */

.page-title {
  text-align: center;
  margin-bottom: 32px;
  color: var(--primary);
  font-size: 1.75rem; /* 28px */
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.service-content {
  padding: 18px 20px 20px;
}

.service-title {
  font-size: 1.125rem; /* 18px */
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}

.service-content ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 0.875rem; /* 14px */
}

.service-content li + li { margin-top: 4px; }

/* Service-Bildbox (quadratisch, contain) */
.service-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* Bildzuordnung SiGeKo */
.service-image.planungsphase { background-image: url("sigeko_l.png"); }
.service-image.umsetzungsphase { background-image: url("sigeko_ll.png"); }

/* Bildzuordnung Gutachter */
.service-image.taetigkeitsbereich { background-image: url("gutachter_l.png"); }
.service-image.bestellungsgebiet { background-image: url("gutachter_ll.png"); }

/* Gutachter Intro */
.intro-text {
  font-size: 0.875rem; /* 14px */
  color: var(--muted);
  margin: 0 auto 18px;
  max-width: 900px;
}

.intro-text p + p { margin-top: 10px; }

/* =========================================================
   Impressum / Datenschutz – Content Layout
   ========================================================= */

.content {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  padding: 2.2rem 1rem 2.5rem;
  font-size: 0.95rem;
}

.content h1 {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 1.6rem;
  line-height: 1.3;
  text-align: center;
}

.content h2 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.content h3 {
  font-size: 1rem;
  color: var(--dark);
  margin-top: 1.3rem;
  margin-bottom: 0.4rem;
}

.content p { margin-bottom: 0.7rem; }

.content ul {
  margin: 0.2rem 0 0.8rem 1.1rem;
  padding-left: 0.7rem;
  list-style: disc;
}

.content li + li { margin-top: 0.2rem; }

.content strong { font-weight: 700; }

.content a {
  color: var(--primary);
  text-decoration: underline;
}

.small-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.2rem;
}

/* =========================================================
   Kontakt – Formular Layout
   ========================================================= */

.contact-wrapper {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 2.2rem 1rem 2.5rem;
}

.contact-title {
  text-align: center;
  color: var(--primary);
  font-size: 1.7rem;
  margin-bottom: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

/* Statusmeldungen */
.alert {
  padding: 0.6rem 0.8rem;
  border-radius: 3px;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.alert-success {
  background-color: #e6f4ea;
  border: 1px solid rgba(46, 125, 50, 0.6);
  color: var(--success);
}

.alert-error {
  background-color: #fdecea;
  border: 1px solid rgba(192, 57, 43, 0.6);
  color: var(--error);
}

.error-list {
  margin-top: 0.4rem;
  margin-left: 1.1rem;
  font-size: 0.85rem;
}

.error-list li + li { margin-top: 0.1rem; }

/* Formular */
.contact-form { background: #fff; }

.form-group { margin-bottom: 0.9rem; }

.form-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.form-label span.required { color: var(--error); }

.form-control,
.form-textarea {
  width: 100%;
  /* A11y: Rahmen dunkler (#767676) für 3:1 Kontrast */
  border: 1px solid #767676; 
  border-radius: 2px;
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  font-family: inherit;
  background-color: var(--light-bg);
}

/* Fokus-Zustand für Eingabefelder explizit machen */
.form-control:focus,
.form-textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--primary);
  background-color: #fff;
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
}

.form-row-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.4rem 0 0.3rem;
  font-size: 0.85rem;
}

.form-row-inline input[type="checkbox"] { margin-top: 0.2rem; }

.form-row-inline a {
  color: var(--primary);
  text-decoration: underline;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.4rem 0 0.9rem;
}

.btn-primary {
  display: inline-block;
  border: none;
  border-radius: 3px;
  background-color: var(--primary);
  color: #fff;
  padding: 0.45rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover { background-color: #0b639c; }

/* Seitenleiste */
.contact-aside { font-size: 0.9rem; }

.contact-aside-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-aside p { margin-bottom: 0.3rem; }

.contact-aside a {
  color: var(--primary);
  text-decoration: underline;
}

.contact-aside h3 {
  font-size: 1rem;
  margin: 1.2rem 0 0.4rem;
  color: var(--dark);
}

.contact-aside ul {
  list-style: disc;
  padding-left: 1.1rem;
}

.contact-aside li + li { margin-top: 0.2rem; }

/* =========================================================
   Footer (4 Spalten + Logo rechts)
   ========================================================= */

footer {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.8125rem; /* 13px */
  margin-top: 24px;
}

/* gemeinsamer Innenabstand – identisch zum Hauptinhalt */
.footer-inner {
  padding: 18px 16px 22px;
}

/* Titel */
.footer-block-title {
  font-weight: 700;
  margin-bottom: 4px;
}

/* Links */
.footer-link { color: #fff; }
.footer-link:hover { text-decoration: underline; }

/* Grid: 4 Spalten je 25% */
.footer-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: center;
}

/* Textausrichtung je Spalte */
.footer-4col > .footer-col:nth-child(1) { text-align: left; }

.footer-4col > .footer-col:nth-child(2),
.footer-4col > .footer-col:nth-child(3) { text-align: center; }

.footer-4col > .footer-col:nth-child(4) { text-align: right; }

/* Logo rechtsbündig */
.footer-logo {
  display: flex;
  justify-content: flex-end;
}

.footer-logo img {
  height: 100px;
  width: auto;
  max-width: none;
  display: block;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  /* Startseite */
  .welcome-title { font-size: 2.25rem; /* 36px */ }
  .hero-image-wrap { min-height: 300px; }
  .hero-image-wrap::before { width: 38%; }

  /* Kontakt */
  .contact-grid { grid-template-columns: 1fr; }

  /* Footer: mobil alles links */
  .footer-4col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Footer: mobil alles links (überschreibt nth-child-Regeln sicher) */
  .footer-4col > .footer-col:nth-child(1),
  .footer-4col > .footer-col:nth-child(2),
  .footer-4col > .footer-col:nth-child(3),
  .footer-4col > .footer-col:nth-child(4) {
    text-align: left;
  }

  .footer-logo {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .footer-logo img {
    height: 70px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 800px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  nav ul {
    gap: 16px;
    justify-content: flex-start;
  }

  /* Startseite: 1 Spalte */
  .home-grid { grid-template-columns: 1fr; }

  /* Services: 1 Spalte */
  .services-grid { grid-template-columns: 1fr; }

  /* Impressum/Datenschutz: H1 links (wie BAK) */
  .content h1 {
    font-size: 1.5rem;
    text-align: left;
  }
}