/* ============================================================
   Zavesti — single.css  v0.5
   Loads site-wide: nav, hamburger, single post, archive, pages
   ============================================================ */

:root {
  --ochre:    #b5752a;
  --ochre-lt: #d4983e;
  --bone:     #f5f0e8;
  --parchment:#e8dfcc;
  --ash:      #2c2720;
  --charcoal: #1a1510;
  --smoke:    #6b6158;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bone);
  color: var(--ash);
  font-family: 'Spectral', Georgia, serif;
  font-weight: 300;
  line-height: 1.8;
  margin: 0;
}

/* ── NAV ────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  border-bottom: 1px solid var(--parchment);
  position: sticky;
  top: 0;
  background: var(--bone);
  z-index: 200;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  text-decoration: none;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Desktop nav — ALWAYS HIDDEN, replaced by hamburger */
.nav-links { display: none !important; }

/* ── HAMBURGER — always visible ──────────────────────────────── */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ash);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE/OVERLAY MENU ─────────────────────────────────────── */
.mobile-menu {
  display: block;
  background: var(--ash);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s ease;
  position: sticky;
  top: 60px;
  z-index: 190;
}

.mobile-menu.is-open { max-height: 700px; }

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0.8rem 3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

/* Two-column menu layout on desktop so it doesn't get too tall */
@media (min-width: 600px) {
  .mobile-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.mobile-nav-links li { list-style: none; }

.mobile-nav-links a {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.85);
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-nav-links a:hover { color: var(--ochre-lt); }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--smoke);
  border-top: 1px solid var(--parchment);
}

footer a { color: var(--smoke); text-decoration: none; }
footer a:hover { color: var(--ochre); }

/* ── GLOBAL IMAGE RESET (fix rounded corners from main.css) ──── */
/* Override any border-radius set globally by main.css */
.card-image,
.archive-card-img,
.rn-card-img,
.post-hero-img,
.sidebar-novel img,
.page-content img {
  border-radius: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════ */

.post-hero {
  position: relative;
  height: 52vh;
  min-height: 360px;
  overflow: hidden;
}

/* CSS background — not affected by img border-radius */
.post-hero-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-color: var(--parchment);
  filter: brightness(0.78) sepia(0.2);
}

.post-hero-img--fallback {
  background: linear-gradient(135deg, #3a2f24 0%, #1a1510 100%);
  filter: none;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,21,16,0.78) 25%, rgba(26,21,16,0.05) 100%);
}

.post-hero-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 3rem;
  color: var(--bone);
}

.post-hero-breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre-lt);
  margin-bottom: 0.8rem;
}

.post-hero-breadcrumb a { color: var(--ochre-lt); text-decoration: none; }
.post-hero-breadcrumb a:hover { text-decoration: underline; }

.post-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.2;
  max-width: 820px;
  margin: 0 0 0.8rem;
}

.post-hero-date { font-size: 0.78rem; letter-spacing: 0.06em; opacity: 0.65; }

/* Post body */
.post-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 3.5rem 3rem 5rem;
  align-items: start;
}

.post-content { min-width: 0; }

.post-content p  { font-size: 1.05rem; margin-bottom: 1.4rem; line-height: 1.85; }

.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--charcoal);
  margin: 2.8rem 0 1rem;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 2rem 0 0.6rem;
}

.post-content a { color: var(--ochre); text-decoration: underline; text-underline-offset: 3px; }

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
  filter: sepia(15%);
  border-radius: 0 !important;
}

.post-content blockquote {
  margin: 2.5rem 0;
  padding: 1.6rem 2rem;
  background: var(--parchment);
  border-left: 4px solid var(--ochre);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--charcoal);
}

.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.post-content li { margin-bottom: 0.4rem; font-size: 1.05rem; }
.post-content hr { border: none; border-top: 1px solid var(--parchment); margin: 2.5rem 0; }

/* ═══════════════════════════════════════════════════════════
   PAGE (page.php)
   ═══════════════════════════════════════════════════════════ */

.page-header {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 3rem 0;
}

.page-header-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
}

.page-header-label a { color: var(--ochre); text-decoration: none; }

.page-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 3rem 5rem;
  align-items: start;
}

.page-content { min-width: 0; }

.page-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 0.4rem;
}

.page-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--charcoal);
  margin: 2.5rem 0 0.8rem;
  line-height: 1.3;
}

.page-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 1.8rem 0 0.5rem;
}

.page-content p { font-size: 1.05rem; margin-bottom: 1.3rem; line-height: 1.85; }

.page-content a { color: var(--ochre); text-underline-offset: 3px; }

.page-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 0 !important;
}

/* Book cover — float left nicely */
.page-content img[src*="book"],
.page-content img[src*="cover"],
.page-content img[src*="fire"] {
  float: left;
  margin: 0.5rem 2rem 1.5rem 0;
  max-width: 200px;
  box-shadow: 4px 8px 24px rgba(0,0,0,0.18);
}

.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1.3rem; }
.page-content li { margin-bottom: 0.5rem; font-size: 1.05rem; line-height: 1.7; }
.page-content hr { border: none; border-top: 1px solid var(--parchment); margin: 2rem 0; clear: both; }

