/* --------------------------------------------------------
   Google Fonts (Montserrat für Headlines, Roboto für Fließtexte)
   -------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Roboto:wght@400;500;700&display=swap');

/* --------------------------------------------------------
   Farbpalette als CSS-Variablen (Primär: Dunkles Blau, Sekundär: Hellgrau, Akzent: Ocker-Gelb)
   -------------------------------------------------------- */
:root {
  /* Primärfarben */
  --color-primary-dark:   #1a3d6c;  /* Dunkles Blau */
  --color-primary:        #2c5484;  /* Mittel-Blau */
  --color-accent:         #d4a017;  /* Ocker-Gelb */
  /* Sekundärfarben */
  --color-bg-light:       #f9f9f9;  /* Sehr helles Grau (Seitenhintergrund) */
  --color-surface:        #ffffff;  /* Reines Weiß für Oberflächen */
  /* Textfarben */
  --color-text-primary:   #333333;  /* Dunkelgrau für Fließtext */
  --color-text-secondary: #555555;  /* Mittleres Grau für Untertexte */
  --color-heading:        #1a3d6c;  /* Dunkel-Blau für Überschriften */
  /* Border/Shadows */
  --color-border:         #e0e0e0;  /* Hellgrauer Rahmen */
  --transition-fast:      0.2s ease-in-out;
}

/* --------------------------------------------------------
   Basis-Reset & Typografie
   -------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  background-color: var(--color-bg-light);
  color: var(--color-text-primary);
}

body {
  min-height: 100vh;
}

/* --------------------------------------------------------
   Container
   -------------------------------------------------------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* --------------------------------------------------------
   Überschriften & Absätze
   -------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-heading);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--color-text-secondary);
}

/* Links (Standard und Hover) */
a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover,
a:focus {
  color: var(--color-accent);
  outline: none;
}

/* --------------------------------------------------------
   Navigation (Header) – schlicht & modern
   -------------------------------------------------------- */
header {
  background-color: var(--color-surface);   /* Weißer Header */
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  /* Feste Höhe, z. B. 80px */
  height: 80px;
}

/* .navbar als Flex-Container vertikal zentrieren */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;    /* Zentriert vertikal in der Header-Höhe */
  height: 100%;           /* Nimmt die volle header-Höhe ein */
  padding: 0 1.5rem;      /* Horizontaler Innenabstand */
}

/* Logo (größer, aber innerhalb der header-Höhe) */
.navbar__logo img {
  max-height: 60px;  /* Logo auf maximal 60px Höhe begrenzen */
  width: auto;       /* Seitenverhältnis beibehalten */
}

/* Navigationsmenü (Desktop & Tablet) */
.navbar__menu {
  display: block;  /* Standardmäßig anzeigen ab Breite ≥ 768px */
}

.navbar__menu ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.navbar__menu a {
  color: var(--color-text-primary);
  font-weight: 500;
  padding-bottom: 0.25rem;
  transition: color var(--transition-fast);
  position: relative;
}

/* Aktiver Link erhält Unterstrich in Akzentfarbe */
.navbar__menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
}

/* Hover- und Fokus-Zustand */
.navbar__menu a:hover,
.navbar__menu a:focus {
  color: var(--color-accent);
}

/* Hamburger-Button (Mobile) */
.navbar__toggle {
  display: none;  /* Wird unter 768px angezeigt */
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--color-text-primary);
}

/* Ab 768px: Menü sichtbar, Hamburger verstecken */
@media (min-width: 768px) {
  .navbar__menu {
    display: block;
  }
  .navbar__toggle {
    display: none;
  }
}

