/**
 * Bob-Allianz Sachsen (BAS) – Components CSS (Runde 3d)
 * Exakt das Logo-Grün #1aa74b überall:
 * - Zentrierter Kopf (scrollt normal mit, nicht fixiert)
 * - Keine Hero-Teamfotos mehr; Startseite beginnt mit „Unsere Teams“
 * - Flache Partnerkacheln (aspect-ratio 2:1, Innenabstand <= 6 %, Raster 2/3/4/5)
 * - Abschnittstitel (h2) mit rein grünem Strich (48 x 4 px, #1aa74b)
 * - Titelbänder und Fuß in #1aa74b mit weißer Schrift (kein Logo im Fuß)
 * - Keine Schatten, keine Rundungen > 2px, keine Pillen/Badges, kein Gelb-Schwarz
 */

/* ==========================================================================
   1. SITE HEADER & NAVIGATION (Zentrierter Kopf, scrollt normal mit)
   ========================================================================== */

.site-header {
  position: relative;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Header Inner Desktop (>= 768px): Logo mittig, Menü mittig darunter */
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-md);
  padding-bottom: var(--space-xs);
  text-align: center;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-touch-target);
  padding: 0.25rem 0;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.header-logo {
  width: auto;
  height: 68px;
  max-height: 72px;
  object-fit: contain;
}

/* Hauptnavigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch-target);
  padding: 0.5rem 0.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--bas-gruen);
  border-bottom-color: var(--bas-gruen);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--bas-gruen);
  border-bottom-color: var(--bas-gruen);
}

/* Menü-Button Mobil */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: var(--min-touch-target);
  min-height: var(--min-touch-target);
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  border-radius: 0;
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 18px;
}

.menu-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobil-Navigation (< 768px): Logo mittig, Menüknopf rechts */
@media (max-width: 767px) {
  .header-inner {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 68px;
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .header-brand {
    grid-column: 2;
    justify-self: center;
    margin-bottom: 0;
  }

  .header-logo {
    height: 48px;
    max-height: 52px;
  }

  .menu-toggle {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--space-xl) var(--container-padding);
    border-top: 1px solid var(--color-border);
    border-bottom: 2px solid var(--bas-gruen);
    box-shadow: none;
    overflow-y: auto;
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .nav-link {
    font-size: var(--text-base);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .nav-link[aria-current="page"] {
    background-color: var(--bas-gruen-hell);
    border-left: 4px solid var(--bas-gruen);
    border-bottom-color: var(--color-border-subtle);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* ==========================================================================
   2. ABSCHNITTSTITEL (H2) MIT GRÜNEM STRICH (48 x 4 px, #1aa74b)
   ========================================================================== */

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
}

/* Strich unter allen Abschnittstiteln: nur Grün #1aa74b, 48 x 4 px */
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 0.75rem;
  background-color: var(--bas-gruen);
}

/* Zentriert auf der Startseite */
.section-title--center,
.section-teams .section-title,
.section-partners .section-title {
  text-align: center;
}

.section-title--center::after,
.section-teams .section-title::after,
.section-partners .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   3. UNSERE TEAMS (Drei Teamlogos verlinkt)
   ========================================================================== */

.section-teams {
  background-color: var(--color-bg);
  padding: clamp(3rem, 2rem + 2.5vw, 4.5rem) 0;
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .teams-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

.team-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--min-touch-target);
  height: 100px;
  text-decoration: none;
  background: transparent;
  border: none;
}

@media (min-width: 768px) {
  .team-logo-item {
    height: 150px;
  }
}

.team-logo-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
  transition: opacity var(--transition-fast);
}

@media (min-width: 768px) {
  .team-logo-img {
    max-height: 130px;
  }
}

.team-logo-item:hover .team-logo-img {
  opacity: 0.85;
}

/* ==========================================================================
   4. STARTSEITE: PARTNER & UNTERSTÜTZER (Flache Kacheln 2:1 vor #f3f8f5)
   ========================================================================== */

.section-partners {
  background-color: var(--bas-gruen-hell);
  padding: clamp(3.5rem, 2.5rem + 3vw, 5.5rem) 0;
  border-top: 1px solid var(--color-border);
}

/* Raster Partner: 2 Spalten (390) / 3 (768) / 4 (1024) / 5 (1440) */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  align-items: center;
  justify-items: center;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .partner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .partner-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1440px) {
  .partner-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Flache Kachel (2:1, Rand schon im Bild, Bild füllt Kachel, Innenabstand <= 6 %) */
.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 1;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  box-shadow: none;
  padding: 4% 5%;
  text-decoration: none;
  min-height: var(--min-touch-target);
  transition: border-color var(--transition-fast);
}

