/* ============================================================
   MAIN — layout, components, typography
   ============================================================ */

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--sm {
  padding: .4rem .9rem;
  font-size: .85rem;
}

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */

.hero {
  position: relative;
  height: clamp(340px, 55vh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  /* extra space at bottom — parallax moves bg UP as user scrolls, so we need room below */
  top: 0;
  left: 0;
  right: 0;
  bottom: -50%;
  overflow: hidden;
  will-change: transform;
}

.hero-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-bg--gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-blue) 50%, var(--color-pink) 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15,15,40,.75) 0%,
    rgba(15,15,40,.45) 60%,
    rgba(15,15,40,.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.hero-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.hero-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.hero-subtitle {
  color: rgba(255,255,255,.85);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  margin-bottom:var(--space-md);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 0 0 auto;
  align-items: stretch;
  align-self: flex-end;
}

@media (max-width: 767px) {
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-stats {
    flex-direction: row;
    width: 100%;
  }
  .hero-stat {
    flex: 1;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn--outline-white {
  color: #fff;
  border-color: rgba(255,255,255,.7);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
}

.hero-stat {
  background: rgba(15, 15, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 14px;
  text-align: center;
  border-radius: var(--radius-sm);
  max-width: 100px;
}

.hero-stat__num {
  display: block;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero-stat__label {
  display: block;
  font-size: .75rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: .06em;
  font-weight: 600;
}


/* ----------------------------------------------------------
   Sections
   ---------------------------------------------------------- */

.home-section, .teaser {
  padding: var(--space-2xl) 0;
}

.home-section--dark {
  background: var(--surface-2);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-title {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--text);
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-primary);
}

.section-cta {
  margin-top: var(--space-xl);
  text-align: center;
}

/* ----------------------------------------------------------
   Post grid
   ---------------------------------------------------------- */

.post-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ----------------------------------------------------------
   Post card
   ---------------------------------------------------------- */

.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.post-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--surface-2);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-2), var(--border));
}

/* Mehrere Badges: Container positioniert sich absolut */
.cat-badges {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - var(--space-sm) * 2);
}

/* Einzelnes Badge — kein eigenes Positioning mehr */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* Sale-Badge: bleibt eigenständig positioniert */
.cat-badge--sale {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: #e53e3e !important;
  color: #fff;
}

.post-card-body {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.post-card-title {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: .8rem;
  color: var(--text-muted);
}

.post-card-meta time::after {
  content: '·';
  margin-left: var(--space-sm);
}

.post-card-excerpt {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  margin-top: var(--space-xs);
  background: var(--color-primary);
  color: #fff;
  transition: filter var(--transition), transform var(--transition);
}

.post-card-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Product card action buttons */
.post-card-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--space-sm);
}


/* ----------------------------------------------------------
   Archive header
   ---------------------------------------------------------- */

.archive-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.archive-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
}

.archive-description {
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ----------------------------------------------------------
   Single post
   ---------------------------------------------------------- */

.single-hero {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vh, 480px);
  overflow: hidden;
}

.single-hero picture {
  display: block;
  width: 100%;
  height: 100%;
}

.single-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* object-position comes from inline style set via focal point meta */
}

.single-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.single-header {
  margin-bottom: var(--space-xl);
}

.single-cats {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: 0;
}

.single-cats .cat-badge {
  position: static;
}

.single-title {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: .85rem;
  color: var(--text-muted);
}

.single-meta a {
  color: var(--color-primary);
}

.single-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.single-content h2,
.single-content h3,
.single-content h4 {
  margin-bottom: var(--space-md);
}

.single-content p {
  margin-bottom: var(--space-md);
}

.single-content img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.single-content ul,
.single-content ol {
  list-style: revert;
  padding-left: 1.5rem;
  margin-bottom: var(--space-md);
}

.single-content a:not(.btn) {
  color: var(--color-primary);
  text-decoration: underline;
}

