/* ============================================
   ETTI + PARTNER — Subpage Styles
   Hero, Content Sections, Topic Cards,
   Team Grid, Modal, CTA Accent
   ============================================ */

/* --- Accent Color System --- */
body[data-accent="blue"] {
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --accent-light: var(--color-primary-light);
  --accent-hover: var(--color-primary-hover);
}

body[data-accent="red"] {
  --accent: var(--color-secondary);
  --accent-dark: var(--color-secondary-dark);
  --accent-light: var(--color-secondary-light);
  --accent-hover: var(--color-secondary-dark);
}

body[data-accent="green"] {
  --accent: var(--color-tertiary);
  --accent-dark: var(--color-tertiary-dark);
  --accent-light: var(--color-tertiary-light);
  --accent-hover: var(--color-tertiary-dark);
}

/* --- Nav Active State --- */
.nav__link.is-active {
  color: var(--accent, var(--color-primary));
}

.nav__link.is-active::after {
  width: 100%;
  background: var(--accent, var(--color-primary));
}

/* ============================================
   SUBPAGE HERO
   ============================================ */
.subpage-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  background-color: var(--accent-light);
  overflow: hidden;
}

/* Kompakter Hero für Rechtsseiten (Datenschutz, Impressum) — weniger Höhe, weniger Abstand */
.subpage-hero--compact {
  min-height: auto;
  padding: 7rem 0 2.5rem;
}

/* Nach kompaktem Hero: weniger Abstand zum Inhalt */
.subpage-hero--compact + main .subpage-section:first-child {
  padding-top: var(--space-xl);
}

.subpage-hero__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* Pattern: 2 Kreise nebeneinander (Kommunikation) */
.subpage-hero__pattern--comm-circles {
  background-image:
    radial-gradient(circle at 35% 50%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%),
    radial-gradient(circle at 68% 50%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%);
  opacity: 0.08;
}

/* Pattern: 4 gleich große Kreise, Durchmesser = Sektionshoehe, ragen oben/unten raus (Arbeitsorganisation) */
.subpage-hero__pattern--org-circles {
  background-image:
    radial-gradient(circle closest-side, transparent 91%, var(--accent) 93%, var(--accent) 97%, transparent 99%),
    radial-gradient(circle closest-side, transparent 91%, var(--accent) 93%, var(--accent) 97%, transparent 99%),
    radial-gradient(circle closest-side, transparent 91%, var(--accent) 93%, var(--accent) 97%, transparent 99%),
    radial-gradient(circle closest-side, transparent 91%, var(--accent) 93%, var(--accent) 97%, transparent 99%);
  background-size: 30% 300%;
  background-repeat: no-repeat;
  background-position: 12.5% 50%, 37.5% 50%, 62.5% 50%, 87.5% 50%;
  opacity: 0.08;
}

/* Pattern: Concentric (Persoenlichkeitsentwicklung) */
.subpage-hero__pattern--concentric {
  background-image:
    radial-gradient(circle at 70% 50%, transparent 20%, var(--accent) 20.5%, var(--accent) 21%, transparent 21.5%),
    radial-gradient(circle at 70% 50%, transparent 35%, var(--accent) 35.5%, var(--accent) 36%, transparent 36.5%),
    radial-gradient(circle at 70% 50%, transparent 50%, var(--accent) 50.5%, var(--accent) 51%, transparent 51.5%);
  opacity: 0.08;
}

/* Pattern: 4 Kreise oben/unten/links/rechts (Team) */
.subpage-hero__pattern--team-circles {
  background-image:
    radial-gradient(circle at 50% -10%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%),
    radial-gradient(circle at 50% 110%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%),
    radial-gradient(circle at -10% 50%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%),
    radial-gradient(circle at 110% 50%, transparent 22%, var(--accent) 23%, var(--accent) 24.5%, transparent 25.5%);
  opacity: 0.08;
}

/* Pattern: Viereck + Kreis nebeneinander (Blog) */
.subpage-hero__pattern--blog-shapes {
  opacity: 0.08;
}

.subpage-hero__pattern--blog-shapes::before,
.subpage-hero__pattern--blog-shapes::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Viereck links */
.subpage-hero__pattern--blog-shapes::before {
  left: 20%;
  width: 420px;
  height: 420px;
  border: 10px solid var(--accent);
  border-radius: 6px;
  filter: blur(6px);
}

