/*
Theme Name:  TopHistoryFacts
Theme URI:   https://tophistoryfacts.com
Author:      TopHistoryFacts
Description: A medieval-themed WordPress blog for history enthusiasts. Features category-based front page, rich single post layout with breadcrumbs, social sharing, and related posts sidebar.
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: tophistoryfacts
Tags: history, medieval, blog, sidebar, custom-colors
*/

/* ═══════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
═══════════════════════════════════════════════ */
:root {
  --parchment:      #f5e6c8;
  --parchment-dark: #e8d5a3;
  --parchment-light:#fdf3dc;
  --ink:            #1a0f00;
  --ink-light:      #3d2200;
  --gold:           #c9922a;
  --gold-bright:    #f0b840;
  --gold-dark:      #7a5118;
  --blood:          #7a1a1a;
  --blood-light:    #a02020;
  --stone:          #2a2318;
  --stone-light:    #3d3428;
  --stone-mid:      #1e1608;
  --text-body:      #2c1a00;
  --text-muted:     #6b4e2a;
  --border:         rgba(201,146,42,0.25);
  --border-strong:  rgba(201,146,42,0.5);
  --shadow-gold:    0 4px 20px rgba(201,146,42,0.2);
  --shadow-dark:    0 8px 40px rgba(0,0,0,0.4);
  --radius:         2px;
  --font-display:   'Cinzel Decorative', serif;
  --font-heading:   'Cinzel', serif;
  --font-body:      'Cormorant Garamond', serif;
  --font-ui:        'IM Fell English', serif;
  --transition:     0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--parchment-light);
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(201,146,42,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(122,26,26,0.03) 0%, transparent 50%);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blood); }
ul { list-style: none; }

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin-bottom: 1.2em; }

/* ═══════════════════════════════════════════════
   LAYOUT WRAPPERS
═══════════════════════════════════════════════ */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 5rem;
}

/* ═══════════════════════════════════════════════
   HEADER & NAVIGATION
═══════════════════════════════════════════════ */
#masthead {
  background: linear-gradient(180deg, var(--stone) 0%, var(--stone-light) 100%);
  border-bottom: 3px solid var(--gold-dark);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

#masthead::after {
  content: '';
  display: block;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold-dark) 0, var(--gold-dark) 12px,
    transparent 12px, transparent 22px
  );
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Site branding */
.site-branding { display: flex; align-items: center; gap: 0.8rem; }

.site-title a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(240,184,64,0.4);
  letter-spacing: 0.04em;
}

.site-title a:hover { color: #fff8e1; }

/* Navigation */
#site-navigation { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-menu > li > a {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--parchment-dark);
  padding: 0.5rem 1rem;
  position: relative;
  transition: color var(--transition);
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem; right: 1rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a { color: var(--gold-bright); }

.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after { transform: scaleX(1); }

/* Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--stone);
  border: 1px solid var(--gold-dark);
  border-top: 2px solid var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--parchment-dark);
}

.nav-menu .sub-menu a:hover { color: var(--gold-bright); background: rgba(201,146,42,0.08); }

/* Menu toggle mobile */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold-dark);
  color: var(--parchment);
  padding: 0.4rem 0.8rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   PAGE HERO BANNER (inner pages)
═══════════════════════════════════════════════ */
.page-banner {
  background: linear-gradient(135deg, var(--stone) 0%, var(--stone-mid) 60%, #0d0800 100%);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--gold-dark);
}

.page-banner::before {
  content: '⚜';
  position: absolute;
  font-size: 14rem;
  color: var(--gold-dark);
  opacity: 0.04;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.page-banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  color: var(--parchment);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════
   BREADCRUMBS
═══════════════════════════════════════════════ */
.breadcrumbs {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumbs li { display: flex; align-items: center; gap: 0.4rem; }

.breadcrumbs li + li::before {
  content: '›';
  color: var(--gold-dark);
  font-size: 0.9rem;
}

.breadcrumbs a { color: var(--gold-dark); }
.breadcrumbs a:hover { color: var(--blood); }
.breadcrumbs li:last-child { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   SECTION HEADERS (shared ornament style)
═══════════════════════════════════════════════ */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  white-space: nowrap;
  color: var(--ink);
}

.section-heading-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), transparent);
}

