:root {
  --brand-rgb: 0, 91, 143;
  --accent: #ffffff;
  --bg: white;
  --text: #0b0b0b;
  --maxw: 1100px;
  --header-h: 96px;
  --wave-h: 80px;
  font-family: 'Open Sans', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  font-size: 16px;
}

/* Skip-Link */
.skip-link {
  position: fixed;
  top: 8px;
  left: -999px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 3000;
  transition: left 0.2s ease;
}

.skip-link:focus {
  left: 8px;
}

/* Basis */
html, body { 
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: calc(var(--header-h) + 30px);
  background: var(--bg);
  color: var(--text);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(1, 138, 210, .9);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wave-box::after {
  content: "";
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  height: 40px;
  background: url('data:image/svg+xml;utf8,<svg width="100%" height="40" viewBox="0 0 1440 40" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path fill="%23018ad2" fill-opacity="0.9" d="M0,10 C360,40 1080,0 1440,10 L1440,40 L0,40 Z"/></svg>') no-repeat bottom;
  background-size: cover;
  pointer-events: none;
  z-index: 100;
}

/* Container inside header to align content with page container */
.container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar {
  align-items:
  flex-start;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.brand {
  font-weight: 100;
  font-size: 1.5rem;
}

/* Nav overlay */
.nav-overlay {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.nav-overlay ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-overlay a {
  color: white;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  display: inline-block;
}

.nav-overlay a:hover, .nav-overlay a:focus {
  background: rgba(255,255,255,0.06);
}

.menu-toggle {
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none;
}

/* Main scrollarea */
main { 
  flex-grow: 1;
}

/* Container width */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
}

/* HERO full-bleed image with constrained text */
.hero-full {
  position: relative;
}

.hero-full figure {
  margin: 0;
}

.hero-full img {
  display: block;
  width: 100%;
  height: 70vh;
  max-height: 480px;
  min-height: 200px;
  object-fit: cover;
  margin: 0;
}

.hero-full img.align-top {
  object-fit: cover;
  object-position: top;  /* only this image aligns to top */
}

.hero-full::after {
  content: "";
  position: absolute;
  top: 0;       /* move gradient 30px upwards */
  left: 0;
  right: 0;
  bottom: 32px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 10%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-full.no-gradient::after {
  content: none;
  background: none;
}

/* hero text on top of image */
.hero-overlay {
  position: relative;
  margin-top: -160px;
  color: white;
  z-index: 1;
}

.hero-overlay h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-overlay .lead {
  font-size: 1.05rem;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.full-image-text {
  height: 50vh;
  min-height: 300px;
  max-height: 500px;
  background-image: url("../images/motto.png");
  background-size: cover;
  background-position: center;
  position: relative;
  display: block;
  box-sizing: border-box;
}

/* Dark overlay for opacity effect */
.full-image-text .image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Centered text on top */
.full-image-text .text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  z-index: 1;
  padding: 1rem;
  max-width: 90%;
  overflow-wrap: anywhere;
}

.full-image-text h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.full-image-text h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1rem, 3vw, 2rem);
  font-weight: normal;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.full-image-text p {
  margin: 0.5rem 0 0;
  font-size: clamp(0.9rem, 2.2vw, 1.25rem);
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

#leistungen h2 {
  margin-top: 40px;
}


/* Sections */
h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 30px 0 12px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-top: 18px;
}

.card {
  background: transparent;
  padding: 16px;
  border-radius: 8px;
  min-height: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px 8px 8px 8px;
  margin-bottom: 12px;
}

.card img.tall {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 8px 8px 8px 8px;
  margin-bottom: 12px;
}

.map {
  height: 380px;
  object-fit: cover;
  border-radius: 8px 8px 8px 8px;
  margin-bottom: 12px;
  border: 0;
}

/* Button */
.btn { 
  display: inline-block;
  margin-top: 20px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 300;
  border: 1.5px solid #018ad2;
}

.btn-primary {
  background: white;
  color: #018ad2;
  text-decoration: none;
}

/* Footer */
footer {
  background: #018ad2;
  color: #fff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.footer-column {
  flex: 0 0 auto;
  min-width: 200px;
}

.footer-column img {
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 40px Aauto 0;
}

/* Link styling inside footer */
footer a {
  color: white;
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .logo img { width: 60px; height: 60px;}
  .brand { font-size: clamp(.75rem, 1rem, 1.2rem);}
  header { padding: 6px 12px;}
  .menu-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
  }
  .nav-overlay ul {
    flex-direction: column;
    gap: 12px;
  }
  .nav-overlay {
    display: none;
    width: 100%;
    background: rgba(1,138,210,0.95);
    position: fixed;
    top: var(--header-h);
    left: 0;
    padding: 12px 20px;
  }
  .nav-overlay.active {
    display: block;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  body {
    padding-top: var(--header-h);
  }
  .hero-full img {
    height: 50vh;
  }
  .hero-overlay {
    position: absolute;
    bottom: 15%;
    left: 5%;
    right: 5%;
    margin-top: 0;
    transform: none;
    font-size: 1.1rem;
    line-height: 1.4;
    padding: 0;
    color: white;
    opacity: 85%;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    text-align: left;
    z-index: 1;
  }
  .hero-overlay h1 {
    white-space: normal;              /* allow wrapping */
    text-align: left;               /* center text */
    font-size: clamp(1rem, 8vw, 2rem); /* responsive scaling */
    line-height: 1.2;
    margin: 0 auto; 
  }
  .full-image-text::before {
   content: "";
   position: absolute;
   inset: 0;
   background-image: url("../images/motto.png");
   background-size: 300% auto;
   background-position: right center;
   filter: blur(6px);
   transform: scale(1.05);
   z-index: 0;
  }
  .full-image-text .text-overlay {
   top: 10%;
   left: 5%;
   right: 5%;
   transform: none;
  }
  .full-image-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  .full-image-text h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
  }
  .full-image-text p {font-size: clamp(1rem, 2.2vw, 1.25rem);}
  .grid { grid-template-columns: 1fr;}
  .card img { height: auto;}
  footer {
    flex-direction: column;    /* stack vertically */
    align-items: stretch;      /* allow columns to take full width */
  }
  .footer-column {
    min-width: auto;
    margin-bottom: 20px;
    text-align: left;          /* align text to left */
    width: 100%;               /* make column full width */
  }
  .footer-column:last-child {
    margin-bottom: 0;
  }
  /* Accessibility focus */
  :focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
  }
  /* visually hidden */
  .visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
   overflow: hidden;
   clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
    border: 0;
   padding: 0;
    margin: -1px;
  }
}