/* ========================================== */
/*  News Kachel – DAH Gruppe                  */
/*  Frosted Glass · Barlow Condensed · Inter  */
/*  Mit Bild + Hover-Attribution              */
/* ========================================== */

/* ------------------------------------------ */
/*  Schriftarten – lokal vom Server           */
/* ------------------------------------------ */

/* Barlow Condensed Bold (900) */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/wp-content/uploads/2026/03/BarlowCondensed-Bold.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
/* Barlow Condensed Medium (500) */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/wp-content/uploads/2026/03/BarlowCondensed-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Barlow Condensed ExtraBold (800) */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/wp-content/uploads/2026/03/BarlowCondensed-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
/* Inter Regular (400) + SemiBold (600) via Variable Font */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/uploads/2026/03/Inter-VariableFont_opszwght.ttf') format('truetype-variations'),
       url('/wp-content/uploads/2026/03/Inter-VariableFont_opszwght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Inter Italic (für alle Gewichte, fallback) */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/uploads/2026/03/Inter-Italic-VariableFont_opszwght.ttf') format('truetype-variations'),
       url('/wp-content/uploads/2026/03/Inter-Italic-VariableFont_opszwght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------ */
/*  CSS Custom Properties (Design-Tokens)     */
/* ------------------------------------------ */
:root {
  --glassBg: rgba(255, 255, 255, 0.32);
  --glassBorder: rgba(255, 255, 255, 0.45);
  --glassBlur: 18px;

  --titleSize: clamp(28px, 5vw, 52px);
  --bodySize: clamp(14px, 1.4vw, 16px);
  --newsTitleSize: clamp(26px, 4.5vw, 44px);
  --subheadSize: clamp(18px, 3.2vw, 28px);
  --dahGreen: #006532;

  --padX: clamp(28px, 4vw, 48px);
  --padY: clamp(18px, 2.5vh, 28px);
  --gapText: clamp(16px, 2.2vh, 24px);
  --gapBody: clamp(12px, 1.8vh, 18px);
  --radius: 28px;

  --tx: 0px;
  --ty: 0px;
  --rot: 0deg;
}

/* ------------------------------------------ */
/*  News-Kachel (wird mehrfach verwendet)     */
/* ------------------------------------------ */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--padY) var(--padX);
  max-width: clamp(420px, 82vw, 1100px);
  width: 100%;
  margin: 0 auto;
  color: #0a1a1f;
  border-radius: var(--radius);
  gap: var(--gapText);
  text-align: left;
  box-shadow: 0 12px 28px -10px rgba(0, 20, 30, 0.12);
}

/* Frosted-Glass-Hintergrund (Pseudo-Element) */
.news-card::before {
  content: "";
  position: absolute;
  inset: -3%;
  border-radius: inherit;
  background: var(--glassBg);
  border: 1px solid var(--glassBorder);
  -webkit-backdrop-filter: blur(var(--glassBlur)) saturate(1.25);
          backdrop-filter: blur(var(--glassBlur)) saturate(1.25);
  z-index: 0;
  transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
  will-change: transform;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08);
}

/* Alle direkten Kinder über dem Glas platzieren */
.news-card > * {
  position: relative;
  z-index: 2;
}

.news-card + .news-card {
  margin-top: 69px;
}

/* ------------------------------------------ */
/*  Kopfzeile: Datum + Überschrift            */
/* ------------------------------------------ */
.news-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  width: 100%;
  margin-bottom: 4px;
}

/* Datum – kompakt als Pill */
.news-date {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: calc(var(--bodySize) * 0.9);
  color: #2c5a4a;
  letter-spacing: 0.3px;
  margin: 0;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 40px;
  display: inline-block;
}

/* Hauptüberschrift */
.news-title {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  font-size: 3em;
  color: #ffffff;
  background-color: #006532;
  display: inline-block;
  padding: 8px 28px;
  margin: 0 0 14px -8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: left;
  text-shadow: none;
  max-width: max-content;
}

