/* ============================================
   FABLED ROMANCE - Custom Theme
   Dark, dramatic, magazine-style
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Cinzel:wght@400;600&family=EB+Garamond:ital,wght@0,400;1,400&display=swap');

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface2: #1c1c1c;
  --gold: #C9A96E;
  --gold-light: #e2c898;
  --gold-dark: #8a6e3e;
  --red: #8B2020;
  --text: #e8e0d0;
  --text-muted: #9a9080;
  --border: #2a2a2a;
  --border-gold: rgba(201, 169, 110, 0.3);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-light);
}

p {
  margin-bottom: 1.2em;
}

blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--surface);
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   HEADER & NAV
   ============================================ */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-gold);
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 120px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.site-nav a {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ============================================
   BLOG GRID (HOME PAGE)
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 8px 30px rgba(201, 169, 110, 0.1);
}

.post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: brightness(0.85);
  transition: filter 0.3s ease;
}

.post-card:hover .post-card-image {
  filter: brightness(1);
}

.post-card-body {
  padding: 1.5rem;
}

.post-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-family: 'Cinzel', serif;
}

.post-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--gold-light);
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  font-size: 0.7rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid var(--border-gold);
  padding: 0.2rem 0.6rem;
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: var(--border-gold);
  color: var(--gold);
}

/* ============================================
   SINGLE POST
   ============================================ */

.post-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-gold);
}

.post-header h1 {
  margin-bottom: 1rem;
}

.post-meta {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.post-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  margin-bottom: 3rem;
  filter: brightness(0.9);
}

.post-content {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.6rem;
}

.post-content h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.3rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  display: block;
}

.post-content strong {
  color: var(--gold-light);
}

.post-content em {
  color: var(--text);
  font-style: italic;
}

.post-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-gold);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */

   .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
  }
  
  .pagination a,
  .pagination span {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
  }
  
  .pagination a:hover {
    background: var(--border-gold);
    color: var(--gold-light);
  }
  
  .pagination .active {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
  }
  
  /* Hide the dots */
  .pagination li.page-item.disabled span {
    display: none;
  }
  
  .pagination ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    padding: 0;
    margin: 0;
  }
  
  .pagination li {
    list-style: none;
  }
  
  .pagination li::marker {
    display: none;
    content: '';
  }


/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--border-gold);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--gold);
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

.gold-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
}

.page-title {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 3rem;
}

.page-title h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

/* ============================================
   NOISE TEXTURE OVERLAY
   ============================================ */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.025;
  pointer-events: none;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .site-main {
    padding: 2rem 1rem;
  }
}

.site-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-gold);
  overflow: hidden;
}

.site-search input {
  background: var(--bg) !important;
  border: none;
  color: var(--text) !important;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  outline: none;
  width: 180px;
  -webkit-appearance: none;
}

.site-search input::placeholder {
  color: var(--text-muted) !important;
}

.site-search button {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-gold);
  color: var(--gold);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s ease;
}

.site-search button:hover {
  background: var(--border-gold);
}

/* ============================================
   CHARACTER GRID
   ============================================ */

   .character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
  }
  
  .character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem;
    transition: border-color 0.3s ease;
  }
  
  .character-card:hover {
    border-color: var(--border-gold);
  }
  
  .character-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: top;
    margin-bottom: 0.75rem;
    filter: brightness(0.9);
  }
  
  .character-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
  }
  
  .character-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
  }
  
  @media (max-width: 768px) {
    .character-grid {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 1rem;
    }
  
    .character-card {
      padding: 0.75rem;
    }
  
    .character-card h4 {
      font-size: 0.7rem;
    }
  
    .character-card p {
      font-size: 0.75rem;
    }
  }

  /* ============================================
   BOOK SERIES GRID
   ============================================ */

.book-series-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-gold);
}

.book-series-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
  transition: transform 0.2s ease;
}

.book-series-card:hover {
  transform: translateY(-3px);
}

.book-series-card a img {
  width: 100px;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
  display: block;
}

.book-series-card:hover a img {
  border-color: var(--gold);
}

.book-series-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
}

.book-series-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.book-link {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.3rem;
  border: 1px solid var(--border-gold);
  color: var(--gold-dark);
  text-align: center;
  transition: all 0.2s ease;
  display: block;
}

.book-link:hover {
  background: var(--border-gold);
  color: var(--gold);
}

.book-link.ebook {
  border-color: rgba(201, 169, 110, 0.4);
}

.book-link.physical {
  border-color: rgba(201, 169, 110, 0.3);
}

.book-link.audio {
  border-color: rgba(201, 169, 110, 0.2);
}

/* ============================================
   RESPONSIVE BOOK SERIES
   ============================================ */

@media (max-width: 768px) {
  .book-series-grid {
    gap: 0.75rem;
    padding: 1rem;
    justify-content: center;
  }

  .book-series-card {
    width: 80px;
  }

  .book-series-card a img {
    width: 80px;
    height: 120px;
  }

  .book-link {
    font-size: 0.55rem;
    padding: 0.2rem 0.25rem;
  }
}

/* ============================================
   TAXONOMY FILTER BAR
   ============================================ */

   .tax-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }
  
  .tax-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-gold);
    color: var(--text-muted);
    transition: all 0.2s ease;
  }
  
  .tax-btn:hover,
  .tax-btn.active {
    background: var(--border-gold);
    color: var(--gold);
    border-color: var(--gold);
  }