:root {
  --blue-dark: #3c8ade;
  --blue: #3c8ade;
  --gray-bg: #f4f4f4;
  --white: #fff;
  --text: #1f2937;
  --muted: #6b7280;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--gray-bg);
  color: var(--text);
  line-height: 1.6;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width: auto; height: auto;
  padding: .5rem .75rem; background: var(--blue-dark); color: var(--white);
  border-radius: .5rem; z-index: 1000;
}

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

header {
  background: var(--white); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .875rem 0;
}

.brand { display: flex; align-items: center; gap: .75rem; }

.logo {
  width: 40px; height: 40px; border-radius: .5rem; display: block; object-fit: cover;
}

.site-title { font-size: 1.125rem; color: var(--blue-dark); font-weight: 800; letter-spacing: .2px; }

/* Nav */
nav ul { display: flex; list-style: none; align-items: center; gap: 1rem; }
nav a {
  text-decoration: none; color: var(--blue-dark); font-weight: 700;
  padding: .5rem .75rem; border-radius: .5rem;
}
nav a:hover, nav a:focus-visible {
  background: rgba(60,138,222,.12); outline: none;
}
.nav-toggle { display: none; background: transparent; border: 0; padding: .5rem; border-radius: .5rem; }
.nav-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 820px) {
  nav ul {
    position: absolute; top: 60px; right: 1rem; background: var(--white);
    border: 1px solid #e5e7eb; border-radius: .75rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.08); padding: .5rem;
    flex-direction: column; align-items: stretch; min-width: 220px; display: none;
  }
  nav ul.open { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white); text-align: center; padding: 4rem 1.5rem;
}
.hero h2 { font-size: clamp(2rem, 2.5vw + 1rem, 2.75rem); margin-bottom: .75rem; letter-spacing: .2px; }
.hero p { opacity: .95; max-width: 760px; margin: 0.25rem auto 1.5rem; }

.cta { display: inline-flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1rem; border-radius: .75rem; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; transition: transform .2s ease, background .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(60,138,222,.35); }
.btn-primary { background: var(--white); color: var(--blue-dark); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.8); }
.btn-outline:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }

/* Sections */
.content-section { padding: 3rem 1.5rem; max-width: 1000px; margin: auto; }
.content-section h3 { font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem); color: var(--blue-dark); margin-bottom: 1rem; }
.lead { color: var(--muted); margin-bottom: 1.25rem; }

