/* ============================================================
   NOVUS THEME — blog.css
   home.php · archive.php · single.php
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   SHARED — Used across all blog pages
   ══════════════════════════════════════════════════════════════ */
/* ── Hero: Archive ──────────────────────────────────────────── */
.blog-hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: var(--ink);
  border-bottom: 1px solid rgba(184,151,90,0.2);
}

.blog-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.blog-hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.archive-desc {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 540px;
  margin: 0.75rem auto 0;
  text-align: center;
}

/* ── Section Tag ────────────────────────────────────────────── */
.section-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ── Post Category Badge ────────────────────────────────────── */
.post-cat {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(45,10,78,0.75);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

/* ── Post Meta ──────────────────────────────────────────────── */
.post-meta {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--muted);
  flex-wrap: wrap;
}

.meta-dot {
  color: var(--gold-light);
}

/* ── Post Title ─────────────────────────────────────────────── */
.post-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.post-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.post-title a:hover {
  color: var(--gold);
}

/* ── Post Excerpt ───────────────────────────────────────────── */
.post-excerpt {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ── Sidebar Post Item (home.php + single.php sidebar) ──────── */
.sp-img {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 1;
}

.sp-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.sp-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 5px;
}

.sp-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.sp-title a:hover {
  color: var(--gold);
}

.sp-date {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Pagination ─────────────────────────────────────────────── */
.blog-pagination {
  text-align: center;
  padding: 1rem 2rem 4rem;
}

.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-pagination .page-numbers {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  color: var(--violet);
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.blog-pagination .page-numbers.dots {
  border: none;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   HOME.PHP — Blog Index
   ══════════════════════════════════════════════════════════════ */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  align-items: start;
}

/* ── Featured Post ──────────────────────────────────────────── */
.featured-post {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.featured-post .post-img {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  margin-bottom: 0.5rem;
}

.featured-post .post-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.featured-post:hover .post-img-bg {
  transform: scale(1.03);
}

.featured-post .post-img-1 {
  background: linear-gradient(135deg, var(--violet), var(--gold));
}

.featured-post .post-cat {
  align-self: flex-start;
  margin-top: -0.5rem;
}

.featured-post .post-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.3;
  margin: 0;
}

.featured-post .post-excerpt {
  font-size: 0.95rem;
  max-width: 600px;
}

/* ── Blog Sidebar Recent Posts ──────────────────────────────── */
.blog-sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-sidebar-posts .sidebar-post {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(228,221,211,0.6);
}

.blog-sidebar-posts .sidebar-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-sidebar-posts .sidebar-post:hover .sp-img-bg {
  transform: scale(1.05);
}

/* Fallback gradients */
.sp-img-1 { background: linear-gradient(135deg, #4a3f5c, #b8975a); }
.sp-img-2 { background: linear-gradient(135deg, #2c1654, #7b5ea7); }
.sp-img-3 { background: linear-gradient(135deg, #b8975a, #d4b483); }
.sp-img-4 { background: linear-gradient(135deg, #1a1a2e, #4a3f5c); }

/* ══════════════════════════════════════════════════════════════
   ARCHIVE.PHP — Category / Tag / Author
   ══════════════════════════════════════════════════════════════ */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.archive-card {
  display: flex;
  flex-direction: column;
}

.archive-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
}

.archive-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.archive-card:hover .archive-img-bg {
  transform: scale(1.04);
}

.archive-img-fallback {
  background: linear-gradient(135deg, var(--violet), var(--gold));
}

.archive-card-img .post-cat {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.archive-card-body {
  padding: 1.25rem 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.archive-card-body .post-title { font-size: 1.15rem; }
.archive-card-body .post-excerpt { flex: 1; }
.archive-card-body .post-meta { margin-bottom: 0.85rem; }

.archive-read-more {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.archive-read-more:hover {
  border-color: var(--gold);
}

.archive-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--muted);
}

.archive-empty .archive-read-more {
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   SINGLE.PHP — Individual Blog Post
   ══════════════════════════════════════════════════════════════ */

/* ── Reading Progress Bar ───────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  /* background: linear-gradient(to right, var(--gold), var(--gold-light)); */
  background: var(--plum);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Article Wrapper ────────────────────────────────────────── */
.single-post {
  background: var(--white);
  min-height: 60vh;
}

/* ── Post Hero ──────────────────────────────────────────────── */
.post-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 8;
  overflow: hidden;
  background: var(--ink);
}

.post-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.65;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(
    to top,
    rgba(26,26,46,0.92) 0%,
    rgba(26,26,46,0.4) 50%,
    transparent 100%
  );
}

.post-hero-inner {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-hero-inner .post-cat {
  align-self: flex-start;
  background: rgba(184,151,90,0.8);
}

.post-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: 0.03em;
  margin: 0;
}

.post-hero-inner .post-meta {
  color: rgba(255,255,255,0.65);
  align-items: center;
}

.post-hero-inner .meta-dot {
  color: var(--gold-light);
}

/* ── Post Layout Grid ───────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  align-items: start;
}

/* ── Post Content Wrap (left) ───────────────────────────────── */
.post-content-wrap {
  min-width: 0;
}

/* ── Post Content Typography ────────────────────────────────── */
.post-content {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.post-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 400;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.75rem 0 0.6rem;
}

.post-content p {
  margin: 0 0 1.4rem;
}

.post-content a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(184,151,90,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.post-content a:hover {
  text-decoration-color: var(--gold);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 2rem auto;
}

.post-content figure { margin: 2rem 0; }

.post-content figcaption {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.06em;
  margin-top: 0.6rem;
}

.post-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--gold-pale);
  border-radius: 0 4px 4px 0;
}

.post-content blockquote p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

.post-content blockquote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.75rem;
  font-style: normal;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.post-content ul li::marker { color: var(--gold); }
.post-content ol li::marker { color: var(--gold); font-family: var(--font-serif); }

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
  position: relative;
}

.post-content hr::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 0 12px;
  color: var(--gold);
  font-size: 0.7rem;
}

.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--gold-pale);
  color: var(--violet);
  padding: 2px 6px;
  border-radius: 3px;
}

.post-content pre {
  background: var(--ink);
  color: var(--gold-light);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 1.5rem 0;
}

/* ── Post Tags ──────────────────────────────────────────────── */
.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  border: 1px solid var(--gold-light);
  padding: 5px 14px;
  border-radius: 100px;
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

/* ── Post Share ─────────────────────────────────────────────── */
.post-share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-wrap: wrap;
}

.share-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.share-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}

/* ── Prev / Next Navigation ─────────────────────────────────── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.post-nav-item:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.post-nav-next { text-align: right; }

.post-nav-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-nav-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.post-nav-title:hover { color: var(--gold); }

/* ── Post Sidebar (right column) ────────────────────────────── */
.post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Author Box ─────────────────────────────────────────────── */
.sidebar-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
}

.author-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-pale);
  display: block;
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
}