.single-tags {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-list a {
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.tag-list a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Affiliate disclaimer box */
.affiliate-disclaimer {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: .88rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   Pagination
   ---------------------------------------------------------- */

.nav-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
  justify-content: center;
}

.nav-links a,
.nav-links span {
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: .9rem;
  color: var(--color-primary);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-links .current,
.nav-links a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ----------------------------------------------------------
   Single post — 2-column layout
   ---------------------------------------------------------- */

.single-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "content"
    "sidebar";
  gap: var(--space-xl);
  align-items: stretch; /* sidebar must stretch to full height for sticky to work */
  padding: var(--space-xl) 0;
}

.single-content-col {
  grid-area: content;
  align-self: start; /* content column only as tall as content */
}
.single-sidebar-col { grid-area: sidebar; }

@media (min-width: 960px) {
  .single-layout {
    grid-template-columns: 1fr 340px;
    grid-template-areas: "content sidebar";
    gap: var(--space-2xl);
  }
}

/* Sticky sidebar — visible on all breakpoints, stacked below on mobile */
.single-sidebar-col {
  order: 2; /* below content on mobile (grid doesn't use order, but flex does) */
}

.sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 960px) {
  .sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
  }
}

/* Sidebar widgets */
.sidebar-widget {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.sidebar-widget__title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* Mini rating widget */
.sidebar-rating__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-rating__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: .88rem;
}
.sidebar-rating__list li + li{
  border-top:1px solid var(--border);
  padding-top:.5rem;
}

.sidebar-rating__label {
  color: var(--text-muted);
  font-size: .8rem;
}

.sidebar-stars .ep-star { font-size: 1rem; }

.ep-star:not(.ep-star--on){
  display: none;
  
}

.sidebar-rating__price {
  color: var(--color-primary);
  font-size: .9rem;
}

/* TOC */
.toc-list {
  list-style: none;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list li {
  counter-increment: toc;
}

.toc-level-3 { padding-left: 1rem; }
.toc-level-4 { padding-left: 2rem; }

.toc-level-3 > a,
.toc-level-4 > a {
  font-size: .8rem;
  opacity: .85;
}

.toc-level-3 > a::before,
.toc-level-4 > a::before {
  content: '–';
  font-weight: 400;
}

.toc-list a {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}

.toc-list a:hover {
  background: var(--surface-2);
  color: var(--color-primary);
}

/* single-inner: remove right padding on sidebar layout */
@media (min-width: 960px) {
  .single-layout .single-inner {
    padding-right: 0;
  }
}

/* ----------------------------------------------------------
   Comments section — full-width band, slightly lighter than footer
   ---------------------------------------------------------- */

.ep-comments-section {
  width: 100%;
  /* slightly lighter than --sidebar-bg (#1E1E2E) */
  background: #252540;
  border-bottom: 1px solid rgba(0, 0, 0, .35);
  padding: var(--space-2xl) var(--space-lg);
  /* flush against footer — no margin */
  margin: 0;
}

.ep-comments-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  /* single column by default; 2-col when deco image present */
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* When deco image is present: content left, image right */
.ep-comments-inner:has(.ep-comments__deco) {
  grid-template-columns: 1fr 340px;
  grid-template-areas: "content deco";
  align-items: center;
}

/* Mobile: image above form */
@media (max-width: 900px) {
  .ep-comments-inner:has(.ep-comments__deco) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "deco"
      "content";
  }
  .ep-comments__deco {
    max-width: 240px;
    margin: 0 auto;
  }
}

/* Deco image column */
.ep-comments__deco {
  grid-area: deco;
  position: sticky;
  top: calc(var(--header-height, 72px) + var(--space-xl));
}

.ep-comments__deco img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,.5));
}

/* Content column */
.ep-comments__content {
  grid-area: content;
  max-width: 780px;
}

/* Title */
.ep-comments__title {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: var(--space-xl);
  font-family: var(--font-heading);
}

.ep-comments__count {
  color: var(--color-primary);
}

/* Comment list */
.ep-comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Nested replies */
.ep-comment-list .children {
  list-style: none;
  padding: 0;
  margin-top: var(--space-lg);
  padding-left: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  border-left: 2px solid rgba(255,255,255,.08);
}

/* Single comment */
.ep-comment__body {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
}

.ep-comment__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.ep-comment__avatar img {
  border-radius: 50%;
  width: 52px;
  height: 52px;
  object-fit: cover;
  flex-shrink: 0;
}

.ep-comment__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-comment__author,
.ep-comment__author a {
  font-weight: 700;
  color: #fff;
  font-size: .95rem;
  text-decoration: none;
}

.ep-comment__time,
.ep-comment__time a {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  text-decoration: none;
}

.ep-comment__actions {
  margin-left: auto;
}

.ep-comment__actions .comment-reply-link {
  font-size: .8rem;
  color: var(--color-primary);
  text-decoration: none;
  opacity: .8;
  transition: opacity var(--transition);
}

