/* ======================================================================
   NICHT IRGENDWANN | Einzelseiten der 100 Ziele | Redesign 03J – Layout-Feinschliff
   Enfold Child Theme / WordPress-CPT ni_goal

   Nur Gestaltung. Die Plugin-CSS bleibt bestehen und wird zuerst geladen.
   Plugin-Funktionen (Tabs, Galerie/Lightbox, Deadlines, Status) bleiben intakt.
   ====================================================================== */

/* 1. Markenfarben nur auf Ziel-Einzelseiten. Das Plugin setzt seine
   CSS-Variablen selbst – hier gezielt übersteuern, ohne seine funktionalen
   Ampelfarben oder andere Seiten anzutasten. */
body.ni-goal-single-clean,
body.ni-goal-single-clean .ni-single-template-shell,
body.ni-goal-single-clean .ni-single-goal {
  --ni-page-bg: #ffffff;
  --ni-board-bg-start: #ffffff;
  --ni-board-bg-end: #f5f5f5;
  --ni-card-bg: #ffffff;
  --ni-primary: #020202;
  --ni-primary-light: #89252d;
  --ni-accent: #89252d;
  --ni-text: #020202;
  --ni-muted-text: #646464;
  --ni-border: rgba(2,2,2,.18);
  --ni-progress-bg: #ededed;
  --ni-on-primary: #ffffff;
  --ni-font-body: var(--font-body, 'Roboto Slab', Georgia, serif);
  --ni-font-headline: var(--font-headline, 'Nachmittage Display', Impact, sans-serif);
}

body.ni-goal-single-clean,
body.ni-goal-single-clean #wrap_all,
body.ni-goal-single-clean #main,
body.ni-goal-single-clean #primary {
  background-color: #ffffff;
}

body.ni-goal-single-clean .ni-single-template-shell {
  width: 100%;
  min-height: 0;
  padding: 0 0 clamp(72px, 9vw, 128px);
  margin: 0;
  background: #ffffff !important;
}

body.ni-goal-single-clean .ni-single-template-wrap {
  width: min(100%, 1340px);
  max-width: 1340px;
  margin: 0 auto;
  padding: 76px clamp(18px, 4vw, 58px) 0;
  background: #ffffff !important;
}

body.ni-goal-single-clean .ni-single-goal {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #020202;
  font: 400 1rem/1.7 var(--font-body, 'Roboto Slab', Georgia, serif) !important;
}

