/**
 * Blog-Übersichten: Home TOP, /blog, Kategorien, Suche
 */

body .blog-overview-wrap,
body .blog-overview-page {
  max-width: 1320px;
  margin: 0 auto;
  padding-bottom: 1.25rem;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body .blog-page-hero {
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #2bbf6a 35%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #2bbf6a 20%, var(--theme-surface, #f4f6f8)),
    color-mix(in srgb, #2bbf6a 6%, var(--theme-bg, #fff))
  );
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08);
  text-align: center;
}

body .blog-page-hero__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #249a57;
}

body .blog-page-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--theme-text, #152033);
  letter-spacing: -0.02em;
}

body .blog-page-hero__lead {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--theme-muted, #5c6f82);
}

body .blog-overview-section-title {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: var(--theme-text, #152033);
}

body .blog-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--theme-card-border, rgba(21, 32, 51, 0.1));
  background: var(--theme-surface, #fff);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

body .blog-list-toolbar__search-wrap {
  position: relative;
}

body .blog-list-toolbar__search-wrap .bi-search {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--theme-muted, #5c6f82);
  pointer-events: none;
}

body .blog-list-toolbar__input {
  padding-left: 2.35rem;
  border-radius: 10px;
  border-color: var(--theme-card-border, rgba(21, 32, 51, 0.14));
  background: var(--theme-bg, #f8fafc);
  color: var(--theme-text, #152033);
}

body .blog-list-toolbar__select {
  min-width: 11.5rem;
  border-radius: 10px;
  border-color: var(--theme-card-border, rgba(21, 32, 51, 0.14));
  background: var(--theme-bg, #f8fafc);
  color: var(--theme-text, #152033);
}

body .blog-list-toolbar__meta {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--theme-muted, #5c6f82);
}

body .blog-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

body .blog-card-grid .blog-empty {
  grid-column: 1 / -1;
}

body .blog-card-grid--loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body .blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid var(--theme-card-border, rgba(21, 32, 51, 0.1));
  background: var(--theme-surface, #fff);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body .blog-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, #2bbf6a 35%, var(--theme-card-border, rgba(21, 32, 51, 0.1)));
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

body .blog-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: color-mix(in srgb, var(--theme-bg, #f0f2f5) 80%, transparent);
}

body .blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.35s ease;
}

body .blog-card:hover .blog-card__media img {
  transform: scale(1.02);
}

body .blog-card__top {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

body .blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 0.45rem;
  padding: 1rem 1.1rem calc(1.15rem + 5px);
  overflow: hidden;
}

body .blog-card__category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #249a57;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

body .blog-card__category:hover {
  text-decoration: underline;
}

body .blog-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body .blog-card__title a {
  color: var(--theme-text, #152033);
  text-decoration: none;
  overflow-wrap: inherit;
  word-break: inherit;
}

body .blog-card__title a:hover {
  color: #249a57;
}

body .blog-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--theme-muted, #5c6f82);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

body .blog-card__date {
  margin: 0;
  font-size: 0.75rem;
  color: var(--theme-muted, #5c6f82);
}

body .blog-card__date .bi {
  color: #2bbf6a;
  margin-right: 0.2rem;
}

body .blog-card__cta {
  align-self: flex-end;
  margin-top: 0.35rem;
  margin-bottom: 5px;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, #2bbf6a 92%, #0a1628), #1f9d55) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(43, 191, 106, 0.28);
}

/* TOP-Blogs auf der Startseite */
body .blog-top-section {
  margin-bottom: 2rem;
}

body .blog-card--featured {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 0;
}

body .blog-card--featured .blog-card__media {
  aspect-ratio: auto;
  min-height: 200px;
}

body .blog-card--featured .blog-card__media img {
  object-fit: contain;
  object-position: center center;
}

body .blog-card--featured .blog-card__body {
  padding: 1.25rem 1.5rem;
  justify-content: center;
}

body .blog-card--featured .blog-card__title {
  font-size: 1.2rem;
}

body .blog-top-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Kategorie-Chips */
body .category-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

body .category-chip {
  padding: 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--theme-card-border, rgba(21, 32, 51, 0.1));
  background: var(--theme-surface, #fff);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

body .category-chip__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--theme-text, #152033);
}

body .category-chip__count {
  margin: 0 0 0.85rem;
}

body .category-chip__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--theme-bg, #f0f2f5);
  color: var(--theme-muted, #5c6f82);
}

body .category-chip__badge--active {
  background: color-mix(in srgb, #2bbf6a 18%, #fff);
  color: #1a7a45;
}

body .category-chip__cta {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #2bbf6a 50%, transparent) !important;
  color: #249a57 !important;
  background: transparent !important;
}

body .category-chip__cta:hover {
  background: color-mix(in srgb, #2bbf6a 12%, transparent) !important;
}

/* Leer */
body .blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 28rem;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  border-radius: 14px;
  border: 1px dashed var(--theme-card-border, rgba(21, 32, 51, 0.18));
  background: var(--theme-surface, #f8f9fa);
}

body .blog-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: color-mix(in srgb, #2bbf6a 14%, #fff);
  color: #2bbf6a;
  font-size: 1.5rem;
}

body .blog-empty__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--theme-muted, #5c6f82);
}

/* Suchergebnisse */
body .search-results-page {
  max-width: 1100px;
}

body .search-results-page .blog-card-grid {
  margin-top: 1.5rem;
}

body .search-results-section {
  margin-top: 2rem;
}

body .search-results-section:first-of-type {
  margin-top: 1.25rem;
}

body .search-results-section__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-muted, #5c6f82);
  margin: 0 0 0.85rem;
}

body .search-result-chip.search-result-chip {
  min-height: 8.5rem;
}

body .search-result-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  border: 1px solid var(--theme-card-border, rgba(21, 32, 51, 0.1));
  background: var(--theme-surface, #fff);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

body .search-result-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--theme-bg, #f0f2f5);
}

body .search-result-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body .search-result-card__body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

body .search-result-card__type {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #249a57;
}

body .search-result-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--theme-text, #152033);
}

body .search-result-card__cta {
  margin-top: auto;
  align-self: flex-end;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, #2bbf6a 88%, #0a1628) !important;
  border: none !important;
  color: #fff !important;
}

@media (max-width: 1199.98px) {
  body .blog-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  body .blog-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .blog-list-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  body .blog-overview-wrap {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  body .blog-list-toolbar {
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
  }

  body .blog-card--featured {
    grid-template-columns: 1fr;
  }

  body .blog-card--featured .blog-card__media {
    min-height: clamp(200px, 52vw, 280px);
    aspect-ratio: 16 / 10;
  }

  body .blog-card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body .blog-card__cta {
    width: 100%;
    text-align: center;
  }
}

html[data-theme-mode="dark"] body.theme-enabled .blog-page-hero,
html[data-theme-mode="auto"] body.theme-enabled .blog-page-hero {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #2bbf6a 22%, var(--theme-surface)),
    color-mix(in srgb, #2bbf6a 8%, var(--theme-bg))
  ) !important;
}

html[data-theme-mode="dark"] body.theme-enabled .blog-card,
html[data-theme-mode="auto"] body.theme-enabled .blog-card,
html[data-theme-mode="dark"] body.theme-enabled .category-chip,
html[data-theme-mode="auto"] body.theme-enabled .category-chip,
html[data-theme-mode="dark"] body.theme-enabled .search-result-card,
html[data-theme-mode="auto"] body.theme-enabled .search-result-card {
  background: var(--theme-surface) !important;
  border-color: var(--theme-card-border) !important;
}