.section-heading-ornament {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Dark variant */
.section-heading.dark h2 { color: var(--parchment); }
.section-heading.dark .section-heading-line {
  background: linear-gradient(90deg, var(--gold-dark), transparent);
}

/* ═══════════════════════════════════════════════
   FRONT PAGE — CATEGORY BLOCKS
═══════════════════════════════════════════════ */
.front-page-main { padding: 3rem 0 5rem; }

.category-block {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.category-block:last-child { border-bottom: none; margin-bottom: 0; }

.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-block-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--ink);
  position: relative;
  padding-bottom: 0.5rem;
}

.category-block-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 2px;
  background: var(--gold);
}

.category-block-title .era-badge {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,146,42,0.1);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  margin-left: 0.8rem;
  vertical-align: middle;
}

.view-all-link {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  transition: all var(--transition);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.view-all-link:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* Posts row */
.category-posts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════
   POST CARD
═══════════════════════════════════════════════ */
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

/* Corner bracket decoration */
.post-card::before,
.post-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--gold);
  border-style: solid;
  z-index: 2;
  transition: width var(--transition), height var(--transition);
}

.post-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.post-card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-dark); border-color: var(--border-strong); }
.post-card:hover::before,
.post-card:hover::after { width: 22px; height: 22px; }

/* Featured image */
.post-card-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--stone-light);
}

.post-card-thumbnail img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-card-thumbnail img { transform: scale(1.07); }

/* Category tag on image */
.post-card-category {
  position: absolute;
  top: 0.8rem; left: 0.8rem;
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  padding: 0.25rem 0.6rem;
  z-index: 2;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

/* No thumbnail placeholder */
.post-card-thumbnail-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--stone) 0%, var(--stone-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gold-dark);
  opacity: 0.4;
}

/* Card body */
.post-card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-card-meta .meta-sep { color: var(--gold-dark); }

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.8rem;
  flex: 1;
  transition: color var(--transition);
}

.post-card:hover .post-card-title { color: var(--blood); }

.post-card-title a { color: inherit; }

/* Read More button */
.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 0.5rem 1.2rem;
  margin-top: auto;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-read-more::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff5a0, var(--gold-bright));
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-read-more:hover { color: var(--ink); transform: translateX(3px); }
.btn-read-more:hover::before { opacity: 1; }

.btn-read-more span { position: relative; z-index: 1; }
.btn-read-more .arrow { position: relative; z-index: 1; transition: transform var(--transition); }
.btn-read-more:hover .arrow { transform: translateX(4px); }

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar {
  position: sticky;
  top: 90px;
}

.widget {
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  overflow: hidden;
}

.widget-title-wrap {
  background: linear-gradient(135deg, var(--stone) 0%, var(--stone-light) 100%);
  padding: 0.9rem 1.3rem;
  border-bottom: 2px solid var(--gold-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--parchment);
  letter-spacing: 0.05em;
  margin: 0;
}

.widget-icon { color: var(--gold); font-size: 0.9rem; }

.widget-body { padding: 1.2rem; }

/* Sidebar post list item */
.sidebar-post-item {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.sidebar-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-item:first-child { padding-top: 0; }

.sidebar-post-thumb {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sidebar-post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.sidebar-post-item:hover .sidebar-post-thumb img { transform: scale(1.08); }

.sidebar-post-info { flex: 1; min-width: 0; }

.sidebar-post-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.3rem;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post-item:hover .sidebar-post-title { color: var(--blood); }

.sidebar-post-date {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Popular post rank number */
.sidebar-post-rank {
  width: 24px; height: 24px;
  flex-shrink: 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}

/* ═══════════════════════════════════════════════
   SINGLE POST PAGE
═══════════════════════════════════════════════ */
.single-post-wrap {
  padding: 2rem 0 5rem;
}

/* Post header */
.post-header { margin-bottom: 2.5rem; }

.post-header-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.post-cat-link {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  padding: 0.25rem 0.75rem;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: background var(--transition);
}

.post-cat-link:hover { background: var(--gold-bright); color: var(--ink); }

.post-header-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-meta-row .meta-item { display: flex; align-items: center; gap: 0.4rem; }
.post-meta-row a { color: var(--gold-dark); }
.post-meta-row a:hover { color: var(--blood); }

/* Featured image */
.post-featured-image {
  margin-bottom: 2.5rem;
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
}

.post-featured-image::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201,146,42,0.15);
  z-index: 1;
  pointer-events: none;
}

.post-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Post content — Lora for comfortable long-form reading */
.post-content {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.92;
  color: #22160a;
  max-width: 100%;
  letter-spacing: 0.012em;
  font-weight: 400;
}

/* Reading time badge */
.meta-reading-time {
  color: var(--gold-dark) !important;
  font-weight: 600;
  background: rgba(201,146,42,0.08);
  border: 1px solid var(--border);
  padding: 0.15rem 0.6rem;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.5em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}

.post-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 2em 0 0.6em;
}