.ep-comment__actions .comment-reply-link:hover {
  opacity: 1;
}

.ep-comment__pending {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.ep-comment__text {
  color: rgba(255,255,255,.75);
  font-size: .92rem;
  line-height: 1.7;
}

.ep-comment__text p:last-child { margin-bottom: 0; }

.ep-comments-closed {
  color: rgba(255,255,255,.4);
  font-style: italic;
  margin-bottom: var(--space-xl);
}

/* Comment pagination */
.ep-comment-nav {
  margin-bottom: var(--space-xl);
  display: flex;
  gap: var(--space-md);
}

/* ------ Comment form ------ */
.ep-comments-section .comment-respond {
  margin-top: 0;
}
.ep-comments-section .comment-respond p{
  color:rgba(255,255,255,.5);
}

.ep-comments-section .comment-reply-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: var(--space-xl);
  font-family: var(--font-heading);
}

.ep-comments-section .comment-reply-title small {
  font-size: .75rem;
  font-family: var(--font-body);
  margin-left: var(--space-sm);
}

.ep-comments-section .comment-reply-title small a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
}

.ep-comment-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 560px) {
  .ep-comment-form__row { grid-template-columns: 1fr; }
}

.ep-comments-section .comment-form p {
  margin-bottom: var(--space-lg);
}

.ep-comments-section .comment-form label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin-bottom: 6px;
}

.ep-comments-section .comment-form .required {
  color: var(--color-primary);
}

.ep-comments-section .comment-form input[type="text"],
.ep-comments-section .comment-form input[type="email"],
.ep-comments-section .comment-form textarea {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 14px;
  font-size: .92rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), background var(--transition);
  box-sizing: border-box;
}

.ep-comments-section .comment-form input[type="text"]:focus,
.ep-comments-section .comment-form input[type="email"]:focus,
.ep-comments-section .comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255,255,255,.09);
}

.ep-comments-section .comment-form textarea {
  resize: vertical;
  min-height: 130px;
}

.ep-comments-section .form-submit {
  margin-top: var(--space-lg);
}

/* Legacy wrapper — no longer used */
.single-comments-wrap { display: none; }

.single-tags__label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

/* ----------------------------------------------------------
   site-main — default padding
   ---------------------------------------------------------- */

.site-main {
  padding: var(--space-xl) var(--space-md);
}

/* Kategorie- und Archivseiten: gleicher Kopfabstand wie single-product */
body.category .site-main,
body.tag .site-main,
body.archive .site-main {
  padding-top: calc(var(--space-xl) * 2);
}

/* ----------------------------------------------------------
   Load More button
   ---------------------------------------------------------- */

.ep-load-more-wrap {
  text-align: center;
  margin-top: var(--space-xl);
}

.ep-load-more.is-loading {
  opacity: .6;
  cursor: wait;
  pointer-events: none;
}

.ep-load-more.is-loading::after {
  content: ' …';
}

/* ----------------------------------------------------------
   404 / no-results
   ---------------------------------------------------------- */

.error-404,
.no-results {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.error-404 h1,
.no-results h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */

.site-footer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: var(--space-2xl) var(--space-md);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }
}

.footer-logo img { height: 34px; width: auto; }

.footer-tagline {
  margin-top: var(--space-sm);
  font-size: .88rem;
  color: rgba(255,255,255,.4);
  line-height: 1.5;
}

.footer-nav-title {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: var(--space-md);
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav-list a {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav-list a:hover { color: #fff; }

/* Hersteller-Logos im Footer */
.footer-brand-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}

.footer-brand-link:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
}

.footer-brand-link img {
  max-height: 28px;
  max-width: 100px;
  width: auto;
  /* invert dark logos to white for dark footer bg */
  filter: brightness(0) invert(1);
  opacity: .65;
  transition: opacity var(--transition);
}

.footer-brand-link:hover img {
  opacity: 1;
}

.footer-brand-name {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  white-space: nowrap;
}

.footer-affiliate-disclaimer {
  font-size: .8rem;
  font-style: italic;
  color: rgba(255,255,255,.3);
  line-height: 1.6;
}


/* Footer bottom bar */
.footer-bottom {
  background: #13131f;
  border-top: 1px solid rgba(255,255,255,.05);
  padding: var(--space-md);
}

.footer-bottom-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.25);
}

.footer-copy a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
}