/* Unter 768px: Hamburger anzeigen, Menü einklappen */
@media (max-width: 767px) {
  .navbar__toggle {
    display: block;
  }
  .navbar__menu {
    display: none;
    background-color: var(--color-surface);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
  }
  .navbar__menu.active {
    display: block;   /* Nach Klick auf Hamburger sichtbar */
  }
  .navbar__menu ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* --------------------------------------------------------
   Hero-/Top-Section – zurückhaltend & einladend
   -------------------------------------------------------- */
.hero {
  position: relative;
  background: url('../images/hero-trockenbau-arbeitsplatz.jpg') no-repeat center/cover;
  background-color: var(--color-primary); /* Fallback-Farbe */
  color: var(--color-surface);
  padding: 5rem 0 3rem;
  text-align: center;
}

/* Leichter Overlay (dunkles Blau mit 40% Transparenz) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(26, 61, 108, 0.4);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero__content h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--color-surface);
}

.hero__content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--color-surface);
}

.button-primary {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-surface);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color var(--transition-fast);
}
.button-primary:hover,
.button-primary:focus {
  background-color: var(--color-primary-dark);
  outline: none;
}

/* --------------------------------------------------------
   Abschnitt "Unsere Leistungen" – Karten-Layout
   -------------------------------------------------------- */
.services {
  padding: 4rem 0;
  background-color: var(--color-bg-light);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background-color: var(--color-surface);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.service-card img {
  width: 100%;
  height: auto;
  display: block;
}
.service-card__content {
  padding: 1.25rem;
}
.service-card__content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}
.service-card__content p,
.service-card__content ul {
  font-size: 1rem;
  color: var(--color-text-secondary);
}
.service-card__content ul {
  list-style-type: disc;
  margin-left: 1rem;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------
   Abschnitt "Über uns" – einfache Darstellung
   -------------------------------------------------------- */
.about {
  padding: 4rem 0;
  background-color: var(--color-surface);
  text-align: center;
}
.about p {
  max-width: 800px;
  margin: 0 auto 1rem;
  font-size: 1rem;
  color: var(--color-text-secondary);
}
.about ul {
  list-style: disc;
  margin: 1rem auto;
  max-width: 600px;
  text-align: left;
  color: var(--color-text-secondary);
}

/* Über-uns–Bild verkleinern, zentrieren und responsiv machen */
.about figure {
  width: 100%;           /* Reagiert auf Container-Breite */
  max-width: 600px;      /* Nicht breiter als 600px */
  margin: 2rem auto;     /* Zentriert und Abstand nach oben/unten */
}
.about figure img,
.about img {
  width: 100%;           /* Bild passt sich an übergeordneten Container an */
  height: auto;          /* Beibehaltung des Seitenverhältnisses */
  display: block;        /* Kein extra Leerraum */
  border-radius: 4px;    /* Optional: leicht abgerundete Ecken */
}

/* --------------------------------------------------------
   Kontaktbereich – übersichtliche Infos & Icons
   -------------------------------------------------------- */
.contact {
  padding: 4rem 0;
  background-color: var(--color-bg-light);
  text-align: center;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.info-item p,
.info-item a {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* Kontakt-Icons (Adresse, Telefon, E-Mail) */
.contact-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;              /* Kreisgröße */
  height: 40px;             /* Kreisgröße */
  background-color: var(--color-primary-dark);
  border-radius: 50%;       /* Runde Form */
  color: var(--color-surface);
  font-size: 1.1rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.contact-icon:hover,
.contact-icon:focus {
  background-color: rgba(212, 160, 23, 0.2);  /* Halbtransparentes Gelb */
  transform: scale(1.05);
  outline: none;
}

/* --------------------------------------------------------
   Footer – schlicht & klar strukturiert
   -------------------------------------------------------- */
footer {
  background-color: var(--color-primary-dark);
  color: #ddd;
  padding: 2rem 0;
}
.footer__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer__nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.footer__nav a {
  color: #ddd;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.footer__nav a:hover,
.footer__nav a:focus {
  color: #fff;
  outline: none;
}
.footer__social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Social-Icons-Styling (Footer) */
.social-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;              /* Kreisgröße */
  height: 40px;             /* Kreisgröße */
  background-color: var(--color-primary-dark);
  border-radius: 50%;       /* Runde Form */
  color: var(--color-surface);
  font-size: 1.1rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.social-icon:hover,
.social-icon:focus {
  background-color: rgba(212, 160, 23, 0.2);  /* Halbtransparentes Gelb */
  transform: scale(1.05);
  outline: none;
}

/* --------------------------------------------------------
   Utility-Klassen
   -------------------------------------------------------- */
.text-center {
  text-align: center;
}
.mt-2 {
  margin-top: 2rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --------------------------------------------------------
   Mobile-spezifische Anpassungen
   -------------------------------------------------------- */
@media (max-width: 767px) {
  header {
    height: 70px;  /* Leicht verringerte Header-Höhe mobil */
  }
  .navbar__logo img {
    max-height: 50px;  /* Logo-Reduzierung mobil */
  }
  .contact-icon,
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