.partner-item:hover {
  border-color: var(--bas-gruen);
}

.partner-logo-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity var(--transition-fast);
}

.partner-item:hover .partner-logo-img {
  opacity: 0.9;
}

/* ==========================================================================
   5. SEITENTITEL DER UNTERSEITEN (page-title-band in #1aa74b)
   ========================================================================== */

.page-title-band {
  background-color: var(--bas-gruen);
  color: #ffffff;
  padding: clamp(2rem, 1.5rem + 1.5vw, 3.25rem) 0;
  position: relative;
}

.page-title {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  margin: 0;
}

.section-body {
  padding-top: clamp(2rem, 1.5rem + 1.5vw, 3.5rem);
  padding-bottom: clamp(2rem, 1.5rem + 1.5vw, 3.5rem);
}

/* ==========================================================================
   6. NEUIGKEITEN: RASTER MIT GROSSEN BILDERN (1 / 2 / 3 Spalten)
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: var(--space-md) 0 var(--space-xl);
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.news-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.news-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bas-gruen-hell);
}

.news-card-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-date {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bas-gruen);
  margin-bottom: 0.5rem;
}

.news-card-title {
  font-size: var(--text-xl);
  font-weight: 800;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  text-transform: none;
}

.news-card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--bas-gruen);
  text-decoration: underline;
}

.news-card-teaser {
  font-size: 1rem;
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-top: auto;
}

.news-load-more {
  display: flex;
  justify-content: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}

/* ==========================================================================
   7. EINZELBEITRAG (beitrag.html)
   ========================================================================== */

.article-container {
  max-width: var(--container-article);
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-3xl);
}

.article-back-wrap {
  margin-bottom: 1.5rem;
}

.article-back-wrap--bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch-target);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--bas-gruen);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-date {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bas-gruen);
  margin-bottom: 1.5rem;
}

.article-hero-media {
  margin-bottom: 2rem;
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.article-content h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 0.5rem;
  background-color: var(--bas-gruen);
}

.article-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   8. ÜBER DIE ALLIANZ (allianz.html)
   ========================================================================== */

.prose-container {
  max-width: var(--container-article);
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.prose-container p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
}

/* Rechtstexte: ruhigere Zwischenüberschriften mit Abstand nach oben */
.prose-container h2 {
  font-size: var(--text-2xl);
  margin: var(--space-2xl) 0 var(--space-md);
}

.prose-container h3 {
  font-size: var(--text-lg);
  margin: var(--space-xl) 0 var(--space-xs);
}

.prose-container h4 {
  font-size: var(--text-base);
  margin: var(--space-lg) 0 var(--space-xs);
}

.prose-container > :first-child {
  margin-top: 0;
}

.prose-container ul {
  margin: 0 0 1.5rem 1.25rem;
  list-style: disc;
  line-height: var(--leading-relaxed);
}

/* Zitatkästen: Grüne Linie links (4 px, #1aa74b) auf Weiß */
.quote {
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 4px solid var(--bas-gruen);
  background: transparent;
}

.quote p {
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-normal);
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.quote cite {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  font-style: normal;
  color: var(--bas-gruen);
}