/* Kreis rechts */
.subpage-hero__pattern--blog-shapes::after {
  right: 18%;
  width: 480px;
  height: 480px;
  border: 10px solid var(--accent);
  border-radius: 50%;
  filter: blur(6px);
}

/* Pattern: Dots (Ueber uns) */
.subpage-hero__pattern--dots {
  background-image: radial-gradient(circle, var(--accent) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  opacity: 0.1;
}

.subpage-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

.subpage-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.subpage-hero__breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.subpage-hero__breadcrumb a:hover {
  color: var(--accent);
}

.subpage-hero__breadcrumb span {
  color: var(--color-text-muted);
}

.subpage-hero__label {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.subpage-hero__label::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.subpage-hero__title {
  font-size: var(--text-display);
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  max-width: 800px;
}

.subpage-hero__subtitle {
  font-size: var(--text-body-lg);
  color: var(--color-text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================
   SUBPAGE CONTENT SECTIONS
   ============================================ */
.subpage-section {
  padding: var(--space-3xl) 0;
}

.subpage-section--light {
  background-color: var(--color-surface-light);
}

.subpage-section--surface {
  background-color: var(--color-surface);
}

.subpage-section--accent {
  background-color: var(--accent, var(--color-primary));
  color: var(--color-white);
}

.subpage-section--accent .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.subpage-section--accent .section-title,
.subpage-section--accent h2,
.subpage-section--accent h3 {
  color: var(--color-white);
}

.subpage-section--accent .section-subtitle,
.subpage-section--accent p {
  color: rgba(255, 255, 255, 0.85);
}

/* Prose block for readable text */
.subpage-prose {
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
}

.subpage-prose h2 {
  margin-bottom: var(--space-md);
  color: var(--color-text-dark);
}

.subpage-prose p {
  color: var(--color-text-muted);
  font-size: var(--text-body-lg);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.subpage-prose p:last-child {
  margin-bottom: 0;
}

/* Legal prose (Datenschutz, Impressum) — kompaktere Darstellung */
.subpage-prose--legal {
  max-width: 780px;
}

.subpage-prose--legal h2 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-surface-dark);
}

.subpage-prose--legal h2:first-child {
  margin-top: 0;
}

.subpage-prose--legal p {
  font-size: clamp(0.9rem, 1.1vw, 0.975rem);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.subpage-prose--legal small {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Highlight list within prose */
.subpage-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.subpage-highlights li {
  padding-left: 1.5rem;
  position: relative;
  font-size: var(--text-body-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.subpage-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, var(--color-primary));
}

.subpage-highlights li strong {
  color: var(--color-text-dark);
  font-weight: 600;
}

/* ============================================
   TOPIC CARDS
   ============================================ */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.topic-card {
  background: var(--color-white);
  border: 1px solid var(--color-surface-dark);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.topic-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.topic-card:hover::before {
  transform: scaleX(1);
}

.topic-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.topic-card__title {
  font-size: var(--text-h3);
  margin-bottom: var(--space-sm);
  color: var(--color-text-dark);
}

.topic-card__text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   CTA ACCENT (replaces dark CTA on subpages)
   ============================================ */
.cta--accent {
  background: var(--accent, var(--color-primary));
  color: var(--color-white);
}

.cta--accent .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.cta--accent .cta__title {
  color: var(--color-white);
}

.cta--accent .cta__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.cta--accent .btn--primary {
  background: var(--color-white);
  color: var(--accent, var(--color-primary));
}

.cta--accent .btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.cta--accent .btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-white);
}

.cta--accent .btn--ghost:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* ============================================
   PERSPECTIVES GRID (Ueber uns)
   ============================================ */
.perspectives-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.perspective-card {
  background: var(--color-white);
  border: 1px solid var(--color-surface-dark);
  border-radius: 12px;
  padding: 2rem;
  transition: all var(--transition-base);
}

.perspective-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border-color: transparent;
}

.perspective-card__title {
  font-size: var(--text-h3);
  margin-bottom: var(--space-xs);
  color: var(--color-text-dark);
}

.perspective-card__text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   TEAM GRID
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--color-white);
  border: 1px solid var(--color-surface-dark);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.team-card__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
}

/* Team photo: desaturated by default, color on hover */
.team-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%) contrast(1.05) brightness(1.05);
  transition: filter 0.4s ease;
}

.team-card:hover .team-card__img {
  filter: grayscale(0%) contrast(1) brightness(1);
}

