/**
 * Blog-Detailseite (blog_details) — layout & Galerie
 */

.blog-detail-page {
  max-width: 920px;
  margin: 0 auto;
}

.blog-banner {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #2bbf6a 22%, var(--theme-surface, #151b22)),
    color-mix(in srgb, #2bbf6a 8%, var(--theme-bg, #0f1419))
  );
  color: var(--theme-text, #e8eef5);
  padding: clamp(1.5rem, 4vw, 2rem) 1.5rem;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 1.25rem;
  border: 1px solid color-mix(in srgb, #2bbf6a 35%, transparent);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
}

.blog-banner__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5ad18a;
}

.blog-banner .blog-title {
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}

.blog-detail-category-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  background: var(--theme-surface, #f8f9fa);
  border: 1px solid var(--theme-card-border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.blog-detail-category-strip .category-text {
  margin: 0;
  font-size: 1rem;
  color: var(--theme-text, #212529);
}

.blog-detail-category-strip a.category-link {
  color: #249a57;
  text-decoration: none;
  font-weight: 600;
}

.blog-detail-category-strip a.category-link:hover {
  text-decoration: underline;
}

.blog-detail-category-sep {
  color: var(--theme-muted, #6c757d);
  font-weight: 300;
}

/* —— Galerie —— */
.blog-gallery {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 14px;
}

.blog-gallery--slider {
  overflow: hidden;
}

.blog-gallery__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 200px;
  padding: 2rem 1rem;
  background: var(--theme-surface, #f0f2f5);
  border: 2px dashed var(--theme-card-border, rgba(0, 0, 0, 0.12));
  border-radius: 14px;
  color: var(--theme-muted, #6c757d);
}

.blog-gallery__placeholder i {
  font-size: 2.5rem;
  opacity: 0.65;
  color: var(--theme-accent, #0d6efd);
}

.blog-gallery__track {
  display: flex;
  gap: 0.75rem;
  transition: transform 0.45s ease;
}

.blog-gallery--single .blog-gallery__track {
  transform: none !important;
}

.blog-gallery--single .blog-gallery__slide {
  flex: 1 1 100%;
  max-width: 100%;
}

.blog-gallery--slider .blog-gallery__slide {
  flex: 0 0 calc(33.333% - 0.5rem);
  min-width: 0;
}

.blog-gallery__slide {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 0.5rem;
  border-radius: 12px;
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-card-border, rgba(0, 0, 0, 0.08));
  cursor: zoom-in;
}

.blog-gallery__slide img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.blog-gallery__slide.is-broken,
.blog-gallery__broken {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: var(--theme-muted, #6c757d);
}

.blog-gallery__broken i {
  font-size: 2rem;
  opacity: 0.5;
}

.blog-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--theme-nav-bg, #111) 75%, transparent);
  color: var(--theme-text, #fff);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.blog-gallery__nav:hover {
  background: var(--theme-accent, #0d6efd);
  color: #fff;
}

.blog-gallery__nav--prev {
  left: 0.5rem;
}

.blog-gallery__nav--next {
  right: 0.5rem;
}

@media (max-width: 768px) {
  .blog-gallery--slider {
    overflow: hidden;
    padding: 0 0.25rem;
  }

  .blog-gallery--slider .blog-gallery__track {
    gap: 0.65rem;
  }

  .blog-gallery--slider .blog-gallery__slide {
    flex: 0 0 88%;
    min-height: 0;
    padding: 0.4rem;
  }

  .blog-gallery__slide img {
    width: 100%;
    max-width: 100%;
    max-height: min(56vw, 260px);
    height: auto;
    object-fit: contain;
  }

  .blog-gallery__nav {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .blog-gallery__nav--prev {
    left: 0.15rem;
  }

  .blog-gallery__nav--next {
    right: 0.15rem;
  }
}

/* —— Inhalt —— */
.blog-detail-body {
  padding: 1.5rem 1.35rem;
  border-radius: 14px;
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-card-border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  color: var(--theme-text, #212529);
}

.blog-detail-body__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--theme-text, #212529);
  padding-bottom: 0.65rem;
  border-bottom: 2px solid color-mix(in srgb, #2bbf6a 35%, transparent);
}

.blog-detail-body__content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--theme-text, #212529);
}

.blog-detail-body__content p:last-child {
  margin-bottom: 0;
}

/* Editor-HTML: weiße Inline-Boxen im Dark Theme lesbar machen */
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content div,
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content p,
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content span,
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content td,
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content th,
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content li {
  background-color: transparent;
}

html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background-color: #fff"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background-color:#fff"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background-color: #FFF"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background: #fff"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background:#fff"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background-color: white"],
html[data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content .bg-white {
  background-color: color-mix(in srgb, var(--theme-surface) 92%, var(--theme-bg)) !important;
  color: var(--theme-text) !important;
  border: 1px solid var(--theme-card-border) !important;
  border-radius: 8px;
  padding: 0.65rem 0.9rem !important;
}

html[data-theme-skin="premium"][data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content [style*="background"],
html[data-theme-skin="premium"][data-theme-mode="dark"] body.theme-enabled .blog-detail-body__content div[style] {
  color: var(--theme-text) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-theme-mode="auto"] body.theme-enabled .blog-detail-body__content [style*="background-color: #fff"],
  html[data-theme-mode="auto"] body.theme-enabled .blog-detail-body__content [style*="background-color:#fff"],
  html[data-theme-mode="auto"] body.theme-enabled .blog-detail-body__content [style*="background: #fff"],
  html[data-theme-mode="auto"] body.theme-enabled .blog-detail-body__content .bg-white {
    background-color: color-mix(in srgb, var(--theme-surface) 92%, var(--theme-bg)) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-card-border) !important;
    border-radius: 8px;
    padding: 0.65rem 0.9rem !important;
  }
}

.blog-detail-body hr {
  margin: 1.25rem 0;
  border: none;
  border-top: 1px solid var(--theme-card-border, rgba(0, 0, 0, 0.1));
  opacity: 1;
}

.blog-meta-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  clear: both;
}

.blog-meta-container p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--theme-muted, #6c757d);
}

.blog-meta-container .blog-meta-updated {
  color: color-mix(in srgb, var(--theme-accent) 80%, var(--theme-text));
}

.blog-detail-back {
  text-align: center;
  margin-top: 1.5rem;
}

.blog-detail-back .btn-back-to-blogs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  background: transparent;
  color: var(--theme-text, #dce8f4);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--theme-card-border, rgba(255, 255, 255, 0.18));
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.blog-detail-back .btn-back-to-blogs:hover {
  background: color-mix(in srgb, #2bbf6a 12%, transparent);
  border-color: color-mix(in srgb, #2bbf6a 40%, transparent);
  color: var(--theme-text, #fff);
  transform: translateY(-1px);
}

.blog-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}

.blog-gallery-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
