/* =========================================
   Single article page — Einzelbeitragsseite Redesign
   ========================================= */

/* -----------------------------------------
   1. Breadcrumb — modern style
   ----------------------------------------- */
.mh-breadcrumb {
  font-size: 13px;
  color: #888;
  padding: 15px 0;
  margin-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
  letter-spacing: 0.3px;
}

.mh-breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mh-breadcrumb a:hover {
  color: var(--km-accent);
}

.mh-breadcrumb-delimiter {
  margin: 0 12px;
  color: #ccc;
}

.mh-breadcrumb-delimiter i {
  font-size: 10px;
}

/* -----------------------------------------
   2. Title — thin grey bottom border
   ----------------------------------------- */
.single .entry-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  letter-spacing: -0.5px;
}

/* -----------------------------------------
   3. Subheading — accent badge
   ----------------------------------------- */
.single h2.mh-subheading {
  display: inline-block;
  background: var(--km-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  margin: 0 0 20px 0;
  border-radius: 3px;
  letter-spacing: 0.3px;
  box-shadow: none;
}

/* -----------------------------------------
   4. Entry meta — clean row
   ----------------------------------------- */
.single .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  margin-bottom: 30px;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  color: #666;
}

.single .entry-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single .entry-meta i {
  color: #999;
  font-size: 12px;
}

.single .entry-meta a {
  color: #666;
  text-decoration: none;
}

.single .entry-meta a:hover {
  color: var(--km-accent);
}

/* Hide "Alle" and "Allgemein" category links */
.single .entry-meta-categories a[href*="/category/alle/"],
.single .entry-meta-categories a[href*="/category/allgemein/"] {
  display: none;
}

.single .entry-meta-categories {
  font-size: 0;
}

.single .entry-meta-categories i {
  font-size: 12px;
  margin-right: 6px;
}

.single .entry-meta-categories a {
  font-size: 13px;
}

/* Comma separator between visible categories */
.single .entry-meta-categories a:not([href*="/category/alle/"]):not([href*="/category/allgemein/"])::after {
  content: ", ";
  font-size: 13px;
}

.single .entry-meta-categories a:not([href*="/category/alle/"]):not([href*="/category/allgemein/"]):last-of-type::after {
  content: "";
}

/* -----------------------------------------
   5. Hide social share & tags
   ----------------------------------------- */
.single .mh-social-bottom,
.single .mh-share-buttons,
.single .entry-tags {
  display: none;
}

/* -----------------------------------------
   6. Sidebar spacing
   ----------------------------------------- */
.single .mh-content {
  padding-right: 25px;
}

/* -----------------------------------------
   7. Related articles — custom wrapper
   ----------------------------------------- */

/* Hide built-in post navigation and related section */
.mh-post-nav-wrap,
section.mh-related-content {
  display: none;
}

/* Custom related wrapper */
.custom-related-wrapper {
  margin-top: 40px;
  clear: both;
  width: 100%;
}

.custom-related-wrapper h3.mh-section-title {
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  background-color: #f5f5f5;
  color: #000;
  border-bottom: none;
  padding: 10px 15px;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.custom-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.custom-related-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
  display: block;
}

.custom-related-title {
  margin: 0 0 5px 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.custom-related-title a {
  text-decoration: none;
  color: #333;
}

.custom-related-title a:hover {
  color: var(--km-accent);
}

.custom-related-date {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
}

/* Single-page override for related articles (more polished) */
.single .custom-related-wrapper {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.single .custom-related-wrapper h3.mh-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  background: transparent;
  padding: 0;
  margin-bottom: 25px;
  border: none;
}

.single .custom-related-thumb img {
  border-radius: 4px;
  margin-bottom: 12px;
}

.single .custom-related-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px 0;
}

.single .custom-related-title a {
  color: #333;
  text-decoration: none;
}

.single .custom-related-title a:hover {
  color: var(--km-accent);
}