/* Per-member photo positioning */
.team-card[data-member="marion"] .team-card__img {
  object-position: 30% top;
}

.team-card[data-member="alexandra"] .team-card__img {
  object-position: 60% top;
}

/* Oliver Schilling: small source photo — zoom into face area */
.team-card[data-member="oliver"] .team-card__img {
  object-fit: cover;
  object-position: top center;
}

.team-card__info {
  padding: 1.25rem 1.5rem;
}

.team-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
}

.team-card__role {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.team-card__cta {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--accent, var(--color-primary));
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ============================================
   TEAM QUOTE
   ============================================ */
.team-quote-band {
  background-color: var(--color-white) !important;
  padding: var(--space-2xl) 0 !important;
  margin: 0 !important;
}

.team-quote {
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  max-width: 820px;
  position: relative;
  background-color: rgba(43, 94, 158, 0.07);
  border: 1.5px solid rgba(43, 94, 158, 0.18);
  border-radius: 20px;
}

/* Dekoratives Anführungszeichen */
.team-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.3em;
  left: 0.4em;
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 700;
  color: rgba(43, 94, 158, 0.15);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.team-quote__text {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 500;
  color: var(--color-text-dark);
  line-height: 1.55;
  letter-spacing: -0.01em;
  font-style: italic;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 35, 0.6);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 2001;
  background: var(--color-white);
  border-radius: 16px;
  max-width: 700px;
  width: calc(100% - 2rem);
  max-height: 85vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  z-index: 1;
  cursor: pointer;
  border: none;
}

.modal__close:hover {
  background: var(--color-surface);
  color: var(--color-text-dark);
}

.modal__header {
  padding: 2.5rem 2.5rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.modal__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal[data-member="marion"] .modal__img {
  object-position: 30% top;
}

.modal[data-member="alexandra"] .modal__img {
  object-position: 60% top;
}

.modal__name {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.15rem;
}

.modal__role {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.modal__body {
  padding: 2rem 2.5rem 2.5rem;
}

.modal__section-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent, var(--color-primary));
  margin-bottom: var(--space-sm);
  margin-top: var(--space-lg);
}

.modal__section-title:first-child {
  margin-top: 0;
}

.modal__qualifications {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal__qualifications li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.modal__qualifications li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--color-primary));
  opacity: 0.5;
}

