/* ===============================================
   Custom Styles (vX - Globale Abstände & Two-Col Fix)
   =============================================== */

/* --- @font-face Definitionen --- */
@font-face { font-family: 'MatterSQ'; src: url('../fonts/MatterSQ/MatterSQ-Light.woff2') format('woff2'), url('../fonts/MatterSQ/MatterSQ-Light.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'MatterSQ'; src: url('../fonts/MatterSQ/MatterSQ-Regular.woff2') format('woff2'), url('../fonts/MatterSQ/MatterSQ-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'MatterSQ'; src: url('../fonts/MatterSQ/MatterSQ-Medium.woff2') format('woff2'), url('../fonts/MatterSQ/MatterSQ-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }

/* --- Globale :root Variablen --- */
:root {
  --page-max-width: 1496px;
  --content-inset-left-desktop: 20px;   /* Dein Wert aus der letzten custom.css */
  --content-inset-right-desktop: 20px;  /* Dein Wert aus der letzten custom.css */
  --content-inset-left-mobile: 10px;
  --content-inset-right-mobile: 10px;
  --content-padding-default: 30px; /* Dein Wert aus der letzten custom.css */
  --content-padding-mobile: 10px;  

  /* Deine --mdf-* und andere globale Variablen hier einfügen */
  --mdf-color-primary: #1b45c0; 
  --mdf-color-text-dark: #333; 
  /* ... etc. ... */
}


/* --- Gemeinsame Inhaltsebene (.content) --- */
.content { 
  position: relative; z-index: 2; width: 100%; height: 100%; 
  color: rgba(255, 255, 255, 0.90); 
  display: flex; flex-direction: column; 
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.6); 
  box-sizing: border-box; 
}
.content.center { justify-content: center; align-items: center; text-align: center; }
.content.top { justify-content: flex-start; align-items: flex-start; text-align: left; }

/* Spezifisches Padding für die meisten Teaser-Boxen (wie in deiner letzten Version) */
.parallax-box > .content, 
.gradient-box > .content,
.static-image-box > .content, 
.video-box > .content {
   justify-content: flex-end; 
   align-items: flex-start; 
   padding-top: 45px;
   padding-right: var(--content-padding-default, 30px); /* Nutzt globale Variable */
   padding-bottom: 25px; 
   padding-left: var(--content-padding-default, 30px);  /* Nutzt globale Variable */
}
.parallax-box > .content::after, .gradient-box > .content::after,
.static-image-box > .content::after, .video-box > .content::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 120px; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); z-index: -1; pointer-events: none;
}

/* --- Gemeinsame Text-Stile (innerhalb .content) --- */
.title { font-size: clamp(2.4rem, 3.5vw, 3.5rem); font-weight: 400; margin-bottom: 0.3em; line-height: 1.1; color: inherit; }
.title.large { font-size: clamp(2.9rem, 5vw, 5rem); }
.subtitle { font-size: clamp(0.8rem, 1.8vw, 1.5rem); font-weight: 300; color: inherit; }
strong, b { font-weight: 500; }