/* Subheadline – kleiner, in Dah-Grün */
.news-subhead {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  font-size: 2em;
  text-transform: uppercase;
  color: #006532;
  margin: 0 0 8px 0;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
/* ------------------------------------------ */
/*  Vorschaubild (eingeklappt sichtbar)       */
/* ------------------------------------------ */
/* ------------------------------------------ */
/*  Vorschau-Bereich (Text + Thumbnail)       */
/* ------------------------------------------ */
.news-preview {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

.news-preview-text {
  flex: 1;
  min-width: 0; /* Verhindert Überlauf */
}

/* Vorschaubild (eingeklappt sichtbar) */
.news-thumbnail {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
  align-self: flex-start;
  transition: opacity 0.4s ease, max-width 0.4s ease, max-height 0.4s ease, margin 0.4s ease;
}

/* Vorschaubild ausblenden, wenn ausgeklappt */
.news-card.expanded .news-thumbnail {
  opacity: 0;
  max-width: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

/* Subheadline im Preview */
.news-preview .news-subhead {
  margin: 0 0 8px 0;
}

/* Teaser im Preview */
.news-preview .news-body {
  margin: 0;
}

/* Vorschaubild ausblenden, wenn ausgeklappt */
.news-card.expanded .news-thumbnail {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}
/* ------------------------------------------ */
/*  Fließtext                                 */
/* ------------------------------------------ */
.news-body {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--bodySize);
  line-height: 1.55;
  margin: 0;
  text-align: left;
  color: #13262e;
}

.news-body b,
.news-body strong {
  font-weight: 600;
  color: #0d2e21;
}

/* ------------------------------------------ */
/*  Trennlinie                                */
/* ------------------------------------------ */
.glass-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  margin: 4px 0 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ------------------------------------------ */
/*  Weiterlesen Button (MIT MAGENTA-FIX)      */
/* ------------------------------------------ */
/* Alle Zustände zurücksetzen – verhindert Magenta/Elementor-Farben */
.news-toggle-btn,
.news-toggle-btn:link,
.news-toggle-btn:visited,
.news-toggle-btn:active,
.news-toggle-btn:focus,
button.news-toggle-btn,
button.news-toggle-btn:link,
button.news-toggle-btn:visited,
button.news-toggle-btn:active,
button.news-toggle-btn:focus {
  display: inline-block;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: calc(var(--bodySize) * 1.0);
  color: #006532 !important;
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid #006532 !important;
  border-radius: 50px;
  padding: 6px 24px;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
}

/* Hover – bleibt grün */
.news-toggle-btn:hover,
button.news-toggle-btn:hover {
  background-color: #006532 !important;
  background: #006532 !important;
  color: #F9FFEA !important;
  transform: translateY(-2px);
  border-color: #006532 !important;
}

/* Focus-visible für Accessibility */
.news-toggle-btn:focus-visible {
  outline: 2px solid #006532 !important;
  outline-offset: 2px !important;
}

/* ------------------------------------------ */
/*  Bild-Wrapper                              */
/* ------------------------------------------ */
.news-image-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 16px;
  overflow: hidden;
}

.news-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

/* Attribution Overlay – erscheint bei Hover */
.image-attribution {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  padding: 30px 16px 12px 16px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: #e8f0ec;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  text-align: right;
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}

.image-attribution a {
  color: #b3e6d2;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.image-attribution a:hover {
  color: #ffffff;
}

.news-image-wrapper:hover .image-attribution {
  opacity: 1;
  visibility: visible;
}

/* ------------------------------------------ */
/*  PDF-Download-Link                         */
/* ------------------------------------------ */
.news-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: calc(var(--bodySize) * 0.85);
  color: #0d2e21 !important;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 101, 50, 0.4);
  border-radius: 40px;
  padding: 6px 16px;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 12px;
}

.news-download:hover {
  background: rgba(0, 101, 50, 0.15);
  border-color: #006532;
  transform: translateY(-2px);
}

/* ------------------------------------------ */
/*  Ausklappbarer Bereich                     */
/* ------------------------------------------ */
.news-expandable {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.4s ease, margin 0.3s;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--gapBody);
}

.news-expandable.open {
  max-height: 2500px;
  opacity: 1;
  margin-top: 8px;
}
/* ------------------------------------------ */
/*  "Mehr anzeigen" Button (MIT MAGENTA-FIX)  */
/* ------------------------------------------ */
.news-load-more-wrapper {
  text-align: center;
  margin-top: 40px;
}

.news-load-more-btn,
.news-load-more-btn:link,
.news-load-more-btn:visited,
.news-load-more-btn:active,
.news-load-more-btn:focus {
  display: inline-block;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: calc(var(--bodySize) * 1.1);
  color: #006532 !important;
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid #006532 !important;
  border-radius: 50px;
  padding: 8px 32px;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
}

.news-load-more-btn:hover {
  background-color: #006532 !important;
  background: #006532 !important;
  color: #F9FFEA !important;
  transform: translateY(-2px);
}

.news-load-more-btn:focus-visible {
  outline: 2px solid #006532 !important;
  outline-offset: 2px !important;
}

/* Datei-Icon */
.file-icon {
  font-size: 1.1em;
}

/* Abstand für nachgeladene News-Chunks */
.news-hidden-chunk .news-card:first-child {
  margin-top: 69px;
}

/* ===== Haupttext-Überschriften ===== */