.post-content p { margin-bottom: 1.4em; }

.post-content blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(201,146,42,0.05);
  padding: 1.2rem 1.5rem;
  margin: 2em 0;
  font-family: var(--font-ui);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-light);
}

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

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4em;
}

.post-content ul { list-style: none; }
.post-content ul li { position: relative; padding-left: 1.2rem; margin-bottom: 0.4em; }
.post-content ul li::before {
  content: '⚔';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.7rem;
  top: 0.3em;
}

.post-content ol { list-style: decimal; }
.post-content ol li { margin-bottom: 0.4em; }

.post-content img { border: 1px solid var(--border); margin: 1.5em auto; }
.post-content a { color: var(--blood); border-bottom: 1px solid rgba(122,26,26,0.3); }
.post-content a:hover { color: var(--blood-light); }

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.post-tags-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tag-link {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  transition: all var(--transition);
}

.tag-link:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ═══════════════════════════════════════════════
   SOCIAL SHARING
═══════════════════════════════════════════════ */
.post-sharing {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.post-sharing-title {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-sharing-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  border: 1px solid;
  transition: all var(--transition);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.share-btn.facebook { color: #1877f2; border-color: #1877f2; }
.share-btn.facebook:hover { background: #1877f2; color: #fff; }

.share-btn.twitter { color: #1da1f2; border-color: #1da1f2; }
.share-btn.twitter:hover { background: #1da1f2; color: #fff; }

.share-btn.pinterest { color: #e60023; border-color: #e60023; }
.share-btn.pinterest:hover { background: #e60023; color: #fff; }

.share-btn.reddit { color: #ff4500; border-color: #ff4500; }
.share-btn.reddit:hover { background: #ff4500; color: #fff; }

.share-btn.copy-link { color: var(--gold-dark); border-color: var(--gold-dark); }
.share-btn.copy-link:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ═══════════════════════════════════════════════
   PREV / NEXT NAVIGATION
═══════════════════════════════════════════════ */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.nav-post-link {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-post-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-post-link:hover { box-shadow: var(--shadow-gold); border-color: var(--border-strong); }
.nav-post-link:hover::after { transform: scaleX(1); }

.nav-post-link.next { align-items: flex-end; text-align: right; }
.nav-post-link.next::after { transform-origin: right; }

.nav-direction {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-post-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  transition: color var(--transition);
}

.nav-post-link:hover .nav-post-title { color: var(--blood); }

.nav-post-thumb {
  width: 100%; height: 80px;
  object-fit: cover;
  margin-top: 0.8rem;
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════
   RELATED POSTS WIDGET (sidebar)
═══════════════════════════════════════════════ */
.related-post-item {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.related-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-post-item:first-child { padding-top: 0; }

.related-post-thumb {
  width: 70px; height: 70px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.related-post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.related-post-item:hover .related-post-thumb img { transform: scale(1.1); }

.related-post-info { flex: 1; min-width: 0; }

.related-post-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.3rem;
  transition: color var(--transition);
}

.related-post-item:hover .related-post-title { color: var(--blood); }

.related-post-date {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
#colophon {
  background: linear-gradient(180deg, var(--stone) 0%, #0d0800 100%);
  border-top: 3px solid var(--gold-dark);
  padding: 4rem 0 0;
  margin-top: auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(201,146,42,0.2);
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(240,184,64,0.3);
  margin-bottom: 0.8rem;
}

.footer-tagline {
  font-family: var(--font-ui);
  font-style: italic;
  color: var(--parchment-dark);
  opacity: 0.7;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.footer-widget-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201,146,42,0.2);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--parchment-dark);
  opacity: 0.7;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a::before { content: '›'; color: var(--gold-dark); }
.footer-links a:hover { opacity: 1; color: var(--gold-bright); padding-left: 4px; }

.footer-bottom {
  padding: 1.2rem 0;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  opacity: 0.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.page-numbers {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .content-sidebar-wrap { grid-template-columns: 1fr 280px; gap: 2rem; }
  .category-posts-row { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .category-posts-row { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; gap: 2rem; }
  .menu-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--stone); flex-direction: column; gap: 0; padding: 1rem 0; border-bottom: 2px solid var(--gold-dark); }
  .nav-menu.toggled { display: flex; }
  .nav-menu > li > a { padding: 0.7rem 2rem; display: block; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .share-buttons { gap: 0.5rem; }
  .share-btn { padding: 0.5rem 0.8rem; font-size: 0.55rem; }
}

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px; overflow: hidden;
  padding: 0; position: absolute;
  width: 1px; word-wrap: normal;
}

.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ═══════════════════════════════════════════════
   FRONT PAGE HERO
═══════════════════════════════════════════════ */
.hero {
  min-height: 82vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 100px 2rem 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0d0800 0%, #1a0f05 35%, #251a0a 65%, #1a0f05 100%);
}

/* Stars */
.stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.star {
  position: absolute;
  background: var(--gold-bright);
  border-radius: 50%;
  animation: heroTwinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
}

@keyframes heroTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%       { opacity: 1;    transform: scale(1.5); }
}

/* Moon */
.moon {
  position: absolute;
  top: 11%;
  right: 14%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #f0d080 40%, #c8942a);
  box-shadow:
    0 0 40px 14px rgba(240,184,64,0.25),
    0 0 80px 28px rgba(200,148,42,0.14),
    inset -14px -10px 18px rgba(100,60,0,0.3);
  animation: moonGlow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes moonGlow {
  0%, 100% { box-shadow: 0 0 40px 14px rgba(240,184,64,0.25), 0 0 80px 28px rgba(200,148,42,0.14), inset -14px -10px 18px rgba(100,60,0,0.3); }
  50%       { box-shadow: 0 0 60px 24px rgba(240,184,64,0.4),  0 0 120px 48px rgba(200,148,42,0.24), inset -14px -10px 18px rgba(100,60,0,0.3); }
}

/* Castle */
.castle-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  opacity: 0.32;
  pointer-events: none;
}

/* Fog */
.fog {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(42,35,24,0.75) 0%, transparent 100%);
  animation: fogDrift 22s ease-in-out infinite;
  pointer-events: none;
}

.fog-2 {
  height: 110px;
  animation-delay: -11s;
  animation-duration: 28s;
  opacity: 0.5;
}

@keyframes fogDrift {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(28px); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  animation: heroFadeUp 1s 0.3s both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  height: 1px;
  width: 55px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--parchment);
  text-shadow:
    0 0 40px rgba(201,146,42,0.45),
    2px 2px 0 var(--ink),
    4px 4px 0 rgba(26,15,0,0.45);
  margin-bottom: 0.3em;
}

.hero-subtitle {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--parchment-dark);
  margin-bottom: 1.8rem;
  opacity: 0.88;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-divider-line {
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold-dark));
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  z-index: 10;
  animation: heroFadeUp 1s 1.1s both;
}

.hero-scroll-indicator span {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.hero-scroll-arrow {
  width: 18px; height: 18px;
  border-right: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  transform: rotate(45deg);
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50%       { transform: rotate(45deg) translateY(5px); opacity: 1; }
}

@media (max-width: 768px) {
  .hero { min-height: 60vh; padding: 90px 1.5rem 60px; }
  .moon { width: 65px; height: 65px; right: 8%; top: 8%; }
}