.single .custom-related-date {
  font-size: 12px;
  color: #999;
}

/* -----------------------------------------
   8. Newsletter post footer
   ----------------------------------------- */
.kl-post-footer {
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 100%;
  margin: 40px 0 25px 0;
  padding: 28px 25px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-sizing: border-box;
}

.kl-post-footer * {
  box-sizing: border-box;
}

.kl-post-footer-inner {
  display: flex;
  gap: 30px;
  align-items: center;
}

.kl-post-footer-content,
.kl-post-footer-form {
  flex: 1;
  min-width: 0;
}

.kl-post-footer-headline {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.kl-post-footer-headline em {
  font-style: italic;
  color: #9a1815;
}

.kl-post-footer-subtitle {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.kl-post-footer-email {
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 10px;
}

.kl-post-footer-email:focus {
  outline: none;
  border-color: #9a1815;
  box-shadow: 0 0 0 3px rgba(154, 24, 21, 0.1);
}

.kl-post-footer-email::placeholder {
  color: #999;
}

.kl-post-footer-email._has_error {
  border-color: #e53935;
}

.kl-post-footer-btn {
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #9a1815;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.kl-post-footer-btn:hover {
  background: #7a1210;
}

.kl-post-footer-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.kl-post-footer-btn.processing {
  position: relative;
  color: transparent;
}

.kl-post-footer-btn.processing::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin: -7px 0 0 -7px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: kl-pf-spin 0.8s linear infinite;
}

@keyframes kl-pf-spin {
  to {
    transform: rotate(360deg);
  }
}

.kl-post-footer-privacy {
  font-size: 10px;
  color: #888;
  margin: 10px 0 0 0;
  line-height: 1.4;
}

.kl-post-footer-privacy a {
  color: #666;
  text-decoration: underline;
}

.kl-post-footer-error {
  background: #fff5f5;
  color: #c53030;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 11px;
  margin: 0 0 8px 0;
  display: none;
  border: 1px solid #feb2b2;
}

.kl-post-footer-error.show {
  display: block;
}

.kl-post-footer-success {
  display: none;
  text-align: center;
  padding: 10px;
}

.kl-post-footer-success.show {
  display: block;
}

.kl-post-footer-success-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
  font-size: 16px;
  color: #fff;
}

.kl-post-footer-success-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px 0;
  color: #1a1a1a;
}

.kl-post-footer-success-text {
  color: #555;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 700px) {
  .kl-post-footer {
    padding: 22px 18px;
    margin: 30px 0 15px 0;
  }

  .kl-post-footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .kl-post-footer-content,
  .kl-post-footer-form {
    width: 100%;
    max-width: 360px;
  }

  .kl-post-footer-headline {
    font-size: 20px;
  }

  .kl-post-footer-privacy {
    text-align: center;
  }
}

.single .custom-related-date i {
  display: none;
}

/* Theme's own related section (fallback) */
.single section.mh-related-content {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.single .mh-related-content-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  background: transparent;
  padding: 0;
  margin-bottom: 25px;
  border: none;
}

.single .mh-related-wrap .mh-posts-grid-title {
  font-size: 15px;
  font-weight: 600;
}

.single .mh-related-wrap .mh-posts-grid-meta {
  font-size: 12px;
  color: #999;
}

.single .mh-related-wrap .mh-posts-grid-meta i {
  display: none;
}

/* -----------------------------------------
   8. Calendar / Events overrides
   ----------------------------------------- */

/* Hide featured image on single event pages */
.tribe-events-single .tribe-events-event-image {
  display: none;
}

/* =========================================
   Responsive
   ========================================= */

/* Mobile */
@media screen and (max-width: 767px) {
  .single .entry-title {
    font-size: 26px;
  }

  .single .mh-content {
    padding-right: 0;
  }

  .single .custom-related-grid,
  .single .mh-related-wrap,
  .custom-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .single .custom-related-grid,
  .custom-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
