﻿/* Ported as-is from design/latest-posts-section.html. Only the
   redundant/harmful `body {...}` line is dropped (it would override this
   theme's own body background set in style.css)  see the note at the
   top of assets/css/featured-collections.css for the full reasoning. */
* { box-sizing: border-box; }

/* =================================================================
   LATEST POSTS
   ================================================================= */
.posts-section {
  position: relative;
  background: linear-gradient(175deg, #100d09 0%, #0a0908 55%, #0a0908 100%);
  padding: 88px 0 100px;
}
.posts-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,54,0.5), transparent);
}

.posts-title {
  text-align: center;
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: 1px;
  color: #f3efe7;
  margin: 0 0 56px;
}
.posts-title .accent {
  position: relative;
  color: #e8dcc0;
}
.posts-title .accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: #C9A236;
}

.posts-viewport-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 72px;
}

.posts-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: var(--fm-radius-md);
  border: 1px solid rgba(232,220,192,0.4);
  background: rgba(10,9,8,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.posts-nav svg { width: 15px; height: 15px; stroke: #C9A236; fill: none; stroke-width: 1.5; }
.posts-nav:hover { background: #000000; border-color: #000000; }
.posts-nav:hover svg { stroke: #ffffff; }
.posts-nav.prev { left: 16px; }
.posts-nav.next { right: 16px; }

.posts-track {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.posts-track::-webkit-scrollbar { display: none; }

.post-card {
  position: relative;
  flex: 0 0 calc((100% - 52px) / 3);
  scroll-snap-align: start;
  background: linear-gradient(175deg, #16130e 0%, #0d0b08 100%);
  border: 1px solid rgba(201,162,54,0.16);
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.post-card:hover {
  border-color: rgba(201,162,54,0.5);
  transform: translateY(-6px);
  box-shadow: 0 26px 40px rgba(0,0,0,0.4);
}

.post-media {
  position: relative;
  height: 210px;
  background: linear-gradient(150deg, #2a251c 0%, #3a2f1f 45%, #4a3a22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-media svg { width: 40px; height: 40px; stroke: rgba(233,221,196,0.6); fill: none; stroke-width: 1.1; }
/* Real featured image (assets/js/latest-posts.js) when the post has one
   falls back to the decorative icon above when it doesn't, same as every
   product card's own image/fallback-icon split. */
.post-media img { width: 100%; height: 100%; object-fit: cover; }

.post-date {
  position: absolute;
  top: 14px; left: 14px;
  width: 46px;
  padding: 7px 0;
  background: rgba(10,9,8,0.8);
  border: 1px solid rgba(201,162,54,0.5);
  text-align: center;
  font-family: 'Jost', sans-serif;
  color: #f3efe7;
}
.post-date .day { display: block; font-size: 16px; font-weight: 600; line-height: 1.1; }
.post-date .month { display: block; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: #C9A236; }

.post-body { padding: 22px 22px 24px; }
.post-cat {
  font-family: 'Jost', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8a8074;
  margin-bottom: 10px;
}
.post-title {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #f3efe7;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color 0.25s ease;
}
.post-title:hover { color: #e8dcc0; }
.post-excerpt {
  font-family: 'Jost', sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: #a79d90;
  margin-bottom: 16px;
}
.post-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #C9A236;
  text-decoration: none;
  transition: color 0.25s ease;
}
.post-more .arrow { transition: transform 0.3s ease; }
.post-more:hover { color: #e8dcc0; }
.post-more:hover .arrow { transform: translateX(4px); }

.posts-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 40px;
}
.posts-dot {
  width: 7px; height: 7px;
  border-radius: var(--fm-radius-circle);
  border: 1px solid rgba(201,162,54,0.5);
  background: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.posts-dot.is-active { background: #C9A236; transform: scale(1.2); }

@media (max-width: 980px) {
  .post-card { flex: 0 0 calc((100% - 26px) / 2); }
}
@media (max-width: 640px) {
  .posts-section { padding: 64px 0 76px; }
  .posts-viewport-wrap { padding: 0 20px; }
  .post-card { flex: 0 0 82%; }
  .posts-nav { display: none; }
}

/* =========================================================
   LIGHT THEME  literal hex, same situation as featured-collections.css's
   own light-theme block. Last of the home page's alternating sections
   (FFFFFF), right before the footer. .post-media's own dark placeholder
   gradient + fallback icon are left as-is  see gifts-for-love.css's
   light-theme comment on why photo placeholders don't flip.
   ========================================================= */
html[data-theme="light"] .posts-section { background: #F5EDE6; }
html[data-theme="light"] .posts-title { color: #000000; }
html[data-theme="light"] .posts-title .accent { color: #C9A236; }
html[data-theme="light"] .posts-nav { border-color: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.04); }
html[data-theme="light"] .posts-nav svg { stroke: #000000; }
html[data-theme="light"] .posts-nav:hover { background: #000000; border-color: #000000; }
html[data-theme="light"] .posts-nav:hover svg { stroke: #ffffff; }
html[data-theme="light"] .post-card { background: #ffffff; border-color: rgba(201,162,54,0.3); }
html[data-theme="light"] .post-card:hover { box-shadow: 0 20px 32px rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .post-cat { color: #656565; }
html[data-theme="light"] .post-title { color: #000000; }
html[data-theme="light"] .post-title:hover { color: #C9A236; }
html[data-theme="light"] .post-excerpt { color: #515151; }
html[data-theme="light"] .post-more:hover { color: #C9A236; }