.modal__bio {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.modal__bio p + p {
  margin-top: var(--space-sm);
}

/* ============================================
   VALUES BAND (accent version for subpages)
   ============================================ */
.values-band {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.values-band__items {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.values-band__item {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--color-white);
}

.values-band__item--highlight {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE — SUBPAGES
   ============================================ */
@media (max-width: 1024px) {
  .subpage-hero {
    min-height: 40vh;
    padding: 7rem 0 3rem;
  }

  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .perspectives-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .subpage-hero {
    min-height: auto;
    padding: 6rem 0 2.5rem;
  }

  .subpage-hero__title {
    font-size: var(--text-h1);
  }

  .subpage-hero__label::before {
    display: none;
  }

  .subpage-section {
    padding: var(--space-2xl) 0;
  }

  .topics-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .perspectives-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal__header {
    padding: 2rem 1.5rem 0;
    flex-direction: column;
    text-align: center;
  }

  .modal__body {
    padding: 1.5rem;
  }

  .values-band__items {
    gap: 1.5rem;
  }

  .subpage-hero__breadcrumb {
    display: none;
  }
}

/* ============================================
   BLOG — LISTING & POST
   ============================================ */

/* --- Category Filters --- */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.blog-filter {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: var(--text-small);
  font-weight: 600;
  border: 1.5px solid var(--color-surface-dark);
  color: var(--color-text-muted);
  background: var(--color-white);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.blog-filter:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text-dark);
}

.blog-filter.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.blog-filter--blue.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.blog-filter--red.is-active {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.blog-filter--green.is-active {
  background: var(--color-tertiary);
  border-color: var(--color-tertiary);
}

/* --- Post Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ============================================
   WORDPRESS QUERY BLOCK OVERRIDES
   WP Query erzeugt: .wp-block-query > ul.wp-block-post-template > li > article.blog-card
   ============================================ */

/* WordPress Constrained Layout Override:
   WP setzt max-width auf Kind-Elemente von is-layout-constrained.
   Das muss innerhalb von blog-grid komplett aufgehoben werden. */
.blog-grid,
.blog-grid .wp-block-query,
.blog-grid .wp-block-post-template,
.blog-grid .wp-block-post-template > li,
.blog-grid .wp-block-post-template > li > * {
  max-width: none !important;
  box-sizing: border-box;
}

/* WP Group-Wrapper duerfen blog-grid nicht constrainen */
.is-layout-constrained > .wp-block-query,
.is-layout-constrained .blog-grid,
.subpage-section .wp-block-query,
.subpage-section .blog-grid {
  max-width: none !important;
  width: 100%;
}

/* Query Block: volle Breite im Grid */
.blog-grid .wp-block-query {
  grid-column: 1 / -1;
  width: 100%;
}

/* Post-Template als 2-Spalten Grid (ersetzt WP Default-Flex) */
.blog-grid .wp-block-post-template,
.wp-block-post-template,
.related-posts__grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 2rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Li-Wrapper: volle Breite, Pass-through */
.blog-grid .wp-block-post-template > li,
.wp-block-post-template > li {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  max-width: none !important;
}

/* Blog Card innerhalb von li: volle Breite */
.wp-block-post-template > li > .blog-card {
  width: 100%;
}

/* --- Kategorie-Farben via CSS :has() ---
   WordPress gibt Kategorie-Links mit href="/category/{slug}/" aus.
   Damit ordnen wir Farben automatisch zu. */

/* Arbeitsorganisation = Blau */
.blog-card:has(.blog-card__category a[href*="arbeitsorganisation"]) {
  border-left-color: var(--color-primary);
}
.blog-card:has(.blog-card__category a[href*="arbeitsorganisation"]) .blog-card__category a {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.blog-card:has(.blog-card__category a[href*="arbeitsorganisation"]):hover .blog-card__title a {
  color: var(--color-primary);
}
.blog-card:has(.blog-card__category a[href*="arbeitsorganisation"]) .blog-card__link {
  color: var(--color-primary);
}

/* Kommunikation = Rot */
.blog-card:has(.blog-card__category a[href*="kommunikation"]) {
  border-left-color: var(--color-secondary);
}
.blog-card:has(.blog-card__category a[href*="kommunikation"]) .blog-card__category a {
  background: var(--color-secondary-light);
  color: var(--color-secondary);
}
.blog-card:has(.blog-card__category a[href*="kommunikation"]):hover .blog-card__title a {
  color: var(--color-secondary);
}
.blog-card:has(.blog-card__category a[href*="kommunikation"]) .blog-card__link {
  color: var(--color-secondary);
}

/* Persoenlichkeitsentwicklung = Grün */
.blog-card:has(.blog-card__category a[href*="persoenlichkeit"]) {
  border-left-color: var(--color-tertiary);
}
.blog-card:has(.blog-card__category a[href*="persoenlichkeit"]) .blog-card__category a {
  background: var(--color-tertiary-light);
  color: var(--color-tertiary);
}
.blog-card:has(.blog-card__category a[href*="persoenlichkeit"]):hover .blog-card__title a {
  color: var(--color-tertiary);
}
.blog-card:has(.blog-card__category a[href*="persoenlichkeit"]) .blog-card__link {
  color: var(--color-tertiary);
}

/* --- WordPress Block-Element Styling ---
   WP fuegt eigene Klassen hinzu, die wir ueberschreiben muessen */

/* Kategorie-Links: WP gibt <div class="wp-block-post-terms blog-card__category"><a>Name</a></div> aus */
.blog-card__category a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

/* Fallback wenn keine :has() Unterstuetzung: Default-Farbe Blau */
.blog-card__category a {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* WP post-terms Container: Reset WP-Defaults */
.wp-block-post-terms.blog-card__category {
  margin-bottom: var(--space-sm);
}

/* WP post-title: erbt blog-card__title Styles, aber WP fuegt eigene margin hinzu */
h3.wp-block-post-title.blog-card__title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--color-text-dark);
  margin-top: 0 !important;
  margin-bottom: var(--space-sm) !important;
  line-height: 1.3;
}

h3.wp-block-post-title.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* WP post-excerpt: hat eigenes <p> innerhalb */
.wp-block-post-excerpt.blog-card__excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.wp-block-post-excerpt.blog-card__excerpt p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* WP read-more Link */
a.wp-block-read-more.blog-card__link {
  font-size: var(--text-small);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition-fast);
  color: var(--color-primary);
}

.blog-card:hover a.wp-block-read-more.blog-card__link {
  gap: 0.6rem;
}

/* (post-date styles moved to footer/meta section above) */

/* WP Group Wrapper fuer blog-card__header: kein extra Spacing */
.blog-card .wp-block-group.blog-card__header {
  margin: 0;
  padding: 0;
}

/* Blog Card Footer (Datum + Lesezeit) */
.blog-card__footer {
  display: flex;
  gap: 1rem;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  padding: 0;
  align-items: center;
}

/* WP Group Wrapper fuer blog-card__meta (Fallback) */
.blog-card .wp-block-group.blog-card__meta {
  display: flex;
  gap: 1rem;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  padding: 0;
}

/* WP post-date: innerhalb von footer/meta */
.blog-card__footer .wp-block-post-date,
.blog-card__meta .wp-block-post-date {
  font-size: inherit;
  color: inherit;
}

/* --- Farbklassen via JS gesetzt (Fallback fuer Browser ohne :has()) --- */
.blog-card__category--blue a,
.blog-card__category-link--blue {
  background: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
}
.blog-card__category--red a,
.blog-card__category-link--red {
  background: var(--color-secondary-light) !important;
  color: var(--color-secondary) !important;
}
.blog-card__category--green a,
.blog-card__category-link--green {
  background: var(--color-tertiary-light) !important;
  color: var(--color-tertiary) !important;
}

/* --- Query Pagination --- */
.wp-block-query-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-xl);
  font-size: 0.95rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.wp-block-query-pagination a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.wp-block-query-pagination .current {
  background: var(--color-primary);
  color: white;
}

/* --- Post Card --- */
.blog-card {
  background: var(--color-white);
  border: 1px solid var(--color-surface-dark);
  border-left: 3px solid var(--color-surface-dark);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

/* Blog Card Image */
.blog-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

/* WP erzeugt figure.wp-block-post-featured-image – alle Standard-Abstände entfernen */
.blog-card__image.wp-block-post-featured-image,
.blog-card .wp-block-post-featured-image,
.blog-card > figure,
.blog-card > .wp-block-post-featured-image,
.wp-block-post-template li .wp-block-post-featured-image,
.wp-block-post-template .blog-card .wp-block-post-featured-image {
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block !important;
}

.blog-card__image img,
.blog-card__image a,
.blog-card .wp-block-post-featured-image img,
.blog-card .wp-block-post-featured-image a {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.blog-card__image img,
.blog-card .wp-block-post-featured-image img {
  object-fit: cover;
  aspect-ratio: 16 / 9;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image img,
.blog-card:hover .wp-block-post-featured-image img {
  transform: scale(1.04);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.04);
}

/* Blog Card Content (unter dem Bild) */
.blog-card__content {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-top: 0 !important;
}

/* WordPress layout-flow fügt zwischen Blöcken automatisch margin-top hinzu – entfernen */
.blog-card .wp-block-post-terms,
.blog-card .wp-block-post-title,
.blog-card .wp-block-post-excerpt,
.blog-card .wp-block-read-more,
.blog-card .blog-card__category,
.blog-card .blog-card__title,
.blog-card .blog-card__excerpt,
.blog-card .blog-card__link {
  margin-top: 0 !important;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.blog-card--blue {
  border-left-color: var(--color-primary);
}

.blog-card--red {
  border-left-color: var(--color-secondary);
}

.blog-card--green {
  border-left-color: var(--color-tertiary);
}

.blog-card__category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  align-self: flex-start;
}

.blog-card__category--blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.blog-card__category--red {
  background: var(--color-secondary-light);
  color: var(--color-secondary);
}

.blog-card__category--green {
  background: var(--color-tertiary-light);
  color: var(--color-tertiary);
}

.blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-card:hover .blog-card__title a {
  color: var(--color-primary);
}

.blog-card--red:hover .blog-card__title a {
  color: var(--color-secondary);
}

.blog-card--green:hover .blog-card__title a {
  color: var(--color-tertiary);
}

.blog-card__excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.blog-card__meta {
  display: flex;
  gap: 1rem;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.blog-card__link {
  font-size: var(--text-small);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition-fast);
}

.blog-card--blue .blog-card__link { color: var(--color-primary); }
.blog-card--red .blog-card__link { color: var(--color-secondary); }
.blog-card--green .blog-card__link { color: var(--color-tertiary); }

.blog-card:hover .blog-card__link {
  gap: 0.6rem;
}

/* --- Blog Post Hero Image --- */
.blog-post-hero-image {
  max-width: 960px;
  margin: -2rem auto 0;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 1;
}

.blog-post-hero-image__img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 0;
}

.blog-post-hero-image__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* --- Blog Post Content --- */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--container-padding);
}

