:root {
  --dark: #101820;
  --dark-2: #182430;
  --accent: #b8232f;
  --accent-2: #8f1a24;
  --light: #f5f6f7;
  --text-muted: #5a6570;
  --border: #e2e5e8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: #222;
  background: var(--light);
  line-height: 1.6;
}

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

a { color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.logo img {
  height: 42px;
  width: auto;
  border-radius: 4px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #dfe4e8;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

nav a:hover, nav a.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* Image slider */
.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--dark);
  line-height: 0;
}

.slides { position: relative; width: 100%; }

/* The active slide sits in normal flow so its natural width:100%/height:auto
   sets the container's height responsively. Inactive slides are absolutely
   positioned on top of that same box for the crossfade. */
.slide {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease-in-out;
}

.slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide:not(.active) {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 1;
}

.slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,20,0.15), rgba(10,15,20,0.55));
  pointer-events: none;
}

@media (max-width: 700px) {
  .about-slider { display: none; }
}

/* Start text below slider */
.start-text {
  background: var(--dark-2);
  color: #fff;
  text-align: center;
  padding: 60px 0 70px;
}

.start-text .container { max-width: 780px; }

.start-text .eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.start-text h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin: 0 0 28px;
  font-weight: 700;
}

.start-text p {
  font-size: 1.02rem;
  margin: 0 0 20px;
  color: #dfe4e8;
  text-align: left;
}

.start-text p.closing {
  text-align: center;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  font-size: 1.1rem;
  margin: 30px 0 34px;
}

.start-text .btn { margin-top: 4px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover { background: var(--accent-2); }

/* Sections */
section {
  padding: 70px 0;
}

section.slider { padding: 0; }

section.alt { background: #fff; }

.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 2rem;
  color: var(--dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 40px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.about-grid img { border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.about-slider {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  background: var(--dark);
  line-height: 0;
}

.as-slide {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease-in-out;
}

.as-slide.active {
  position: relative;
  opacity: 1;
  z-index: 2;
}

.as-slide:not(.active) {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 1;
}

.badges {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.badge {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.9rem;
  flex: 1;
  min-width: 150px;
  text-align: center;
}

.badge strong { display: block; color: var(--accent); font-size: 1.4rem; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.service-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.service-card .img-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
}
.service-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.service-card .img-wrap:hover img,
.service-card .img-wrap.active img { transform: scale(1.04); }

.info-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16,24,32,0.55);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: opacity 0.25s ease;
  z-index: 2;
}
.img-wrap:hover .info-hint,
.img-wrap.active .info-hint { opacity: 0; }

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.98) 30%, #fff 100%);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding: 22px;
  transition: opacity 0.35s ease;
  overflow-y: auto;
}
.img-wrap:hover .overlay,
.img-wrap:focus .overlay,
.img-wrap.active .overlay {
  opacity: 1;
  pointer-events: auto;
}
.overlay p {
  margin: 0;
  color: #1a1d20;
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .service-card .img-wrap { height: 320px; }
  .overlay { padding: 30px; }
  .overlay p { font-size: 1.05rem; line-height: 1.65; }
}

.service-card .body { padding: 18px 20px; }
.service-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--dark); }
.service-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* Partner */
.partner-strip {
  text-align: center;
}
.partner-strip img { margin: 20px auto 0; max-height: 60px; width: auto; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
}

.contact-card h3 {
  margin-top: 0;
  color: var(--dark);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 6px;
}

.contact-item { margin-bottom: 16px; }
.contact-item .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.contact-item .value { font-size: 1.05rem; font-weight: 500; }
.contact-item a { text-decoration: none; color: var(--accent); }

.emergency {
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 20px;
}
.emergency .label { color: #c9d0d6; }
.emergency .value { color: #fff; font-size: 1.2rem; }

.map-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 100%;
  min-height: 300px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

.map-placeholder {
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  background: repeating-linear-gradient(45deg, #eef1f3, #eef1f3 10px, #e6e9eb 10px, #e6e9eb 20px);
  padding: 30px;
}
.map-placeholder p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 340px;
}
.map-placeholder a { color: var(--accent); text-decoration: underline; }

/* Footer */
footer {
  background: var(--dark);
  color: #b7bec4;
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}
footer a { color: #dfe4e8; text-decoration: none; margin: 0 8px; }
footer a:hover { text-decoration: underline; }
footer .foot-links { margin-bottom: 10px; }

/* Legal page header banners */
.page-banner {
  width: 100%;
  height: clamp(160px, 25vw, 320px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-banner.banner-agb { background-image: url("images/agb2.jpg"); }
.page-banner.banner-impressum { background-image: url("images/impressum.jpg"); }
.page-banner.banner-datenschutz { background-image: url("images/datenschutz2.jpg"); }

/* Legal pages */
.legal {
  background: #fff;
  max-width: 850px;
  margin: 40px auto;
  padding: 40px 50px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.legal h1 { color: var(--dark); margin-top: 0; }
.legal h2 { color: var(--dark); font-size: 1.15rem; margin-top: 32px; }
.legal p, .legal li { color: #444; }
.legal .back-link { display: inline-block; margin-bottom: 20px; }
.legal .note { margin-top: 32px; font-size: 0.85rem; color: #8a929a; }
.legal .agb-title { margin-top: 28px; margin-bottom: 4px; font-size: 1.05rem; color: var(--dark); }
.legal .agb-title strong { font-weight: 700; }
.legal .indent { padding-left: 30px; }

/* placeholder image style */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #dfe3e6, #dfe3e6 10px, #e9ecef 10px, #e9ecef 20px);
  color: #7a838b;
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 170px;
}

@media (max-width: 800px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }

  .header-inner { flex-wrap: wrap; gap: 0; }
  .nav-toggle { display: flex; }

  nav { flex-basis: 100%; }
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 10px;
  }
  nav ul.open { display: flex; }
  nav a {
    display: block;
    padding: 14px 6px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .container { padding: 0 14px; }
  .legal { padding: 26px 22px; margin: 24px auto; }
  .service-card .img-wrap { height: 220px; }
  section { padding: 50px 0; }
  .start-text { padding: 44px 0 50px; }
}
