:root {
  --primary-color: #004d66;
  --secondary-color: #0077aa;
  --text-color: #004d66;
  --footer-bg: #002233;
  --footer-text: #cbd5e1;
  --footer-text-dark: #94a3b8;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #f4f6f8;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  background: white;
}
.top-header {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
  align-items: center;
}
.top-header .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.logo img {
  max-height: 50px;
}
.kontakt {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.kontakt a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}
.kontakt a:hover {
  color: var(--secondary-color);
}

/* Navigation */
nav {
  background: #f4f6f8;
  border-bottom: 1px solid #e1e4e8;
  border-top: 1px solid #e1e4e8;
  position: relative;
  padding: 20px;
}
.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.nav-menu li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  color: var(--primary-color);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-menu li a:hover { background: var(--secondary-color); color: white; }

/* Burger */
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  margin-left: auto;
  cursor: pointer;
  color: var(--primary-color);
  padding: 0.5rem;
}

/* Overlay mobile nav */
.overlay-nav-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  z-index: 900;
  justify-content: center;
  align-items: center;
}
.overlay-nav-wrapper.active {
  display: flex;
}
.overlay-inner {
  position: relative;
  text-align: center;
}
.close-overlay {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  color: var(--primary-color);
  border: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0 10px;
  border-radius: 50%;
  cursor: pointer;
}
.overlay-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.overlay-menu a {
  color: white;
  font-size: 1.75rem;
  text-decoration: none;
  padding: .75rem 1.5rem;
  border: 2px solid white;
  border-radius: 8px;
  transition: background .2s, transform .2s;
}
.overlay-menu a:hover {
  background: white;
  color: var(--primary-color);
  transform: scale(1.03);
}

