/* =========================================================
   FONT: Schibsted Grotesk – Variable Font (self-hosted)
   ========================================================= */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("https://sagmal.familienbund-sachsen.de/LAGF/fonts/SchibstedGrotesk.woff2")
       format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("https://sagmal.familienbund-sachsen.de/LAGF/fonts/SchibstedGrotesk-Italic.woff2")
       format("woff2-variations");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}


/* =========================================================
   CSS-Variablen (Farben, später leicht erweiterbar)
   ========================================================= */

:root {
  --green: #980307;
  --green-light: #fcf7a5;
  --text-dark: #373b20;
  --white: #ffffff;
}


/* =========================================================
   Reset & Grundregeln
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    "Schibsted Grotesk",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--white);
  color: var(--text-dark);
}

/* =========================================================
   Typografische Skala
   ========================================================= */

small {
  font-size: 0.875rem;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  margin-top: 0;
}

h1 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Mobile-Optimierung */
@media (max-width: 640px) {
  body {
    line-height: 1.6;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.1rem;
  }
}


/* Formular-Elemente sollen NICHT auf Systemfonts zurückfallen */
button,
input,
textarea,
select {
  font: inherit;
}


/* =========================================================
   Layout-Helfer
   ========================================================= */

.fdkDDMei-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* vertikales Seitenlayout */
.fdkDDMei-layout {
  padding: 1.5rem 1rem 3rem;
}


/* =========================================================
   Header
   ========================================================= */

.fdkDDMei-header {
  width: 100%;
  background-color: var(--green);
  color: var(--white);
}

.fdkDDMei-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.fdkDDMei-header-logo img {
  max-width: 120px;
  height: auto;
}

.fdkDDMei-header-text h1 {
  margin: 0;
  font-size: 1.5rem;
}

.fdkDDMei-header-text p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}


/* =========================================================
   Navigation
   ========================================================= */

.fdkDDMei-navlayout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.5rem 1rem 1rem;
}

.fdkDDMei-nav-link,
.fdkDDMei-nav-link-main span {
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
}

.fdkDDMei-nav-link:hover,
.fdkDDMei-nav-link-main span:hover {
  text-decoration: underline;
}

/* Mobil: Navigation zentrieren */
@media (max-width: 640px) {
  .fdkDDMei-navlayout {
    justify-content: center;
  }

  .fdkDDMei-header-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .fdkDDMei-header-logo {
    justify-self: center;
  }
}


/* =========================================================
   Hero-Bereich
   ========================================================= */

.fdkDDMei-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 1.5rem 6rem;
  background-color: var(--green);
  color: var(--white);
}

.fdkDDMei-hero-inner {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  gap: 1rem;  
}
.hero-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 1rem;
}
/* When the viewport is at least 600 px wide, switch to side‑by‑side */
@media (min-width: 640px) {
  .fdkDDMei-hero-inner {
    flex-direction: row;           /* text left, image right */
    align-items: flex-start;       /* align tops */
    justify-content: space-between;
  }

  .text-content {
    max-width: 60%;                /* keep text from stretching too far */
  }
.hero-img {
    margin-top: 0;
    margin-left: 2rem;
    max-width: 80%;
  }
}
.fdkDDMei-hero h2 {
  margin: 0 0 0.75rem;
  font-size: 1.8rem;
}

.fdkDDMei-hero p {
  margin: 0;
  max-width: 38rem;
}

/* optionale SVG-Welle */
.fdkDDMei-wave {
  display: block;
  width: 100%;
  height: 100px;
  position: absolute;
  bottom: -1px;
  left: 0;
}


/* =========================================================
   Hauptinhalt
   ========================================================= */

.fdkDDMei-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .fdkDDMei-main {
    grid-template-columns: 1fr;
  }
}

.fdkDDMei-main aside.no-header {
  margin-top: 3rem; 
}
/* =========================================================
   Bild
   ========================================================= */

.float-image {
  float: right;
  width: 35%;
  margin: 0 0 1.5rem 1.5rem; /* Abstand links + unten */
}

.float-image img {
  width: 100%;
  height: auto;
  display: block;
}

.float-image figcaption {
  font-size: 0.75rem;
  background-color: var(--text-dark);
  color: var(--white);
  text-align: center;
  margin-top: 0rem;
  padding-top: 0.5rem;
}

/* verhindert Layout-Probleme nach mehreren Floats */
.fdkDDMei-main::after {
  content: "";
  display: block;
  clear: both;
}

/* Mobile: Bild nicht floaten */
@media (max-width: 640px) {
  .float-image {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
}
.fdkDDMei-meldung-vorschau {
    float: left;
    width: 180px;
    height: 180px;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 3.4%, 61.8% 100%, 0 100%);
    margin: 0 1.5rem 1rem 0;
}
@media (max-width: 640px) {
    .fdkDDMei-meldung-vorschau {
        float: none;
        display: block;
        width: 100%;
        max-width: 320px;
        height: 180px;
        margin: 0 auto 1rem;
    }
}

/* =========================================================
   Karten / Kacheln
   ========================================================= */

.fdkDDMei-card {
  border: 2px solid var(--green);
  background-color: var(--green-light);
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}
.fdkDDMei-card-index {
    display: flow-root;
}
.fdkDDMei-card-index > p:last-child {
    margin-top: auto;
    text-align: left;
}
.fdkDDMei-card-index .fdkDDMei-btn {
    float: right;
    white-space: nowrap;
    margin: 0 0 0.5rem 1rem;
}
.fdkDDMei-card-invert {
  background-color: var(--green);
  color: var(--white);
}
  
.fdkDDMei-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.fdkDDMei-card-index__img-container {
    min-width: 100px;
  }
}

/* Bild-Container */
.fdkDDMei-card-index__img-container {
  display: flex;
  align-items: center;      /* vertikal im Container */
  justify-content: center;
  min-width: 100px;         /* anpassbar */
}

/* Bild selbst */
.fdkDDMei-card-index__img-container img {
  max-height: 120px;
  height: auto;
  width: auto;
}

/* horizontale Ausrichtung im Container */
.img-linksbuendig {
  justify-content: flex-start;
}

.img-zentriert {
  justify-content: center;
}

.img-rechtsbuendig {
  justify-content: flex-end;
}

/* =========================================================
   Footer
   ========================================================= */

.fdkDDMei-footer {
  width: 100%;
  background-color: var(--green);
  color: var(--white);
}

.fdkDDMei-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.fdkDDMei-footer h1 {
  margin: 0;
  font-size: 1.5rem;
}

.fdkDDMei-footer p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.fdkDDMei-footer a {
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
}

.fdkDDMei-footer a:hover {
  text-decoration: underline;

}

/* =========================================================
   Buttons
   ========================================================= */

.fdkDDMei-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 2px solid var(--green);
  background-color: var(--white);
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fdkDDMei-btn:hover {
  background-color: var(--green);
  color: var(--white);
}
/* =========================================================
   Links
   ========================================================= */
.fdkDDMei-layout a {
 color: var(--green);
}
.fdkDDMei-layout a:visited {
 color: var(--text-dark);
}
.fdkDDMei-layout a:hover {
  background-color: var(--green);
  color: var(--white);
}
.fdkDDMei-layout a:active {
  background-color: var(--text-dark);
  color: var(--green-light);
}

/* =========================================================
   Sonstiges
   ========================================================= */

/* Scrollcontainer, falls benötigt */
.fdkDDMei-scroll {
  max-height: 70vh;
  overflow-y: auto;
}