.footer-copy a:hover { color: #fff; }

.footer-legal-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.footer-legal-nav a {
  font-size: .78rem;
  color: rgba(255,255,255,.3);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.footer-legal-nav a:hover { color: rgba(255,255,255,.7); }

.footer-legal-nav li + li::before {
  content: '·';
  color: rgba(255,255,255,.15);
  margin-right: var(--space-md);
}


/* ============================================================
   INTRO SECTION
   ============================================================ */

.ep-intro {
  padding: var(--space-2xl) var(--space-md);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.ep-intro__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 720px) {
  .ep-intro__inner {
    grid-template-columns: 1fr auto;
  }
}

.ep-intro__heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.ep-intro__body {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 640px;
  margin: 0;
}

/* Stats strip */
.ep-intro__stats {
  display: flex;
  gap: var(--space-xl);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .ep-intro__stats {
    justify-content: space-around;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
  }
}

.ep-intro__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.ep-intro__stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-heading);
  line-height: 1;
}

.ep-intro__stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

/* ============================================================
   FRONT-PAGE the_content() wrapper
   ============================================================ */

.ep-frontpage-content {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding:var(--space-2xl) 0;
}

/* Catch-all: every direct block child gets grid alignment.
   Custom full-width blocks override this below. */
.ep-frontpage-content > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
  box-sizing: border-box;
}

/* Vertical rhythm */
.ep-frontpage-content > * + * {
  margin-bottom: var(--space-md);
}

/* First block: breathing room at top */
.ep-frontpage-content > *:first-child {
  padding-top: var(--space-2xl);
}

/* Last block: breathing room at bottom */
.ep-frontpage-content > *:last-child {
  padding-bottom: var(--space-2xl);
}

/* Custom everpuzzle blocks go full viewport width — reset everything */
.ep-frontpage-content > .ep-intro,
.ep-frontpage-content > .ep-cat-slider-section,
.ep-frontpage-content > .ep-featured {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}

/* Headings get a bit of top breathing room when following text */
.ep-frontpage-content > .wp-block-heading {
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.ep-frontpage-content > .wp-block-heading strong {
  color:var(--color-primary);
  display: block;
  line-height: 28px;
}

/* Horizontal rule styled as a subtle divider */
.ep-frontpage-content > .wp-block-separator {
  border: none;
  border-top: 2px solid var(--border);
  margin-top: var(--space-xl);
  margin-bottom: 0;
  padding: 0;
}

/* Images: subtle rounded shadow */
.ep-frontpage-content > .wp-block-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Columns: no extra left/right padding (already set by > *) */
.ep-frontpage-content > .wp-block-columns {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

/* Buttons */
.ep-frontpage-content > .wp-block-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================================
   CATEGORY SLIDER
   ============================================================ */

.ep-cat-slider-section {
  padding: var(--space-2xl) 0;
  background: var(--surface-2);
}

.ep-cat-slider-header {
  /* header aligns with section-inner */
}

.ep-cat-slider-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-top:var(--space-2xl);
}

.ep-cat-slider-header__inner .section-title {
  margin-bottom: 0;
}

.ep-cat-arrows {
  display: flex;
  gap: var(--space-sm);
}

.ep-cat-prev,
.ep-cat-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.ep-cat-prev:hover,
.ep-cat-next:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.ep-cat-prev:disabled,
.ep-cat-next:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

/* Track wrapper — fade edges with pseudo-elements */
.ep-cat-track-wrap {
  position: relative;
  overflow: hidden;
}

/* Left fade */
.ep-cat-track-wrap::before,
.ep-cat-track-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 6vw, 100px);
  z-index: 2;
  pointer-events: none;
}

.ep-cat-track-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--surface-2) 0%, transparent 100%);
}

.ep-cat-track-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--surface-2) 0%, transparent 100%);
}

/* The scrollable track — aligned to max-width grid */
.ep-cat-track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  margin: 0;
  padding: var(--space-sm) var(--space-lg) var(--space-2xl);
  /* hide scrollbar */
  scrollbar-width: none;
}
.ep-cat-track::-webkit-scrollbar { display: none; }

/* On wide screens: start/end of track aligns with section-inner */
@media (min-width: 960px) {
  .ep-cat-track {
    padding-left:  calc((100vw - var(--max-width)) / 2 + var(--space-lg));
    padding-right: calc((100vw - var(--max-width)) / 2 + var(--space-lg));
  }
  /* Widen fade to cover the inset area */
  .ep-cat-track-wrap::before,
  .ep-cat-track-wrap::after {
    width: calc((100vw - var(--max-width)) / 2 + 60px);
  }
}

