/* =========================================================
   BBG Beteiligungs- und Beratungsgesellschaft mbH
   Gemeinsames Stylesheet
   ========================================================= */

/* Schrift: Inter (SIL Open Font License, siehe fonts/LICENSE.txt),
   lokal gehostet – keine Verbindung zu externen Servern */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable-latin.woff2") format("woff2");
}

:root {
  /* Markenfarben */
  --color-blue: #0669a4;
  --color-blue-dark: #04507d;
  --color-yellow: #f89b34;
  --color-yellow-dark: #d97d16;
  --color-red: #888888;

  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f8;
  --color-text: #1f2933;
  --color-text-muted: #52606d;
  --color-primary: var(--color-blue);
  --color-primary-dark: var(--color-blue-dark);
  --color-accent: var(--color-yellow);
  --color-accent-dark: var(--color-yellow-dark);
  --color-border: #d9e0e6;
  --color-footer-bg: #063a5a;
  --color-footer-text: #d3e1ec;

  --font-base: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1180px;
  --radius: 8px;
  --transition: 0.2s ease-in-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--color-accent-dark);
}

h1, h2, h3, h4 {
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

section:nth-of-type(even) {
  background-color: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 0.75rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-yellow) 0 33%, var(--color-red) 33% 66%, var(--color-blue) 66%);
}

/* ---------- Barrierefreiheit ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(6, 105, 164, 0.12);
  border-top: 4px solid var(--color-accent);
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 104px;
  max-width: 1440px;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}

.site-logo,
.city-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 62px;
  width: auto;
}

.city-logo {
  padding-left: 1.5rem;
  border-left: 1px solid var(--color-border);
}

.city-logo img {
  height: 72px;
  width: auto;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle .bar {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-primary-dark);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.main-nav.is-open {
  max-height: 400px;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 1rem 1.5rem 1.5rem;
  list-style: none;
}

.main-nav li {
  width: 100%;
}

.main-nav a {
  display: block;
  color: #eef2f6;
  font-weight: 500;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-accent);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background:
    linear-gradient(135deg, rgba(6, 80, 125, 0.9) 0%, rgba(6, 105, 164, 0.82) 60%, rgba(136, 136, 136, 0.75) 100%),
    url("images/bueroflaechen-8.jpg") center / cover no-repeat;
  color: #fff;
  padding: 5rem 0;
  text-align: center;
}

.hero .container {
  max-width: 780px;
}

.hero-logo-link {
  display: inline-block;
  margin: 0 auto 2rem;
}

.hero-logo {
  height: 88px;
  width: auto;
}

.hero h1 {
  color: #fff;
}

/* =========================================================
   Über uns
   ========================================================= */
.about-content {
  max-width: 820px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.05rem;
}

.lead-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* =========================================================
   Projekt-Kachel
   ========================================================= */
.project-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2.5rem;
  max-width: 1050px;
  margin: 0 auto;
}

.project-info h3 {
  margin-bottom: 0.5rem;
}

.project-info p {
  margin-bottom: 1.25rem;
}

.project-logo {
  height: 80px;
  width: auto;
  margin: 0 0 1.25rem;
}

.project-photo-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(6, 105, 164, 0.14);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-photo-link:hover,
.project-photo-link:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(6, 105, 164, 0.22);
}

.project-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 820px) {
  .project-card {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: #1f2933;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: background-color var(--transition), transform var(--transition);
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--color-accent-dark);
  color: #1f2933;
  transform: translateY(-2px);
}

/* =========================================================
   Kontakt
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 340px));
  justify-content: center;
  gap: 3rem;
}

.contact-block h3 {
  margin-bottom: 0.75rem;
}

.contact-block address {
  font-style: normal;
  color: var(--color-text-muted);
}

.contact-block p {
  margin-bottom: 0.4em;
}

.contact-block a {
  font-weight: 600;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* Hinweis Stadt Hennigsdorf */
.parent-company {
  text-align: center;
}

.parent-company p {
  max-width: 700px;
  margin: 0 auto;
}

.parent-company p + p {
  margin-top: 1em;
}

.parent-company a {
  font-weight: 600;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 3rem 0 1.5rem;
  border-top: 4px solid var(--color-accent);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand a {
  display: inline-block;
}

.footer-logo-bbg {
  width: 200px;
  height: auto;
}

.footer-logo-rwk {
  width: 120px;
  height: auto;
}

.footer-nav h4,
.footer-address h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.6rem;
}

.footer-nav a,
.footer-address a {
  color: var(--color-footer-text);
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-address a:hover,
.footer-address a:focus-visible {
  color: var(--color-accent);
}

.footer-address address {
  font-style: normal;
  color: var(--color-footer-text);
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--color-footer-text);
  opacity: 0.8;
}

/* =========================================================
   Unterseiten (Impressum, Datenschutz)
   ========================================================= */
.legal-page main {
  padding: 3.5rem 0 5rem;
}

.legal-page .container {
  max-width: 820px;
}

.legal-page .site-header .container,
.legal-page .site-footer .container {
  max-width: var(--max-width);
}

.legal-page .site-header .container {
  max-width: 1440px;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
}

.legal-page .page-title + h2 {
  margin-top: 0;
}

.legal-page .page-title {
  margin-bottom: 2rem;
}

.legal-page .page-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-yellow) 0 33%, var(--color-red) 33% 66%, var(--color-blue) 66%);
}

.legal-page main address {
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 1em;
}

/* =========================================================
   Kleine Bildschirme
   ========================================================= */
@media (max-width: 600px) {
  section {
    padding: 3rem 0;
  }

  .site-header .container {
    min-height: 84px;
    padding: 0 1rem;
  }

  .header-logos {
    gap: 0.9rem;
  }

  .site-logo img {
    height: 40px;
  }

  .city-logo {
    padding-left: 0.9rem;
  }

  .city-logo img {
    height: 46px;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .hero-logo {
    height: 52px;
  }
}

@media (max-width: 380px) {
  .site-logo img { height: 34px; }
  .city-logo img { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
