/* ============================================================
   KM2 — Blog & Post styles
   Depends on: css/style.css (design tokens)
   ============================================================ */

/* ── BLOG PAGE BODY ────────────────────────────────────────── */
.blog-page {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ── BLOG HEADER ───────────────────────────────────────────── */
.blog-header {
  padding: calc(var(--nav-h) + var(--s16)) 0 var(--s12);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--gold-border);
  text-align: center;
}

.blog-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--t-base);
}

.blog-back svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base);
}

.blog-back:hover {
  color: var(--gold-main);
}

.blog-back:hover svg {
  transform: translateX(-4px);
}

.blog-header .section-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-main);
}

.blog-header__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 200;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* ── TIMELINE ──────────────────────────────────────────────── */
.blog-timeline {
  padding: var(--s16) 0 var(--s24);
}

.blog-timeline .container {
  position: relative;
  max-width: 920px;
}

/* Vertical line */
.blog-timeline .container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--gold-border) 8%,
    var(--gold-border) 92%,
    transparent
  );
}

/* ── TIMELINE ITEM ─────────────────────────────────────────── */
.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s8);
  margin-bottom: var(--s16);
  position: relative;
  padding-left: 0;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* ── TIMELINE MARKER ───────────────────────────────────────── */
.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: var(--s8);
  padding-top: var(--s3);
  position: relative;
}

.timeline-dot {
  position: absolute;
  right: calc(var(--s8) - 5px);
  top: var(--s4);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-main);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--gold-border), var(--shadow-gold);
  z-index: 1;
}

.timeline-date {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold-main);
  letter-spacing: 0.06em;
  text-align: right;
  line-height: 1.4;
  padding-right: var(--s6);
}

/* ── TIMELINE CARD ─────────────────────────────────────────── */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}

.timeline-card:hover {
  border-color: var(--gold-border-strong);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.timeline-card__photo-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

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

.timeline-card:hover .timeline-card__photo {
  transform: scale(1.04);
}

.timeline-card__photo-count {
  position: absolute;
  bottom: var(--s3);
  right: var(--s3);
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 4px var(--s2);
  background: rgba(13,13,13,0.82);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.timeline-card__photo-count svg {
  width: 12px;
  height: 12px;
  stroke: var(--gold-main);
}

.timeline-card__body {
  padding: var(--s6) var(--s8);
}

.timeline-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.timeline-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: var(--s3);
}

.timeline-card__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--t-base);
}

.timeline-card__title a:hover {
  color: var(--gold-light);
}

.timeline-card__excerpt {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s5);
}

.timeline-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-main);
  text-decoration: none;
  transition: gap var(--t-base), color var(--t-base);
}

.timeline-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base);
}

.timeline-card__link:hover {
  color: var(--gold-light);
  gap: var(--s3);
}

.timeline-card__link:hover svg {
  transform: translateX(4px);
}

/* Tag shared */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px var(--s3);
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gold-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── POST HERO ─────────────────────────────────────────────── */
.post-hero {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 320px;
  max-height: 600px;
  overflow: hidden;
}

.post-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,13,13,0.35) 0%,
    rgba(13,13,13,0.05) 50%,
    rgba(13,13,13,0.80) 100%
  );
}

/* ── POST MAIN ─────────────────────────────────────────────── */
.post-main {
  padding: var(--s12) 0 var(--s24);
}

.post-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* ── BREADCRUMB ────────────────────────────────────────────── */
.post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s8);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t-base);
}

.post-breadcrumb a:hover {
  color: var(--gold-main);
}

.post-breadcrumb span[aria-hidden] {
  color: var(--text-muted);
}

/* ── POST HEADER ───────────────────────────────────────────── */
.post-header {
  margin-bottom: var(--s10);
  padding-bottom: var(--s8);
  border-bottom: 1px solid var(--gold-border);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.post-meta__date {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold-main);
  letter-spacing: 0.06em;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* ── POST BODY ─────────────────────────────────────────────── */
.post-body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--s12);
}

.post-body p {
  margin-bottom: var(--s5);
}

.post-body p:last-child {
  margin-bottom: 0;
}

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

.post-body em {
  color: var(--gold-light);
  font-style: italic;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin: var(--s8) 0 var(--s4);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin: var(--s6) 0 var(--s3);
}

.post-body ul, .post-body ol {
  padding-left: var(--s6);
  margin-bottom: var(--s5);
}

.post-body li {
  margin-bottom: var(--s2);
}

.post-body a {
  color: var(--gold-main);
  text-decoration: underline;
  text-decoration-color: var(--gold-border);
  transition: color var(--t-base);
}

.post-body a:hover {
  color: var(--gold-light);
}

/* ── POST GALLERY ──────────────────────────────────────────── */
.post-gallery {
  margin-bottom: var(--s12);
}

.post-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s3);
}

.post-gallery__item {
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
}

.post-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
  cursor: pointer;
}

.post-gallery__item:hover .post-gallery__img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* ── POST CTA ──────────────────────────────────────────────── */
.post-cta {
  margin: var(--s12) 0;
  padding: var(--s10) var(--s8);
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--gold-subtle) 0%, transparent 70%);
  pointer-events: none;
}

.post-cta p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: var(--s6);
}

/* ── POST BACK LINK ────────────────────────────────────────── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  margin-top: var(--s6);
  transition: color var(--t-base);
}

.post-back svg {
  width: 18px;
  height: 18px;
  transition: transform var(--t-base);
}

.post-back:hover {
  color: var(--gold-main);
}

.post-back:hover svg {
  transform: translateX(-5px);
}

/* ── NEWS TEASER ON INDEX ──────────────────────────────────── */
.news-teaser {
  padding: var(--s24) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--gold-border);
}

.news-teaser__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--s10);
  flex-wrap: wrap;
  gap: var(--s4);
}

.news-teaser__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 200;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.news-teaser__all {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-main);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-base), gap var(--t-base);
}

.news-teaser__all svg {
  width: 15px;
  height: 15px;
  transition: transform var(--t-base);
}

.news-teaser__all:hover {
  color: var(--gold-light);
  gap: var(--s3);
}

.news-teaser__all:hover svg {
  transform: translateX(4px);
}

.news-teaser__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s6);
}

/* Reuse timeline-card styles for teaser cards */
.news-teaser .timeline-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-teaser .timeline-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-teaser .timeline-card__excerpt {
  flex: 1;
}

/* ── SCROLL ANIMATION ──────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .blog-timeline .container::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--s3);
    margin-bottom: var(--s10);
  }

  .timeline-marker {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: var(--s3);
  }

  .timeline-dot {
    position: static;
    flex-shrink: 0;
  }

  .timeline-date {
    text-align: left;
    padding: 0;
  }

  .timeline-card__body {
    padding: var(--s5) var(--s5);
  }

  .post-wrap {
    padding: 0 var(--s4);
  }

  .post-hero {
    height: 40vh;
  }

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

  .post-cta {
    padding: var(--s8) var(--s5);
  }

  .news-teaser__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .blog-header {
    padding: calc(var(--nav-h) + var(--s10)) 0 var(--s8);
  }

  .post-gallery__grid {
    grid-template-columns: 1fr;
  }

  .timeline-card__photo-wrap {
    aspect-ratio: 16/9;
  }
}