/* Amazon buy button — style any bold link that says "Buy" or "Get" */
.page-content strong a {
  display: inline-block;
  background: var(--ash);
  color: var(--bone) !important;
  text-decoration: none !important;
  padding: 0.6rem 1.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.page-content strong a:hover { background: var(--ochre); }

/* ── SIDEBAR (shared) ──────────────────────────────────────── */
.post-sidebar,
.archive-sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-novel {
  background: var(--ash);
  color: var(--bone);
  padding: 1.6rem;
  margin-bottom: 1.8rem;
}

.sidebar-novel-tag {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre-lt);
  margin-bottom: 0.6rem;
  display: block;
}

.sidebar-novel img {
  width: 100%;
  max-width: 130px;
  display: block;
  margin: 0.8rem 0;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.4);
  border-radius: 0 !important;
}

.sidebar-novel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.sidebar-novel-desc {
  font-size: 0.8rem;
  color: rgba(245,240,232,0.65);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.sidebar-novel-link {
  display: block;
  text-align: center;
  background: var(--ochre);
  color: var(--bone);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  transition: background 0.2s;
}

.sidebar-novel-link:hover { background: var(--ochre-lt); }

.sidebar-section-title {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--parchment);
}

.sidebar-cats,
ul.sidebar-cats {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-cats li { list-style: none; }

.sidebar-cats a,
.sidebar-cats li a {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--smoke);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--parchment);
  display: block;
  transition: color 0.15s;
}

.sidebar-cats a:hover,
.sidebar-cats li a:hover,
.sidebar-cats a.is-current,
.sidebar-cats li.current-menu-item a { color: var(--ochre); font-style: italic; }

/* ── READ NEXT ──────────────────────────────────────────────── */
.read-next-section {
  background: var(--parchment);
  border-top: 2px solid var(--ash);
  padding: 3rem 0;
}

.read-next-inner { max-width: 1140px; margin: 0 auto; padding: 0 3rem; }

.read-next-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 1.5rem;
  display: block;
}

.read-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.rn-card {
  text-decoration: none;
  color: inherit;
  background: var(--bone);
  border: 1px solid #d8cfbb;
  display: block;
  transition: border-color 0.2s;
}

.rn-card:hover { border-color: var(--ochre); }

.rn-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  filter: sepia(15%);
  border-radius: 0 !important;
}

.rn-card-img--fallback { background: var(--parchment); aspect-ratio: 16/9; }

.rn-card-body { padding: 1rem 1.1rem; }

.rn-card-cat {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.4rem;
}

.rn-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--charcoal);
}

/* ═══════════════════════════════════════════════════════════
   ARCHIVE PAGE
   ═══════════════════════════════════════════════════════════ */

.archive-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--charcoal) !important;
  margin: 2rem 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ash);
}

.archive-desc { color: var(--smoke); font-size: 1rem; max-width: 55ch; margin: 0 0 1.5rem; }

.archive-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 3rem 5rem;
  align-items: start;
}

.archive-posts { min-width: 0; }

.archive-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--parchment);
}

.archive-card:first-child { padding-top: 0; }
.archive-card-image { display: block; flex-shrink: 0; }

.archive-card-img {
  width: 160px;
  height: 108px;
  object-fit: cover;
  display: block;
  filter: sepia(15%);
  border-radius: 0 !important;
}

.archive-card-cat a {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ochre);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
}

.archive-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.archive-card-title a { color: var(--charcoal); text-decoration: none; transition: color 0.2s; }
.archive-card-title a:hover { color: var(--ochre); }

.archive-card-excerpt { font-size: 0.9rem; color: var(--smoke); line-height: 1.65; margin-bottom: 0.5rem; }
.archive-card-date { font-size: 0.72rem; color: var(--smoke); opacity: 0.7; }
.archive-empty { color: var(--smoke); font-style: italic; padding: 2rem 0; }

.archive-pagination { padding: 2rem 0; }

.archive-pagination .nav-links { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }

.archive-pagination .page-numbers {
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--parchment);
  text-decoration: none;
  color: var(--smoke);
  transition: all 0.2s;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current { background: var(--ash); color: var(--bone); border-color: var(--ash); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .site-nav { padding: 1.1rem 1.6rem; }
  .mobile-nav-links { padding: 0.8rem 1.6rem 1.5rem; grid-template-columns: 1fr; }

  .post-hero-meta { padding: 1.5rem 1.6rem; }

  .post-body,
  .page-body,
  .archive-body { grid-template-columns: 1fr; padding: 2.5rem 1.6rem 4rem; gap: 3rem; }

  .post-sidebar,
  .archive-sidebar { position: static; }

  .archive-header { padding: 2rem 1.6rem 1.5rem; }
  .archive-card { grid-template-columns: 120px 1fr; }
  .archive-card-img { width: 120px; height: 84px; }

  .read-next-inner { padding: 0 1.6rem; }
  .read-next-grid { grid-template-columns: 1fr; }

  .page-content img[src*="book"],
  .page-content img[src*="cover"],
  .page-content img[src*="fire"] { float: none; max-width: 180px; margin: 1rem auto; }

  footer { padding: 2rem 1.6rem; flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 520px) {
  .archive-card { grid-template-columns: 1fr; }
  .archive-card-image { display: none; }
}