/* Card */
.ep-cat-card {
  scroll-snap-align: start;
  flex: 0 0 220px;
  list-style: none;
}

@media (min-width: 600px) { .ep-cat-card { flex: 0 0 240px; } }
@media (min-width: 960px) { .ep-cat-card { flex: 0 0 260px; } }

.ep-cat-card__link {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--transition);
}

.ep-cat-card__link:hover {
  transform: translateY(-4px);
}

.ep-cat-card__bg {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.ep-cat-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.ep-cat-card__link:hover .ep-cat-card__bg img {
  transform: scale(1.06);
}

.ep-cat-card__overlay {
  display: none;
}

.ep-cat-card__body {
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-cat-card__name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  font-family: var(--font-heading);
}

.ep-cat-card__count {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ============================================================
   FEATURED TEASER
   ============================================================ */

.ep-featured {
  padding: var(--space-2xl) var(--space-md);
  background: var(--surface);
}

.ep-featured__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 720px) {
  .ep-featured__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.ep-featured__img-wrap {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10;
}

.ep-featured__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.ep-featured__img-wrap:hover img {
  transform: scale(1.04);
}

.ep-featured__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.ep-featured__label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
}

.ep-featured__cat {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-primary);
  font-weight: 600;
}

.ep-featured__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  margin: 0;
}

.ep-featured__title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.ep-featured__title a:hover {
  color: var(--color-primary);
}

.ep-featured__excerpt {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   ÜBER MICH
   ============================================================ */

.ep-about {
  padding: var(--space-2xl) var(--space-md);
  background: var(--surface-2);
}

.ep-about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 720px) {
  .ep-about__inner {
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
  }
}

.ep-about__img-wrap {
  flex-shrink: 0;
}

.ep-about__img-wrap img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 10px var(--color-primary);
}

.ep-about__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.ep-about__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-primary);
}

.ep-about__heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

.ep-about__text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
  max-width: 560px;
}

/* ============================================================
   ZULETZT GELÖST
   ============================================================ */

.ep-last-solved {
  padding: var(--space-2xl) var(--space-md);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.ep-last-solved__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 720px) {
  .ep-last-solved__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.ep-last-solved__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}

.ep-last-solved__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.ep-last-solved__cat {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  transition: opacity var(--transition);
}

.ep-last-solved__cat:hover {
  opacity: .7;
}

.ep-last-solved__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  margin: 0;
}

.ep-last-solved__title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.ep-last-solved__title a:hover {
  color: var(--color-primary);
}

.ep-last-solved__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ep-last-solved__stars {
  color: #F6C90E;
  letter-spacing: 2px;
  font-size: 1rem;
}

.ep-last-solved__pieces {
  font-weight: 600;
  color: var(--color-primary);
}

.ep-last-solved__excerpt {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
  margin: var(--space-sm) 0 0;
}

.ep-last-solved__img-wrap {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

.ep-last-solved__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.ep-last-solved__img-wrap:hover img {
  transform: scale(1.04);
}

.ep-last-solved__img-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #fff;
}

/* Auch diese beiden full-width Sections aus dem fp-content-Grid herausnehmen */
.ep-frontpage-content > .ep-about,
.ep-frontpage-content > .ep-last-solved {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}


/* ============================================================
   TIMELINE PAGE
   ============================================================ */

.timeline-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) 6rem;
}

.timeline-header {
  margin-bottom: 4.5rem;
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--border);
}

.timeline-page__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.timeline-page__daterange {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3rem;
  margin-bottom: 3rem;
  letter-spacing: .02em;
}

.timeline-page__intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 100%;
}

/* ── Track & centre line ────────────────────────────────────── */

.timeline-track {
  position: relative;
  /* Compensates for the last item overflowing the collapsed negative margins */
  padding-bottom: 22rem;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border) 4%,
    var(--border) 96%,
    transparent 100%
  );
  border-radius: 2px;
  z-index: 0;
}

/* ── Individual item ────────────────────────────────────────── */

.timeline-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  /* Negative margin pulls each subsequent item up by ~half a card's height,
     creating the half-step zigzag. Cards on opposite sides never collide. */
  margin-bottom: -18rem;
  opacity: 0;
  transform: translateY(44px);
  transition: opacity .8s ease, transform .8s ease;
  pointer-events: none;
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:hover {
  z-index: 2;
}