body.ni-goal-single-clean .ni-single-goal :where(p, li) {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Enfolds seitliche Vor/Zurueck-Pfeile gehoeren nicht zu unserer Zielnavigation. */
body.ni-goal-single-clean .avia-post-nav {
  display: none !important;
}

/* 2. Zurück-Link / redaktioneller Auftakt. */
body.ni-goal-single-clean .ni-single-back {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 0 23px !important;
  padding: 4px 0 7px !important;
  border: 0 !important;
  border-bottom: 3px solid #89252d !important;
  border-radius: 0 !important;
  color: #020202 !important;
  background: transparent !important;
  text-decoration: none !important;
  font: 700 .78rem/1.5 var(--font-body, Georgia, serif) !important;
  letter-spacing: .045em !important;
  text-transform: uppercase;
  transition: color .18s ease;
}
body.ni-goal-single-clean .ni-single-back:hover,
body.ni-goal-single-clean .ni-single-back:focus-visible {
  color: #89252d !important;
}

/* 3. Dunkler Hero: klare Typohierarchie, kein Pseudo-Coaching. */
body.ni-goal-single-clean .ni-single-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(40px, 6vw, 84px) clamp(26px, 5.5vw, 82px)
           clamp(46px, 5.5vw, 78px);
  border: 2px solid #020202;
  border-top: 8px solid #89252d;
  border-radius: 0 !important;
  background: #020202 !important;
  box-shadow: 12px 12px 0 #89252d !important;
  color: #ffffff;
}
body.ni-goal-single-clean .ni-single-hero::after {
  content: 'NICHT IRGENDWANN';
  position: absolute;
  z-index: -1;
  right: -2%;
  bottom: -2%;
  color: rgba(255,255,255,.035);
  font: 400 clamp(4.5rem, 11vw, 12rem)/.78 var(--font-headline, Impact, sans-serif);
  white-space: nowrap;
  pointer-events: none;
  transform: rotate(-4deg);
}
body.ni-goal-single-clean .ni-single-kicker {
  display: inline-block;
  margin: 0 0 clamp(25px, 3vw, 42px) !important;
  padding: 10px 16px 9px !important;
  color: #ffffff !important;
  background: #89252d !important;
  border: 0 !important;
  border-radius: 0 !important;
  font: 700 .81rem/1.2 var(--font-body, Georgia, serif) !important;
  text-transform: uppercase;
  letter-spacing: .10em !important;
  transform: rotate(-1.2deg);
}
body.ni-goal-single-clean .ni-single-title {
  width: min(100%, 1080px);
  max-width: none;
  margin: 0 0 clamp(30px, 4vw, 50px) !important;
  padding: 0 !important;
  color: #ffffff !important;
  font: 400 clamp(3.65rem, 8vw, 8.2rem)/.90 var(--font-headline, Impact, sans-serif) !important;
  letter-spacing: .008em !important;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Metadaten in kontrastierenden kantigen Chips; Deadline-Licht sichtbar. */
body.ni-goal-single-clean .ni-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 9px;
  margin-top: 0;
}
body.ni-goal-single-clean .ni-single-meta .ni-category-pill,
body.ni-goal-single-clean .ni-single-meta-item,
body.ni-goal-single-clean .ni-single-status-pill {
  min-height: 46px;
  padding: 10px 14px !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  border-radius: 0 !important;
  background: rgba(255,255,255,.08) !important;
  color: #ffffff !important;
  font: 700 .83rem/1.3 var(--font-body, Georgia, serif) !important;
  box-shadow: none !important;
}
body.ni-goal-single-clean .ni-single-meta .ni-category-pill {
  min-width: auto;
  color: #ffffff !important;
  background: #89252d !important;
  border-color: #89252d !important;
}
body.ni-goal-single-clean .ni-single-status-pill {
  text-transform: uppercase;
  letter-spacing: .04em;
}
body.ni-goal-single-clean .ni-single-status-pill-geschafft {
  background: #89252d !important;
  border-color: #89252d !important;
  transform: rotate(-1deg);
}
body.ni-goal-single-clean .ni-single-status-pill-in-arbeit {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #020202 !important;
}
body.ni-goal-single-clean .ni-single-meta-label {
  display: block;
  margin-right: 3px;
  color: rgba(255,255,255,.65) !important;
  font: 700 .68rem/1.2 var(--font-body, Georgia, serif) !important;
  letter-spacing: .09em !important;
}
body.ni-goal-single-clean .ni-single-meta-item .ni-deadline-inner {
  gap: 9px !important;
}
body.ni-goal-single-clean .ni-single-meta-item .ni-deadline-date {
  color: #ffffff !important;
}
body.ni-goal-single-clean .ni-single-difficulty-item .ni-difficulty {
  color: #ffffff !important;
}
body.ni-goal-single-clean .ni-single-difficulty-item .ni-difficulty-dot.is-empty {
  background: rgba(255,255,255,.25) !important;
  opacity: 1;
}
/* Bedeutung der Plugin-Ampeln und Schwierigkeitsfarben bleibt erhalten. */
body.ni-goal-single-clean .ni-single-meta .ni-deadline-light {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9) !important;
}
body.ni-goal-single-clean .ni-deadline-light.ni-deadline-green  { background: var(--ni-green, #2f9e69) !important; }
body.ni-goal-single-clean .ni-deadline-light.ni-deadline-yellow { background: var(--ni-yellow, #f0b429) !important; }
body.ni-goal-single-clean .ni-deadline-light.ni-deadline-red    { background: var(--ni-red, #c92a2a) !important; }
body.ni-goal-single-clean .ni-deadline-light.ni-deadline-neutral{ background: var(--ni-neutral, #9aa3ad) !important; }

/* 4. Große authentische Fotografie: ein Hauch Polaroid statt Stock-Kachel. */
body.ni-goal-single-clean .ni-single-image-wrap {
  position: relative;
  width: min(94%, 1080px);
  margin: -22px auto clamp(38px, 5vw, 70px) !important;
  padding: 10px 10px 28px !important;
  overflow: visible;
  background: #ffffff !important;
  border: 1px solid rgba(2,2,2,.22) !important;
  border-radius: 0 !important;
  box-shadow: 14px 14px 0 rgba(2,2,2,.12) !important;
  transform: rotate(-.75deg);
  z-index: 2;
}
body.ni-goal-single-clean .ni-single-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 620px;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* 5. Projektkarten: weiß, starke Striche, lesbarer Text. */
body.ni-goal-single-clean .ni-single-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 25px);
  margin-top: 32px;
}
body.ni-goal-single-clean .ni-single-card {
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  background: #ffffff !important;
  border: 2px solid #020202 !important;
  border-radius: 0 !important;
  box-shadow: 6px 6px 0 rgba(2,2,2,.1) !important;
  color: #020202 !important;
}
body.ni-goal-single-clean .ni-single-card-main,
body.ni-goal-single-clean .ni-single-card-wide {
  grid-column: 1 / -1;
}
body.ni-goal-single-clean .ni-single-card-main {
  border-top: 7px solid #89252d !important;
  padding: clamp(30px, 4vw, 58px);
}
body.ni-goal-single-clean .ni-single-card h2 {
  display: block;
  margin: 0 0 21px !important;
  padding: 0;
  color: #89252d !important;
  font: 400 clamp(1.95rem, 2.5vw, 2.85rem)/.96 var(--font-headline, Impact, sans-serif) !important;
  letter-spacing: .015em !important;
  text-transform: uppercase !important;
}
body.ni-goal-single-clean .ni-single-card-main h2 {
  font-size: clamp(2.4rem, 4vw, 4.4rem) !important;
  color: #020202 !important;
}
body.ni-goal-single-clean .ni-single-card-main h2::after {
  content: '';
  display: block;
  width: 112px;
  height: 6px;
  margin-top: 18px;
  background: #89252d;
  transform: rotate(-1deg);
}
body.ni-goal-single-clean .ni-single-card :where(p, li),
body.ni-goal-single-clean .ni-single-content {
  color: #222222 !important;
  font: 400 1rem/1.77 var(--font-body, Georgia, serif) !important;
}
body.ni-goal-single-clean .ni-single-card :where(p, li) {
  margin-bottom: 1em;
}
/* Lesebreite im Tab-Bereich und in den langen Zielgeschichten begrenzen. */
body.ni-goal-single-clean .ni-single-card :where(p, ul, ol),
body.ni-goal-single-clean .ni-single-tab-panel :where(p, ul, ol) {
  max-width: 820px;
}
body.ni-goal-single-clean .ni-single-content {
  max-width: 790px;
}
body.ni-goal-single-clean .ni-single-muted {
  color: #777777 !important;
}
body.ni-goal-single-clean .ni-single-date-big {
  color: #020202 !important;
  font: 400 clamp(2.4rem, 4vw, 4rem)/1 var(--font-headline, Impact, sans-serif) !important;
  letter-spacing: .01em !important;
}
body.ni-goal-single-clean .ni-single-card a:not(.ni-polaroid) {
  color: #89252d;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 6. Die 3 Planungstabs: Bedienung bleibt Plugin-JS. */
body.ni-goal-single-clean .ni-single-tabs-card {
  padding: 0 !important;
  overflow: hidden;
}
body.ni-goal-single-clean .ni-single-tabs-nav {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-bottom: 2px solid #020202 !important;
  background: #020202 !important;
}
body.ni-goal-single-clean .ni-single-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 64px;
  margin: 0 !important;
  padding: 18px 14px !important;
  color: #ffffff !important;
  background: #020202 !important;
  border: 0 !important;
  border-right: 1px solid rgba(255,255,255,.23) !important;
  border-radius: 0 !important;
  font: 700 .78rem/1.35 var(--font-body, Georgia, serif) !important;
  text-align: center !important;
  text-transform: uppercase;
  letter-spacing: .035em !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
body.ni-goal-single-clean .ni-single-tab:last-child { border-right: 0 !important; }
body.ni-goal-single-clean .ni-single-tab:hover,
body.ni-goal-single-clean .ni-single-tab:focus-visible {
  color: #ffffff !important;
  background: #4e171d !important;
}
body.ni-goal-single-clean .ni-single-tab.is-active,
body.ni-goal-single-clean .ni-single-tab[aria-selected="true"] {
  color: #ffffff !important;
  background: #89252d !important;
}
body.ni-goal-single-clean .ni-single-tab.is-active::after,
body.ni-goal-single-clean .ni-single-tab[aria-selected="true"]::after {
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 3px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}
body.ni-goal-single-clean .ni-single-tabs-panels {
  padding: clamp(22px, 3.5vw, 42px) !important;
  background: #ffffff;
}
body.ni-goal-single-clean .ni-single-tab-panel[hidden] {
  display: none !important;
}
body.ni-goal-single-clean .ni-single-tab-panel :where(p, li) {
  color: #020202;
  font: 400 1rem/1.75 var(--font-body, Georgia, serif);
}

/* 7. Status/Erlebnisse – klar abgesetzt, keine falschen Erfolgssymbole. */
body.ni-goal-single-clean .ni-single-section-break {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: row;
  gap: clamp(16px, 3vw, 38px);
  align-items: center;
  justify-content: flex-start;
  margin: 8px 0 3px;
  padding: clamp(24px, 3vw, 38px);
  border: 2px solid #020202 !important;
  background: #020202 !important;
  box-shadow: 9px 9px 0 #89252d !important;
}
body.ni-goal-single-clean .ni-single-section-separator {
  flex: 0 0 66px;
  position: relative;
  height: 68px;
  width: 68px;
}
body.ni-goal-single-clean .ni-single-section-separator::before {
  display: none;
}
body.ni-goal-single-clean .ni-single-section-check {
  display: inline-flex;
  width: 65px;
  height: 65px;
  border: 3px solid #ffffff;
  border-radius: 0;
  background: #89252d;
  color: #ffffff;
  font: 700 2.1rem/1 var(--font-body, Georgia, serif) !important;
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(-4deg);
}
body.ni-goal-single-clean .ni-single-section-break h2 {
  margin: 0 !important;
  color: #ffffff !important;
  text-align: left !important;
  font: 400 clamp(2.8rem, 5.4vw, 6.4rem)/.88 var(--font-headline, Impact, sans-serif) !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
}

/* 8. Galerie bleibt Polaroid und bedienbar per Plugin-Lightbox. */
body.ni-goal-single-clean .ni-single-gallery-card {
  overflow: visible;
}
body.ni-goal-single-clean .ni-polaroid-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
  align-items: start;
  padding: 24px 8px 13px;
}
body.ni-goal-single-clean .ni-polaroid {
  display: block !important;
  padding: 9px 9px 26px !important;
  border: 1px solid #d0d0d0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: 8px 11px 0 rgba(2,2,2,.15) !important;
  color: #020202 !important;
}
body.ni-goal-single-clean .ni-polaroid:hover,
body.ni-goal-single-clean .ni-polaroid:focus-visible {
  box-shadow: 9px 15px 0 rgba(137,37,45,.35) !important;
  outline: 3px solid #89252d;
  outline-offset: 3px;
}
body.ni-goal-single-clean .ni-polaroid-photo {
  aspect-ratio: 1 / 1;
  background: #ededed;
}
body.ni-goal-single-clean .ni-polaroid-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  margin: 0 !important;
}
body.ni-goal-single-clean .ni-polaroid-caption {
  margin-top: 12px;
  color: #444444;
  font: 400 .79rem/1.35 var(--font-body, Georgia, serif) !important;
}
/* Die Lightbox wird vom Plugin direkt am body erzeugt; daher separat. */
body.ni-goal-single-clean .ni-lightbox {
  background: rgba(2,2,2,.94);
}
body.ni-goal-single-clean .ni-lightbox-image {
  border-radius: 0;
}
body.ni-goal-single-clean .ni-lightbox-close,
body.ni-goal-single-clean .ni-lightbox-prev,
body.ni-goal-single-clean .ni-lightbox-next {
  border-radius: 0 !important;
  background: #89252d !important;
  color: #ffffff !important;
}
body.ni-goal-single-clean .ni-lightbox-close:hover,
body.ni-goal-single-clean .ni-lightbox-prev:hover,
body.ni-goal-single-clean .ni-lightbox-next:hover {
  background: #581920 !important;
}

/* 9. Tablet / Handy. */
@media (max-width: 900px) {
  body.ni-goal-single-clean .ni-single-template-wrap {
    padding: 72px 22px 0;
  }
  body.ni-goal-single-clean .ni-single-hero {
    padding: 38px 28px 44px;
    box-shadow: 7px 7px 0 #89252d !important;
  }
  body.ni-goal-single-clean .ni-single-title {
    font-size: clamp(3.1rem, 9.5vw, 6.4rem) !important;
  }
  body.ni-goal-single-clean .ni-polaroid-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  body.ni-goal-single-clean .ni-single-template-wrap {
    padding: 62px 15px 0;
  }
  body.ni-goal-single-clean .ni-single-back {
    margin-bottom: 19px !important;
  }
  body.ni-goal-single-clean .ni-single-hero {
    padding: 34px 22px 40px;
  }
  body.ni-goal-single-clean .ni-single-title {
    margin-bottom: 25px !important;
    font-size: clamp(3.05rem, 12vw, 5.3rem) !important;
    line-height: .92 !important;
  }
  body.ni-goal-single-clean .ni-single-meta {
    gap: 7px;
  }
  body.ni-goal-single-clean .ni-single-meta .ni-category-pill,
  body.ni-goal-single-clean .ni-single-meta-item,
  body.ni-goal-single-clean .ni-single-status-pill {
    width: 100%;
    justify-content: space-between !important;
  }
  body.ni-goal-single-clean .ni-single-image-wrap {
    width: 96%;
    padding: 6px 6px 17px !important;
    margin-top: -13px !important;
    margin-bottom: 42px !important;
    box-shadow: 7px 7px 0 rgba(2,2,2,.12) !important;
    transform: rotate(-.45deg);
  }
  body.ni-goal-single-clean .ni-single-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 28px;
  }
  body.ni-goal-single-clean .ni-single-card {
    padding: 25px 22px;
    box-shadow: 4px 4px 0 rgba(2,2,2,.1) !important;
  }
  body.ni-goal-single-clean .ni-single-card-main,
  body.ni-goal-single-clean .ni-single-card-wide,
  body.ni-goal-single-clean .ni-single-section-break {
    grid-column: 1;
  }
  body.ni-goal-single-clean .ni-single-tabs-card { padding: 0 !important; }
  body.ni-goal-single-clean .ni-single-tabs-nav {
    flex-direction: column;
  }
  body.ni-goal-single-clean .ni-single-tab {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 13px 15px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.16) !important;
    text-align: left !important;
    justify-content: flex-start !important;
  }
  body.ni-goal-single-clean .ni-single-tab.is-active::after,
  body.ni-goal-single-clean .ni-single-tab[aria-selected="true"]::after {
    left: auto;
    right: 14px;
    bottom: 12px;
    width: 24px;
    height: 3px;
  }
  body.ni-goal-single-clean .ni-single-tabs-panels { padding: 26px 21px !important; }
  body.ni-goal-single-clean .ni-single-section-break {
    padding: 21px 18px;
    gap: 15px;
  }
  body.ni-goal-single-clean .ni-single-section-separator,
  body.ni-goal-single-clean .ni-single-section-check {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  body.ni-goal-single-clean .ni-single-section-check {
    font-size: 1.55rem !important;
  }
  body.ni-goal-single-clean .ni-single-section-break h2 {
    font-size: clamp(2.6rem, 8vw, 4.8rem) !important;
  }
  body.ni-goal-single-clean .ni-polaroid-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
  }
}
@media (max-width: 450px) {
  body.ni-goal-single-clean .ni-single-template-wrap {
    padding-inline: 12px;
  }
  body.ni-goal-single-clean .ni-single-hero {
    padding: 31px 19px 36px;
  }
  body.ni-goal-single-clean .ni-single-title {
    font-size: clamp(2.8rem, 12.5vw, 4rem) !important;
  }
  body.ni-goal-single-clean .ni-polaroid-gallery {
    grid-template-columns: 1fr 1fr;
  }
  body.ni-goal-single-clean .ni-polaroid {
    padding: 7px 7px 19px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.ni-goal-single-clean .ni-single-goal *,
  body.ni-goal-single-clean .ni-single-goal *::before,
  body.ni-goal-single-clean .ni-single-goal *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