/* Cards */
.card-container { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.card {
  grid-column: span 4; background: var(--white); padding: 1.25rem;
  border-left: 6px solid var(--blue); border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.card h4 { color: var(--blue-dark); margin-bottom: .5rem; font-size: 1.125rem; }
.card ul { margin-left: 1.25rem; list-style: disc; }

@media (max-width: 960px) { .card { grid-column: span 6; } }
@media (max-width: 640px) { .card { grid-column: span 12; } }

/* Form */
form {
  background: var(--white); padding: 1.5rem; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.06);
  max-width: 640px; margin: 0 auto; display: grid; gap: 1rem;
}
label { font-weight: 600; font-size: .95rem; }
input, textarea { padding: .8rem; border: 1px solid #d1d5db; border-radius: .6rem; font: inherit; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(60,138,222,.2); }
textarea { min-height: 140px; resize: vertical; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-start; align-items: center; }
.status { font-size: .95rem; color: var(--muted); }

/* Footer */
footer { background: var(--blue-dark); color: var(--white); text-align: center; padding: 2rem 1rem; margin-top: 4rem; }
.footer-links { display: flex; justify-content: center; gap: 1.25rem; margin-top: .75rem; }
.footer-links a { color: var(--white); text-decoration: none; opacity: .9; }
.footer-links a:hover, .footer-links a:focus-visible { text-decoration: underline; outline: none; }

/* Social icons (optional) */
.social-links { margin-top: 1rem; display: flex; justify-content: center; gap: 1.25rem; }
.social-links a { color: var(--white); width: 24px; height: 24px; transition: color 0.3s ease; }
.social-links a:hover { color: var(--blue); }
.social-links svg { width: 24px; height: 24px; display: block; }

/* Animations */
.fade-in { opacity: 0; animation: fadeIn 700ms ease forwards; }
.fade-in-delay { opacity: 0; animation: fadeIn 700ms ease forwards; animation-delay: .2s; }
.slide-up { opacity: 0; transform: translateY(12px); animation: slideUp 700ms ease forwards; }
@media (prefers-reduced-motion: reduce) { .fade-in, .fade-in-delay, .slide-up { animation: none; opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* Dialogs */
dialog {
  border: 0; border-radius: 12px; padding: 1.25rem; max-width: 720px; width: calc(100% - 2rem);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(0,0,0,.4); }
.dialog-title { color: var(--blue-dark); font-weight: 800; margin-bottom: .5rem; }
.dialog-close {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
  padding: .5rem .75rem; border: 1px solid #d1d5db; background: #f9fafb; border-radius: .5rem; cursor: pointer;
}
.dialog-close:hover { background: #f3f4f6; }

/* Utilities */
.muted { color: var(--muted); }
.hidden-visually {
  position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Kontaktformular – bessere Formatierung + blauer Strich */
#contact-form{
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  border-left: 6px solid var(--blue);     /* blauer Strich */
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  display: grid;
  gap: 1rem;
}
#contact-form > div{ display: grid; gap: .4rem; }
#contact-form label{ font-weight: 600; font-size: .95rem; }
#contact-form input, #contact-form textarea{
  width: 100%; padding: .85rem; border: 1px solid #d1d5db; border-radius: .6rem; font: inherit; background: #fff;
}
#contact-form input:focus, #contact-form textarea:focus{
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(60,138,222,.2);
}
#contact-form textarea{ min-height: 180px; resize: vertical; }
#contact-form .form-actions{ display: flex; gap: .75rem; align-items: center; justify-content: flex-start; }
#contact-form .status{ font-size: .95rem; color: var(--muted); }
@media (min-width: 720px){
  #contact-form{ grid-template-columns: 1fr 1fr; }
  #contact-form > div:nth-of-type(1),
  #contact-form > div:nth-of-type(2){ grid-column: span 1; }
  #contact-form > div:nth-of-type(3){ grid-column: 1 / -1; }
  #contact-form .form-actions{ grid-column: 1 / -1; }
}

/* Öffnungszeiten als Box (robust: funktioniert bei #standorte ODER #kontakt ODER .hours-box) */
#standorte > div:last-of-type,
#kontakt > div:nth-of-type(2),
.hours-box{
  max-width: 760px;
  margin: 1.25rem auto 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--white);
  border-radius: 12px;
  border-top: 6px solid var(--blue);   /* blauer Strich oben */
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  text-align: center;
}
#standorte > div:last-of-type h3,
#standorte > div:last-of-type h4,
#kontakt > div:nth-of-type(2) h3,
#kontakt > div:nth-of-type(2) h4,
.hours-box h3, .hours-box h4{
  margin: 0 0 .5rem 0; color: var(--blue-dark); text-align: center;
}
#standorte > div:last-of-type ul,
#kontakt > div:nth-of-type(2) ul,
.hours-box ul{
  list-style: none; padding: 0; margin: .25rem 0 .5rem 0;
}
#standorte > div:last-of-type li,
#kontakt > div:nth-of-type(2) li,
.hours-box li{ margin: .25rem 0; }
#standorte > div:last-of-type p,
#kontakt > div:nth-of-type(2) p,
.hours-box p{ margin-top: .5rem; color: var(--muted); }


/* Medien – Bilder & Banner */
.figure, .banner, .card-media { border-radius: 12px; overflow: hidden; background:#fff; }
.figure img, .banner img, .card-media { display:block; width:100%; height:auto; }
.shadow { box-shadow: 0 10px 24px rgba(0,0,0,.08); }

.media-grid{
  display:grid; gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
}
.figure{ aspect-ratio: 4 / 3; }
.figure figcaption{ text-align:center; font-size:.9rem; color:var(--muted); padding:.5rem .5rem 0; }

.card .card-media{ aspect-ratio: 16 / 9; object-fit: cover; margin-bottom:.75rem; }

.banner{ aspect-ratio: 21 / 9; }
.figure:hover, .banner:hover{ transform: translateY(-2px); transition: transform .2s ease, box-shadow .2s ease; }


/* --- Click-to-zoom Lightbox --- */
.image-zoom { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); z-index: 9999; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.lightbox.open img { transform: translateY(0) scale(1); opacity: 1; }
body.modal-open { overflow: hidden; }