.timeline-item--left {
  justify-content: flex-start;
  padding-right: calc(50% + 2.2rem);
}

.timeline-item--right {
  justify-content: flex-end;
  padding-left: calc(50% + 2.2rem);
}

@media (prefers-reduced-motion: reduce) {
  .timeline-item {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
}

/* ── Node dot on the centre line ────────────────────────────── */

.timeline-node {
  position: absolute;
  left: 50%;
  top: 2.6rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--node-color, var(--color-primary));
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--node-color, var(--color-primary));
}

/* ── Card ───────────────────────────────────────────────────── */

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  transition: box-shadow var(--transition), transform var(--transition);
  width: 100%;
  display: flex;
  flex-direction: column;
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ── Date header (above image) ──────────────────────────────── */

.timeline-card__date-header {
  background: #fff;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  border-left: 5px solid var(--card-color, var(--color-primary));
  display: flex;
  align-items: center;
}

.timeline-card__date {
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
}

.tcd__day {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--card-color, var(--color-primary));
}

.tcd__meta {
  display: flex;
  flex-direction: column;
  gap: .05rem;
}

.tcd__month {
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1.2;
}

.tcd__year {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .04em;
}

/* ── Image ──────────────────────────────────────────────────── */

.timeline-card__img-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.timeline-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.timeline-card__img-wrap:hover .timeline-card__img {
  transform: scale(1.04);
}

/* ── Body ───────────────────────────────────────────────────── */

.timeline-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}

/* ── Category badges ────────────────────────────────────────── */

.timeline-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.timeline-card__cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  text-decoration: none;
  transition: opacity var(--transition);
}

.timeline-card__cat:hover {
  opacity: .85;
  text-decoration: none;
}

/* ── Title ──────────────────────────────────────────────────── */

.timeline-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.timeline-card__title a {
  color: inherit;
  text-decoration: none;
}

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

/* ── Excerpt ────────────────────────────────────────────────── */

.timeline-card__excerpt {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

/* ── CTA button ─────────────────────────────────────────────── */

.timeline-card__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1.25rem;
  background: var(--card-color, var(--color-primary));
  color: #fff;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  margin-top: .4rem;
  transition: filter var(--transition), transform var(--transition);
}

.timeline-card__btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

/* ── AJAX sentinel & loading dots ───────────────────────────── */

.timeline-sentinel {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 3rem;
}

.timeline-loader {
  display: flex;
  gap: .45rem;
  align-items: center;
  opacity: 0;
  transition: opacity .3s;
}

.timeline-sentinel.is-loading .timeline-loader {
  opacity: 1;
}

.timeline-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: tl-dot 1.4s infinite ease-in-out both;
}

.timeline-loader span:nth-child(1) { animation-delay: -.32s; }
.timeline-loader span:nth-child(2) { animation-delay: -.16s; }

@keyframes tl-dot {
  0%, 80%, 100% { transform: scale(0); opacity: .3; }
  40%           { transform: scale(1); opacity: 1;   }
}

.timeline-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
}

/* ── Mobile: single column, left-aligned ────────────────────── */

@media (max-width: 760px) {
  .timeline-line {
    left: 1rem;
    transform: none;
    background: linear-gradient(to bottom, transparent, var(--border) 2%, var(--border) 98%, transparent);
  }

  .timeline-node {
    left: 1rem;
    top: 1.4rem;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
  }

  .timeline-item--left,
  .timeline-item--right {
    justify-content: flex-start;
    padding-left: 2.6rem;
    padding-right: 0;
  }

  .timeline-card {
    width: 100%;
  }

  .timeline-card__date-header {
    padding: .8rem 1rem;
  }

  .tcd__day {
    font-size: 2.2rem;
  }

  .tcd__month {
    font-size: .82rem;
  }

  .timeline-item {
    margin-bottom: 2rem;
  }


  .timeline-track {
    padding-bottom: 2rem;
  }
}

/* ============================================================
   RELATED POSTS (single post)
   ============================================================ */

.related-posts {
  padding: var(--space-2xl) 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.related-posts__title {
  font-family: var(--font-heading);
  font-weight: 800;
}

/* Force max 3 columns regardless of viewport width */
.post-grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .post-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 800px) {
  .post-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