/* H2 = Hauptüberschrift (Bold, 3em, weiß auf grünem Balken) */
.news-body h2 {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  font-size: 3em;
  color: #ffffff;
  background-color: #94c11c;
  display: inline-block;
  padding: 0px 28px 0px 28px;
  margin: 20px 0 14px 0px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* H3 = Unterüberschrift (Bold, 2em, grün) */
.news-body h3 {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 900;
  font-size: 2em;
  color: #006532;
  margin: 14px 0 10px 0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Listen */
.news-body ul,
.news-body ol {
  margin: 8px 0 12px 0;
  padding-left: 20px;
}

.news-body ul {
  list-style-type: disc;
}

.news-body ol {
  list-style-type: decimal;
}

.news-body li {
  margin-bottom: 4px;
}

/* ------------------------------------------ */
/*  Notfall-Override für Elementor           */
/* ------------------------------------------ */
.elementor button.news-toggle-btn,
.elementor .news-toggle-btn,
.elementor button.news-load-more-btn,
.elementor .news-load-more-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #006532 !important;
  border: 2px solid #006532 !important;
}

.elementor button.news-toggle-btn:hover,
.elementor .news-toggle-btn:hover,
.elementor button.news-load-more-btn:hover,
.elementor .news-load-more-btn:hover {
  background: #006532 !important;
  background-color: #006532 !important;
  color: #F9FFEA !important;
}

/* ------------------------------------------ */
/*  Responsive Anpassungen                    */
/* ------------------------------------------ */
@media (max-width: 550px) {
  .news-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-date {
    white-space: normal;
    align-self: flex-start;
  }
.news-title {
  font-size: 2em;
  padding: 6px 18px;
  margin-left: -4px;
}
.news-subhead {
  font-size: 1.4em;
}
.news-preview {
  flex-direction: column;
  gap: 12px;
}

.news-thumbnail {
  width: 100px;
  height: 100px;
  order: -1;
}
  .news-toggle-btn {
    padding: 5px 20px;
  }
  .image-attribution {
    font-size: 10px;
    padding: 20px 12px 8px 12px;
  }
}

/* ------------------------------------------ */
/*  ULTIMATIVE MAGENTA-FIX für alle Buttons   */
/* ------------------------------------------ */

/* Entfernt alle :active Zustände komplett */
.news-toggle-btn:active,
.news-load-more-btn:active,
.news-toggle-btn:active:focus,
.news-load-more-btn:active:focus,
.news-toggle-btn:active:hover,
.news-load-more-btn:active:hover {
  transform: translateY(0) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #006532 !important;
  border: 2px solid #006532 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Speziell für Elementor-Button-Klick */
.elementor .news-toggle-btn:active,
.elementor .news-load-more-btn:active,
button:active.news-toggle-btn,
button:active.news-load-more-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #006532 !important;
  border: 2px solid #006532 !important;
  transform: translateY(0) !important;
}

/* Verhindert magentafarbenen "Klick-Effekt" komplett */
.news-toggle-btn,
.news-load-more-btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* Entfernt jeglichen :active Hintergrund von Elementor */
.elementor button:active,
.elementor .elementor-button:active,
.elementor button:active:focus,
.elementor .elementor-button:active:focus {
  background-color: inherit !important;
}

/* Notfall: Verhindert dass Elementor eigene :active Farben setzt */
.elementor button.news-toggle-btn:active,
.elementor button.news-load-more-btn:active {
  background-color: rgba(255, 255, 255, 0.2) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ========================================== */
/* BRUTEFORCE-MAGENTA-FIX                    */
/* ========================================== */

/* Verhindert ALLE :active Farben */
.news-toggle-btn,
.news-load-more-btn,
.news-toggle-btn *,
.news-load-more-btn *,
.news-toggle-btn:active,
.news-load-more-btn:active,
.news-toggle-btn:focus,
.news-load-more-btn:focus,
.news-toggle-btn:visited,
.news-load-more-btn:visited,
.news-toggle-btn:link,
.news-load-more-btn:link,
.news-toggle-btn:hover,
.news-load-more-btn:hover,
button.news-toggle-btn,
button.news-load-more-btn,
.elementor .news-toggle-btn,
.elementor .news-load-more-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  background-image: none !important;
  color: #006532 !important;
  border: 2px solid #006532 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Hover bleibt Grün */
.news-toggle-btn:hover,
.news-load-more-btn:hover,
.elementor .news-toggle-btn:hover,
.elementor .news-load-more-btn:hover {
  background: #006532 !important;
  background-color: #006532 !important;
  color: #F9FFEA !important;
  border-color: #006532 !important;
}

/* :active wird einfach komplett ignoriert */
.news-toggle-btn:active,
.news-load-more-btn:active {
  transform: translateY(0) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #006532 !important;
}

/* Speziell für den Moment des Klickens */
.news-toggle-btn:active:after,
.news-load-more-btn:active:after {
  display: none !important;
}

/* Entfernt jeglichen Pseudo-Element-Kram */
.news-toggle-btn::before,
.news-toggle-btn::after,
.news-load-more-btn::before,
.news-load-more-btn::after {
  display: none !important;
}