/* General Reset */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* 🔹 Prevent horizontal scrolling */
}

body {
  background: #f7f9fc;
  color: #222;
  line-height: 1.5;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  background: #fff;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap; /* 🔹 Helps on small screens */
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.header .title {
  font-size: 1.2rem;
  font-weight: 500;
  margin-left: 8px;
}

.bmf-text p {
  margin: 0;
  font-size: 0.8rem;
  color: #444;
}

.bmf-text strong {
  font-size: 0.9rem;
}

.logo { height: 58px; }
.logo-small { height: 54px; margin-right: 6px; }

/* Main */
.main {
  padding: 2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Alert & Info */
.alert, .info-box {
  border-radius: 6px;
  padding: 16px;
  margin: 16px auto;
  max-width: 900px;
  font-size: 0.95rem;
}

.alert {
  background: #fff8e1;
  border: 1px solid #f0e1a0;
}

.info-box {
  background: #f0f4fa;
  border: 1px solid #d5dbe3;
}

/* Login & Registration Cards */
.login-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
}

.login-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  max-width: 90vw; /* 🔹 Prevent overflow */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-align: center;
}

.login-card img {
  width: 80px;
  height: auto;
  margin: 10px 0;
}

.login-card p {
  font-size: 0.9rem;
  text-align: center;
}

/* Registration Form Styling */
.registration-card form {
  width: 100%;
}

.registration-form label {
  display: block;
  margin: 10px 0 5px;
  font-size: 0.9rem;
  font-weight: 500;
}

.registration-form input[type="text"],
.registration-form input[type="email"],
.registration-form input[type="tel"],
.registration-form input[type="date"] {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.registration-form fieldset {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 12px;
}

.registration-form legend {
  font-size: 0.9rem;
  font-weight: bold;
}

.registration-form input[type="radio"],
.registration-form input[type="checkbox"] {
  margin-right: 6px;
}

/* Buttons */
.btn-primary {
  margin-top: 15px;
  width: 100%;
  background: #222;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary:hover {
  background: #444;
}

/* News / Aktuelles */
.aktuell {
  margin-top: 3rem;
  padding: 0 5%;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 1rem;
}

.news-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  text-align: center;
  padding-bottom: 10px;
}

.news-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.news-card h4 {
  margin: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.news-card p {
  margin: 0 10px 10px;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: white;
  border-top: 1px solid #ddd;
  padding: 2rem 5%;
  overflow-x: hidden; /* 🔹 Prevents horizontal scroll */
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}

.footer-grid h4 {
  margin-bottom: 10px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid li {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 5px;
}

/* ✅ Responsive Fixes */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .header {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .main {
    padding: 1.5rem 4%;
  }

  .login-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .login-card {
    width: 95%;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