.blog-post p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.blog-post h2 {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-text-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.blog-post h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.blog-post ul,
.blog-post ol {
  padding-left: 1.5rem;
  margin-bottom: var(--space-md);
}

.blog-post li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.blog-post blockquote {
  border-left: 3px solid var(--accent, var(--color-primary));
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  background: var(--color-surface-light);
  border-radius: 0 8px 8px 0;
}

.blog-post blockquote p {
  font-style: italic;
  color: var(--color-text-dark);
  margin-bottom: 0;
}

.blog-post strong {
  color: var(--color-text-dark);
  font-weight: 600;
}

/* --- Post Hero Meta --- */
.post-hero__category {
  display: block;
  margin-bottom: var(--space-sm);
}

.post-hero__category a {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  /* Default: Blau */
  background: rgba(255,255,255,0.2);
  color: var(--color-text-dark);
}

/* Farbzuordnung via :has() auf dem Hero-Container */
.post-hero__category:has(a[href*="arbeitsorganisation"]) a {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.post-hero__category:has(a[href*="kommunikation"]) a {
  background: var(--color-secondary-light);
  color: var(--color-secondary);
}

.post-hero__category:has(a[href*="persoenlichkeit"]) a {
  background: var(--color-tertiary-light);
  color: var(--color-tertiary);
}

/* Fallback Farbklassen (via JS gesetzt) */
.post-hero__category--blue a {
  background: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
}

.post-hero__category--red a {
  background: var(--color-secondary-light) !important;
  color: var(--color-secondary) !important;
}

.post-hero__category--green a {
  background: var(--color-tertiary-light) !important;
  color: var(--color-tertiary) !important;
}

.post-hero__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.post-hero__separator {
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* WP Post Author innerhalb Hero */
.post-hero__author,
.post-hero__meta .wp-block-post-author {
  font-size: inherit;
  color: inherit;
}

.post-hero__meta .wp-block-post-author__name {
  font-size: inherit;
}

/* --- Author Box --- */
.author-box {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) var(--container-padding);
  border-top: 1px solid var(--color-surface-dark);
  border-bottom: 1px solid var(--color-surface-dark);
}

/* WP Post Author Block innerhalb der Author Box */
.author-box .wp-block-post-author,
.author-box .author-box__wp {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

/* Avatar */
.author-box .wp-block-post-author__avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%) contrast(1.05) brightness(1.05);
  transition: filter 0.3s ease;
  flex-shrink: 0;
}

.author-box:hover .wp-block-post-author__avatar img {
  filter: grayscale(0%) contrast(1) brightness(1);
}

/* Name */
.author-box .wp-block-post-author__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
}