/* === TEXT BOX === */
.text-box {
  display: block; text-decoration: none;
  width: 100%;
  height: var(--h, auto); min-height: 150px; border-radius: 30px;
  position: relative; background-color: var(--bg-color, #e0e0e0); color: rgba(255, 255, 255, 0.90);
  overflow: hidden;
}
.text-box > .content {
  /* Padding für Text-Box (wie in deiner letzten Version) */
  padding-top: 30px; 
  padding-right: var(--content-padding-default, 30px); /* Nutzt globale Variable */
  padding-bottom: 30px; 
  padding-left: var(--content-padding-default, 30px);  /* Nutzt globale Variable */
  /* Restliche Styles für .text-box > .content */
  color: inherit; text-shadow: none; height: auto; position: static;
  z-index: 1; display: block; justify-content: initial; align-items: initial;
}
.text-box ul, .text-box ol { margin-left: 20px; margin-bottom: 1em; color: #333; list-style: disc; padding-left: 0; }
.text-box > .content li { margin-bottom: 0.5em; color: #333; }
.chips-container { margin-top: 1.5em; }
.chip { display: inline-block; background-color: rgba(255, 255, 255, 0.15); color: inherit; padding: 5px 12px; border-radius: 16px; font-size: 0.9em; font-weight: 500; margin-right: 8px; margin-bottom: 8px; white-space: nowrap; border: 1px solid rgba(255, 255, 255, 0.90); }
.text-box > .content h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 400; color: white; margin-top: 0; margin-bottom: 0.5em; mix-blend-mode: difference; line-height: 1.2; }
.text-box > .content p { font-size: clamp(0.9rem, 1.5vw, 1.1rem); font-weight: 400; color: #eee; mix-blend-mode: difference; line-height: 1.4; margin-bottom: 1em; }
.text-box > .content ul { font-size: clamp(0.9rem, 1.5vw, 1.1rem); color: #ddd; line-height: 1.4; }
.text-box > .content li { font-size: clamp(0.9rem, 1.5vw, 1.1rem); color: #ddd; line-height: 1.4; }

/* === FREIER TEXT BLOCK === */
.free-text-block { width: 100%; padding: 0; }
.free-text-block, .free-text-block p, .free-text-block li,
.free-text-block h1, .free-text-block h2, .free-text-block h3,
.free-text-block h4, .free-text-block strong { color: #333; text-shadow: none; }
.free-text-block img { max-width: 100%; height: auto; margin: 1em 0; }

/* =============================================== */
/* === Zweispaltiger Container - KORRIGIERT    === */
/* =============================================== */
.two-col-container {
  width: 100%;
  height: var(--col1-h, 50vh); 
  display: grid;
  grid-template-columns: var(--col1-w, 75%) 1fr; 
  gap: 10px; /* Horizontaler Abstand zwischen Spalte 1 und Spalte 2 */
  align-items: stretch; /* NEU oder sicherstellen: Stellt sicher, dass Spalten die Grid-Höhe füllen */
}

.two-col-container > .col-1,
.two-col-container > .col-2 {
  /* height: 100%; // Nicht mehr unbedingt nötig, wenn align-items: stretch im Grid Parent ist, aber schadet nicht */
  position: relative;
  overflow: hidden; 
  display: flex; /* Macht die Spalten selbst zu Flex-Containern */
  flex-direction: column; /* Inhalt in Spalten vertikal anordnen */
}

/* Allgemeine Styles für Boxen INNERHALB des Zweispaltenlayouts */
.two-col-container .parallax-box, 
.two-col-container .gradient-box,
.two-col-container .static-image-box, 
.two-col-container .video-box,
.two-col-container .text-box,
.two-col-container .accordion-wrapper {
  width: 100%; 
  /* height: 100%; // ENTFERNT - Höhe wird spezifischer gesteuert */
  margin: 0 !important; 
  border-radius: 30px; 
  overflow: hidden; 
  position: relative; 
  min-height: 0; 
  display: flex; 
  flex-direction: column; 
}

/* Spezifisch für die Box in Spalte 1 (direktes Kind von .col-1) */
.two-col-container > .col-1 > * { 
  height: 100%; /* Diese Box soll die volle Höhe der Spalte 1 einnehmen */
}

/* Spezifisch für Spalte 2 und ihre direkten Kinder (Boxen) */
.two-col-container > .col-2 {
  gap: 10px; /* KORRIGIERT: Dein gewünschter vertikaler Abstand (z.B. 2px oder 10px) */
             /* Deine ursprüngliche Datei hatte hier 2px. Passe dies ggf. an. */
}
.two-col-container > .col-2 > * { 
  flex-grow: 1;  
  flex-basis: 0; 
  height: auto;  /* Höhe wird durch Flexbox bestimmt */
  /* margin-bottom: 0 !important; // Nicht mehr nötig wegen gap auf .col-2 */
}
/* .two-col-container .col-2 > *:last-child { margin-bottom: 0 !important; } // Nicht mehr nötig wegen gap */


/* Ausnahme für Accordion in Spalte 2 (soll nicht wachsen) */
.two-col-container > .col-2 > .accordion-wrapper {
    flex-grow: 0;    
    flex-shrink: 0;  
    flex-basis: auto;
    height: auto;    
    min-height: initial; /* Explizit zurücksetzen, falls min-height:0 von oben stört */
}

/* Anpassungen für Text/Gradient in kleinen Boxen in Spalte 2 (aus deiner Version) */
.two-col-container .col-2 .content::after { height: 80px; }
.two-col-container .col-2 .title { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.two-col-container .col-2 .subtitle { font-size: clamp(0.9rem, 1.5vw, 1.1rem); }


/* === RESPONSIVE ANPASSUNGEN === */
@media (max-width: 767px) {
  /* Spezifisches Padding für die meisten Teaser-Boxen auf Mobile (wie in deiner letzten Version) */
  .parallax-box > .content, 
  .gradient-box > .content,
  .static-image-box > .content, 
  .video-box > .content {
     padding-top: 20px; 
     padding-bottom: 20px; 
     padding-left: var(--content-padding-mobile, 10px);
     padding-right: var(--content-padding-mobile, 10px);
  }

  /* Spezifisches Padding für Text-Box auf Mobile (wie in deiner letzten Version) */
  .text-box > .content {
     padding-top: 20px; 
     padding-bottom: 20px; 
     padding-left: var(--content-padding-mobile, 10px);
     padding-right: var(--content-padding-mobile, 10px);
  }

  /* Responsivität für Zweispalten-Container (aus deiner Version, leicht angepasst) */
  .two-col-container { 
    grid-template-columns: 1fr; 
    height: auto; 
    gap: 10px;    
  }
  
  .two-col-container > .col-1, /* Spalten werden jetzt Zeilen */
  .two-col-container > .col-2 { 
    /* height: auto; ist okay */
    /* min-height: 150px; aus deiner Version, kannst du anpassen */
  }

  .two-col-container > .col-1 > * { /* Box in ehemaliger Spalte 1 */
      height: var(--col1-h, 50vh); /* Behält definierte Höhe oder Fallback */
      /* min-height: 300px; // Alternative Mindesthöhe */
      /* margin-bottom: 0 !important; // Nicht mehr nötig, da gap vom .two-col-container greift */
  }

  .two-col-container > .col-2 {
    gap: 10px; /* Abstand zwischen den Boxen in ehemaliger Spalte 2 */
  }
  .two-col-container > .col-2 > * { /* Boxen in ehemaliger Spalte 2 */
    min-height: 200px; /* Beispiel Mindesthöhe */
    /* flex-grow: 0; flex-basis:auto; height:auto; // Sind hier gut */
    /* margin-bottom: 0 !important; // Nicht mehr nötig */
  }
  .two-col-container .col-2 .static-image-box { height: 40vh; } 
  .two-col-container .col-2 .accordion-wrapper { height: auto; } 
}