/* Abschnitt Unsere Teams auf allianz.html: max. 1100 px Inhaltsbreite */
.teams-showcase-section {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.teams-showcase-container {
  max-width: var(--container-teams, 1100px);
  margin-left: auto;
  margin-right: auto;
}

/* Mitgliedschaft, Kontakt, Impressum */
.info-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.info-section p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   9. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-touch-target);
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

/* Grüner Button (#1aa74b) */
.btn-primary,
.btn-green {
  background-color: var(--bas-gruen);
  color: #ffffff;
  font-size: 1.1875rem;
  border: 2px solid var(--bas-gruen);
}

.btn-primary:hover,
.btn-green:hover {
  background-color: #ffffff;
  border-color: var(--bas-gruen);
  color: var(--bas-gruen);
  text-decoration: none;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--bas-gruen);
  border: 2px solid var(--bas-gruen);
}

.btn-secondary:hover {
  background-color: var(--bas-gruen);
  color: #ffffff;
  border-color: var(--bas-gruen);
  text-decoration: none;
}

/* ==========================================================================
   10. FUSSSBEREICH (Hintergrund #1aa74b, weiße Schrift, kein Logo)
   ========================================================================== */

.site-footer {
  background-color: var(--bas-gruen);
  color: #ffffff;
  padding-top: 2.5rem;
  padding-bottom: var(--space-2xl);
  margin-top: var(--space-3xl);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-name {
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  font-size: var(--text-lg);
  color: #ffffff;
}

.footer-address {
  font-size: var(--text-sm);
  color: #ffffff;
}

.footer-contact {
  font-size: var(--text-sm);
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.footer-sep {
  opacity: 0.7;
  color: #ffffff;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .footer-nav {
    flex-direction: row;
    gap: 1.75rem;
    align-items: center;
    padding-top: 0.5rem;
  }
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch-target);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration-thickness: 2px;
}

/* Formulare übernehmen Typografie und Farben der BAS-Seite. */
.bas-formular .formular-feld {
  margin-block: var(--space-lg);
}
.bas-formular fieldset {
  min-width: 0;
  border: 1px solid var(--color-border);
  padding: var(--space-md);
}
.bas-formular legend,
.bas-formular .formular-label {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bas-formular .formular-label {
  display: block;
  margin-block: var(--space-xs);
}
.bas-formular input:not([type="checkbox"]):not([type="hidden"]),
.bas-formular select,
.bas-formular textarea {
  width: 100%;
  min-height: var(--min-touch-target);
  border: 1px solid var(--color-text);
  border-radius: 0;
  padding: var(--space-sm);
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
}
.bas-formular textarea {
  resize: vertical;
}
.formular-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--min-touch-target);
  padding-block: var(--space-xs);
  cursor: pointer;
}
.formular-option input {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--bas-gruen);
}
.prose-container .formular-hinweis {
  font-size: var(--text-sm);
  margin-block: var(--space-sm);
}
.formular-fehler,
.formular-meldung {
  border-left: 4px solid var(--bas-gruen);
  padding: var(--space-sm) var(--space-md);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bas-formular .btn {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.bas-formular .formular-wiederholung {
  margin-block: var(--space-lg);
}

/* Formulare: Tage als Kästen, PLZ und Ort in einer Zeile (Wunsch Martin 12.11.) */
.bas-formular .formular-gruppe {
  border: 2px solid var(--bas-gruen);
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg);
}
.bas-formular .formular-gruppe > h2 {
  margin-top: 0;
}
.bas-formular .formular-unterfeld input {
  width: 100%;
}
.bas-formular .formular-zeile--plz {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* Eingabefelder und Dropdowns gleich hoch; Dropdown ohne Browser-Eigenform, mit eigenem Pfeil */
.bas-formular input:not([type="checkbox"]):not([type="hidden"]),
.bas-formular select {
  box-sizing: border-box;
  height: 3rem;
  line-height: 1.25;
}
.bas-formular select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
}

/* Kurze Seiten (z. B. Formular-Dank): Fuß sitzt am unteren Fensterrand */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1 0 auto;
}