/* Bio */
.author-box .wp-block-post-author__bio {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 0.25rem;
}

/* --- Related Posts --- */
.related-posts {
  padding: var(--space-2xl) 0;
  background: var(--color-surface-light);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 0;
}

/* Related Posts: gleiche max-width Overrides wie blog-grid */
.related-posts__grid,
.related-posts__grid .wp-block-query,
.related-posts__grid .wp-block-post-template,
.related-posts__grid .wp-block-post-template > li,
.related-posts__grid .wp-block-post-template > li > * {
  max-width: none !important;
  box-sizing: border-box;
}

.related-posts__grid .wp-block-query {
  grid-column: 1 / -1;
  width: 100%;
}

.related-posts__grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 2rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.related-posts__grid .wp-block-post-template > li {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
}

/* --- Responsive Blog --- */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-grid .wp-block-post-template,
  .wp-block-post-template,
  .related-posts__grid .wp-block-post-template {
    grid-template-columns: 1fr !important;
    max-width: 500px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .blog-card__content {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .blog-post-hero-image {
    margin-top: -1rem;
  }

  .blog-post-hero-image__img {
    border-radius: 12px;
  }

  .blog-post {
    padding: var(--space-xl) var(--container-padding);
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .related-posts__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ============================================
   404 ERROR PAGE
   ============================================ */
.error-page-card:hover {
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(43, 94, 158, 0.1);
}

@media (max-width: 480px) {
  .error-page-links {
    grid-template-columns: 1fr !important;
  }
}