/* Hero full width */
.hero {
  width: 100%;
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

/* Content wrapper */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Box Section */
.box-section {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 2rem 0;
}
.box {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  text-decoration: none;
  color: var(--primary-color);
  transition: transform .25s ease, background .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.box:hover {
  transform: translateY(-4px);
  background: var(--primary-color);
  color: white;
}
.icon-wrapper {
  font-size: 2.5rem;
}

/* Info Section */
.info-section {
  background: white;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.info-image img {
  border-radius: 12px;
  max-width: 300px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.info-text {
  flex: 1;
  min-width: 260px;
}

h4 {
  margin: 10px 0 30px 0;
  font-size: 18px;
  font-weight: 600;
}

.info-text h2 {
  margin-top: 0;
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
}
.info-text ul {
  list-style: disc inside;
  padding-left: 0;
  margin: .75rem 0 0;
}
.info-text li {
  margin-bottom: .5rem;
}

/* Neuigkeiten */
.neuigkeiten-section {
  margin: 2rem 0 4rem;
}
.neuigkeiten-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.news-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.news-box {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.news-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.news-box img {
  width: 100%;
  object-fit: cover;
  height: 160px;
}
.news-content {
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.news-content p {
  flex: 1;
  margin: 0 0 .75rem;
}
.weiterlesen {
  font-weight: 700;
  color: var(--secondary-color);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 1rem 1rem;
  width: 100%;
  box-sizing: border-box;
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
  position: relative;
  padding: 0 1rem;
}
.kontakt-footer,
.rechtliches-footer {
  flex: 1;
  min-width: 200px;
}
.separator {
  width: 1px;
  background: white;
  margin: 0 1rem;
}
footer h4 {
  margin-top: 0;
  color: white;
}
footer a {
  color: white;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
footer .copyright {
  text-align: center;
  margin-top: 1rem;
  color: var(--footer-text-dark);
}

/* Responsive */
@media (max-width: 1024px) {
  .box-section {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .burger {
    display: inline-flex;
  }
}


/* News */
.news-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.2rem;margin:1rem 0 3rem}
.news-card{background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:16px;overflow:hidden;box-shadow:0 6px 16px rgba(0,0,0,.06)}
.news-card img{width:100%;height:160px;object-fit:cover;display:block}
.news-card-body{padding:1rem}
.news-card .meta{font-size:.9rem;opacity:.7;margin:0 0 .25rem}
.news-card h3{margin:.25rem 0 .5rem;font-size:1.1rem}
.news-card p{margin:0 0 .5rem}
.news-card .more{font-weight:600}
/* Layout helpers */
.container.narrow { max-width: 800px; margin: 0 auto; padding: 40px 0; }
/* Forms */
.contact-form .form-row{margin-bottom:1rem}
.contact-form input,.contact-form select,.contact-form textarea{width:100%;padding:.65rem;border:1px solid #ccc;border-radius:8px}
.button{display:inline-block;padding:.6rem 1rem;border-radius:999px;background:var(--primary-color);color:#fff;text-decoration:none;border:none;cursor:pointer}
.button-outline{background:transparent;border:1px solid var(--primary-color);color:var(--primary-color)}
.button-small{padding:.35rem .8rem;font-size:.9rem}
.termine-list{list-style:none;padding:0}
.termine-list li{margin:.75rem 0;padding:.8rem 1rem;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#fff}
.hero-image{width:100%;height:auto;border-radius:12px;margin:.5rem 0 1rem}

/* Vertical news list */
.news-list-vertical{display:flex;flex-direction:column;gap:1rem;margin:1rem 0 3rem}
.news-list-vertical .news-card{display:flex;gap:1rem;align-items:flex-start}
.news-list-vertical .news-card img{width:220px;height:140px;object-fit:cover;border-radius:12px}
.news-list-vertical .news-card .news-card-body{padding:0}
@media (max-width: 720px){
  .news-list-vertical .news-card{flex-direction:column}
  .news-list-vertical .news-card img{width:100%;height:auto}
}

/* Form layout */
.form-row{margin-bottom:1rem}
.form-row.two-col{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-row.three-col{display:grid;grid-template-columns:2fr 1fr 2fr;gap:1rem}
@media(max-width:720px){
  .form-row.two-col,.form-row.three-col{grid-template-columns:1fr}
}
.contact-form input,.contact-form select,.contact-form textarea{width:100%;padding:.65rem;border:1px solid #ccc;border-radius:8px}
.privacy-note{font-size:.95rem;opacity:.85;margin:.5rem 0 1rem}

.header-banner img{width:100%;height:auto;display:block}



/* === Modern Form Styling (added) === */
form#anmeldung-form, form[action$="sendmail.php"] { 
  --field-bg: #fff;
  --field-bd: #d7dce1;
  --field-bd-focus: #6aa3ff;
  --field-shadow: rgba(30, 80, 200, .15);
  --error: #e74c3c;
  --error-bg: #fdecea;
}

.form-error-box, .form-error, .form-message-error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: #7a2b25;
  padding: .75rem 1rem;
  border-radius: 10px;
  margin: 0 0 1rem 0;
}

.form-row { margin-bottom: 1rem; }

.form-row.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-row.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 760px){
  .form-row.two-col,
  .form-row.three-col {
    grid-template-columns: 1fr;
  }
}

form#anmeldung-form label { display:block; font-weight: 500; color:#20242a; }

form#anmeldung-form input[type="text"],
form#anmeldung-form input[type="email"],
form#anmeldung-form input[type="tel"],
form#anmeldung-form select,
form#anmeldung-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .9rem;
  border: 1px solid var(--field-bd);
  border-radius: 12px;
  background: var(--field-bg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font: inherit;
}

form#anmeldung-form textarea { min-height: 140px; resize: vertical; }

form#anmeldung-form input:focus,
form#anmeldung-form select:focus,
form#anmeldung-form textarea:focus {
  border-color: var(--field-bd-focus);
  box-shadow: 0 0 0 4px var(--field-shadow);
}

form#anmeldung-form .field-error {
  border-color: var(--error) !important;
  background: var(--error-bg);
}

form#anmeldung-form .button,
button.button, a.button {
  display: inline-block;
  padding: .75rem 1.1rem;
  border-radius: 12px;
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: filter .2s ease, box-shadow .2s ease, transform .02s ease;
}

form#anmeldung-form .button:hover,
button.button:hover, a.button:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(15,98,254,.18);
}

form#anmeldung-form .button:active,
button.button:active, a.button:active {
  transform: translateY(1px);
}

.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Header banner safety if missing */
.header-banner{width:100%;height:400px;overflow:hidden}
.header-banner img{width:100%;height:100%;object-fit:cover;display:block}

/* Container narrow padding */
.container.narrow { max-width: 800px; margin: 0 auto; padding: 40px 0; }