.author-bio {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Sidebar Section (More in Category) ─────────────────────── */
.sidebar-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
}

.sidebar-heading {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.sidebar-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--gold);
}

.sidebar-section .sidebar-post {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(228,221,211,0.6);
}

.sidebar-section .sidebar-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.sidebar-section .sp-img {
  width: 64px;
  height: 64px;
  aspect-ratio: unset;
}

.sidebar-section .sidebar-post:hover .sp-img-bg {
  transform: scale(1.06);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — ALL BLOG PAGES
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .post-hero {
    aspect-ratio: 16 / 7;
  }

  .post-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 2rem;
  }

  .post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* ── Mobile (≤ 768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-hero,
  .blog-hero {
    padding: 60px 20px 40px;
  }

  .blog-grid,
  .archive-grid {
    padding: 2rem 1rem;
    gap: 1.5rem;
  }

  .blog-sidebar-posts .sidebar-post {
    grid-template-columns: 64px 1fr;
  }

  .post-hero {
    aspect-ratio: 4 / 3;
  }

  .post-hero-inner {
    padding: 2rem 1.25rem;
  }

  .post-hero-title {
    font-size: 1.6rem;
  }

  .post-layout {
    padding: 2rem 1.25rem;
    gap: 2rem;
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }

  .post-nav {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .post-nav-next {
    text-align: left;
  }

  .post-share {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ── Small Mobile (≤ 480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .featured-post .post-title {
    font-size: 1.4rem;
  }

  .blog-pagination .page-numbers {
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
  }

  .post-hero {
    aspect-ratio: 1 / 1;
  }

  .post-hero-title {
    font-size: 1.35rem;
  }

  .post-layout {
    padding: 1.5rem 1rem;
  }

  .post-content {
    font-size: 0.95rem;
  }

  .post-content blockquote p {
    font-size: 1.05rem;
  }

  .share-links {
    gap: 6px;
  }

  .share-btn {
    font-size: 0.65rem;
    padding: 6px 12px;
  }

  .post-tag {
    font-size: 0.65rem;
    padding: 4px 10px;
  }
}
