/* ==========================================================================
   Audio Bacon — Magazine Theme (Astro)
   Faithful recreation of the original audiobacon.net WordPress design
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,400&family=Merriweather+Sans:wght@300;400;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand colors */
  --color-primary: #821e21;
  --color-primary-dark: #6a1819;
  --color-body-bg: #1a1a1a;
  --color-content-bg: #2d2d2d;
  --color-text: #e0e0e0;
  --color-text-light: #aaaaaa;
  --color-heading: #f0f0f0;
  --color-border: #444444;
  --color-card-bg: #383838;

  /* Nav */
  --color-nav-bg: #821e21;
  --color-nav-text: rgba(255, 255, 255, 0.6);
  --color-nav-active: #ffffff;
  --color-nav-dropdown-bg: #232323;
  --color-nav-dropdown-text: rgba(255, 255, 255, 0.6);

  /* Section header colors */
  --color-section-news: #822527;
  --color-section-shows: #4e97ce;
  --color-section-popular: #e5b940;

  /* Category colors */
  --color-cat-reviews: #5496d3;
  --color-cat-headphones: #8e6ecf;
  --color-cat-cables: #5496d3;
  --color-cat-source: #54d0e2;
  --color-cat-amplifiers: #8e6ecf;
  --color-cat-speakers: #7ac8cc;
  --color-cat-shows: #7464f2;
  --color-cat-news: #7ac8cc;
  --color-cat-music: #6dd69c;
  --color-cat-dacs: #8e6ecf;
  --color-cat-networking: #54d0e2;
  --color-cat-software: #e4751b;
  --color-cat-power: #c1d51c;
  --color-cat-other: #888888;
  --color-cat-education: #5496d3;

  /* Widget & UI */
  --color-widget-title-bg: #821e21;
  --color-newsletter-btn: #C97020;
  --color-footer-bg: #111111;

  /* Typography */
  --font-body: 'Merriweather', Georgia, serif;
  --font-heading: 'Merriweather Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --max-width: 1280px;
  --sidebar-width: 25%;
  --nav-height: 80px;
  --logo-height: 60px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-body-bg);
}

a {
  color: #d4a574;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e8939f;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-heading);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-area,
.home-content {
  animation: fadeInUp 0.4s ease both;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-content {
  background: var(--color-content-bg);
}

.site-content > .container {
  display: flex;
  gap: 30px;
  padding-top: 30px;
  padding-bottom: 40px;
}

.content-area {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.home-content {
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: var(--color-nav-bg);
  position: relative;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: var(--logo-height);
  max-height: 60px;
  width: auto;
  display: block;
}

/* Ad slot below header */
.ad-slot-header {
  background: var(--color-body-bg);
  text-align: center;
  padding: 10px 0;
}

/* ---------- Navigation ---------- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.main-nav > a,
.nav-dropdown > a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-nav-text);
  padding: 0 14px;
  line-height: var(--nav-height);
  display: block;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown > a:hover,
.nav-dropdown > a.active {
  color: var(--color-nav-active);
  background: rgba(0, 0, 0, 0.15);
}

.dropdown-chevron {
  display: inline-block;
  vertical-align: middle;
  margin-left: 3px;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-nav-dropdown-bg);
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-nav-dropdown-text);
  line-height: 1.4;
  transition: color 0.2s ease, background 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Sub-submenu (two-level dropdown) */
.dropdown-menu .has-submenu {
  position: relative;
}

.dropdown-menu .has-submenu > a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-nav-dropdown-text);
  line-height: 1.4;
  transition: color 0.2s ease, background 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-menu .has-submenu > a::after {
  content: '\203A';
  float: right;
  margin-left: 8px;
}

.dropdown-menu .has-submenu > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-menu .submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--color-nav-dropdown-bg);
  min-width: 180px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1002;
}

.dropdown-menu .submenu a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-nav-dropdown-text);
  line-height: 1.4;
  transition: color 0.2s ease, background 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-menu .submenu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-menu .has-submenu:hover > .submenu {
  display: block;
}

.nav-search-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--color-nav-text);
  font-size: 16px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-search-toggle:hover {
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-nav-active);
  font-size: 26px;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
}

.mobile-menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-nav-active);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Social top bar */



.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0;
  line-height: 1;
}

.social-icon:hover {
  opacity: 0.85;
  transform: scale(1.1);
  color: #fff;
}

.social-icon-facebook { background: #3b5998; }
.social-icon-twitter { background: #1da1f2; }
.social-icon-instagram { background: #e4405f; }
.social-icon-youtube { background: #ff0000; }
.social-icon-pinterest { background: #bd081c; }

/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-overlay-inner {
  width: 90%;
  max-width: 700px;
  text-align: center;
}

.search-overlay h3 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.search-overlay-form {
  display: flex;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.search-overlay-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  font-family: var(--font-heading);
  padding: 15px 0;
  outline: none;
}

.search-overlay-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-overlay-form button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 15px;
}

.search-overlay-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.search-overlay-close:hover {
  opacity: 1;
}

/* ==========================================================================
   HOMEPAGE
   ========================================================================== */

/* Featured Hero */
.featured-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: 0;
  max-height: 520px;
}

.featured-hero a {
  display: block;
  position: relative;
}

.featured-hero img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.featured-hero a:hover img {
  transform: scale(1.02);
}

.featured-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.featured-hero-overlay .category-badge {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  border-radius: 3px;
  margin-bottom: 12px;
}

.featured-hero-overlay h2 {
  color: #fff;
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.featured-hero-overlay h2 a {
  color: #fff;
}

.featured-hero-overlay h2 a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.featured-hero-overlay time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* Homepage section */
.home-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 0;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  padding: 10px 18px;
  margin: 0;
  white-space: nowrap;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 3px;
  background: var(--color-border);
}

.section-header a {
  color: #fff;
}

/* Colored section headers */
.section-header--news h2 { background: var(--color-section-news); }
.section-header--shows h2 { background: var(--color-section-shows); }
.section-header--popular h2 { background: var(--color-section-popular); }
.section-header--reviews h2 { background: var(--color-cat-reviews); }
.section-header--speakers h2 { background: var(--color-cat-speakers); }
.section-header--headphones h2 { background: var(--color-cat-headphones); }
.section-header--amplifiers h2 { background: var(--color-cat-amplifiers); }
.section-header--cables h2 { background: var(--color-cat-cables); }
.section-header--source h2 { background: var(--color-cat-source); }
.section-header--music h2 { background: var(--color-cat-music); }

/* 3-column layout on homepage */
.home-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* 2-column layout */
.home-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* ==========================================================================
   POST CARDS
   ========================================================================== */
.post-card {
  margin-bottom: 20px;
  background: #3a3a3a;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #555;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  border-color: #777;
}

.post-card-image-wrap {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 3px 3px 0 0;
}

.post-card-image-wrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image-wrap img {
  transform: scale(1.05);
}

.post-card-body {
  padding: 12px 14px;
}

.category-badge {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* Category color classes */
.cat-reviews { background: var(--color-cat-reviews); }
.cat-headphones { background: var(--color-cat-headphones); }
.cat-cables { background: var(--color-cat-cables); }
.cat-source { background: var(--color-cat-source); }
.cat-amplifiers { background: var(--color-cat-amplifiers); }
.cat-speakers { background: var(--color-cat-speakers); }
.cat-shows { background: var(--color-cat-shows); }
.cat-news { background: var(--color-cat-news); }
.cat-music { background: var(--color-cat-music); }
.cat-dacs { background: var(--color-cat-dacs); }
.cat-networking { background: var(--color-cat-networking); }
.cat-software { background: var(--color-cat-software); }
.cat-power { background: var(--color-cat-power); }
.cat-education { background: var(--color-cat-education); }
.cat-other { background: var(--color-cat-other); }
.cat-default { background: var(--color-primary); }
.category-badge[class*="cat-"] { color: #fff; }

.post-card-body h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 6px;
}

.post-card-body h3 a {
  color: var(--color-text);
  transition: color 0.2s ease;
}

.post-card-body h3 a:hover {
  color: #d4a574;
}

.post-card-body time {
  font-size: 12px;
  color: var(--color-text-light);
}

.post-card-body .excerpt {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-top: 6px;
}

/* Post card variants */
.post-card--horizontal {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.post-card--horizontal .post-card-image-wrap {
  width: 120px;
  flex-shrink: 0;
  border-radius: 3px;
}

.post-card--horizontal .post-card-image-wrap img {
  height: 90px;
}

.post-card--horizontal .post-card-body {
  padding: 0;
}

.post-card--horizontal .post-card-body h3 {
  font-size: 0.9rem;
}

/* Post card for grid layout */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 30px;
}

.post-grid .post-card-image-wrap img {
  height: 200px;
}

/* Ad slots */
.ad-slot {
  border: 1px dashed rgba(255, 255, 255, 0.05);
  background: transparent;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.15);
  margin: 10px 0;
}

.ad-slot:empty::after {
  content: '';
}

.ad-slot-sidebar {
  margin-bottom: 25px;
}

.ad-slot-between {
  grid-column: 1 / -1;
  margin: 10px 0;
}

.ad-slot-in-content {
  margin: 25px 0;
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.post-article {
  max-width: 100%;
  background: #424242;
  border-radius: 8px;
  padding: 2rem 2.5rem;
  border: 1px solid #555;
}

.post-header {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #555;
}

.post-header .category-badge {
  margin-bottom: 12px;
}

.post-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: #bbb;
  font-size: 13px;
}

.post-meta time {
  color: #bbb;
}

.post-meta a {
  color: #d4a574 !important;
  opacity: 0.9;
}

.post-meta a:hover {
  color: #e8939f !important;
  opacity: 1;
  text-decoration: underline;
}

.post-featured-image {
  margin-bottom: 25px;
  border-radius: 3px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  display: block;
}

/* Post content */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: #f0f0f0;
}

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

.post-content h2 {
  font-size: 1.5rem;
  margin: 2em 0 0.8em;
  color: #fff;
  padding-bottom: 0.4em;
  border-bottom: 1px solid #555;
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 1.8em 0 0.6em;
  color: #f0f0f0;
}

.post-content h4 {
  font-size: 1.1rem;
  margin: 1.5em 0 0.5em;
  color: #e0e0e0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 1em 0;
}

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 15px 20px;
  margin: 1.5em 0;
  background: rgba(130, 30, 33, 0.15);
  color: #ddd;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

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

.post-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 13px;
}

.post-content ul,
.post-content ol {
  margin: 1em 0;
  padding-left: 1.8em;
}

.post-content li {
  margin-bottom: 0.5em;
}

.post-content a {
  color: #d4a574;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.post-content a:hover {
  color: #e8c49a;
}

.post-content iframe,
.post-content embed,
.post-content video {
  max-width: 100%;
}

/* Gallery CSS */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 1.5em 0;
  border-radius: 6px;
  overflow: hidden;
}

.gallery p {
  display: contents;
  margin: 0;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin: 0;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

.wp-block-gallery,
.gallery-columns-2,
.gallery-columns-3,
.gallery-columns-4 {
  display: grid;
  gap: 10px;
  margin: 1.5em 0;
}

.gallery-columns-2 { grid-template-columns: 1fr 1fr; }
.gallery-columns-3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery-columns-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* Post share buttons */
.post-share {
  display: flex;
  gap: 10px;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.post-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  transition: opacity 0.2s ease;
}

.post-share a:hover {
  opacity: 0.8;
}

.share-facebook { background: #3b5998; }
.share-twitter { background: #1da1f2; }
.share-pinterest { background: #bd081c; }
.share-email { background: #777; }

/* Post tags */
.post-tags {
  margin: 25px 0;
}

.post-tags .tag {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 5px 14px;
  background: #3a3a3a;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 12px;
  color: var(--color-text-light);
  transition: all 0.2s ease;
}

.post-tags .tag:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: #d4a574;
}

/* Buy Me a Coffee button */
.bmc-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #ffdd00;
  color: #000 !important;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  border-radius: 5px;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
  margin: 1em 0;
}

.bmc-btn:hover {
  background: #ffcc00;
  transform: scale(1.05);
  color: #000 !important;
}

/* ==========================================================================
   ARCHIVE / LIST PAGES
   ========================================================================== */
.archive-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--color-primary);
}

.archive-header h1 {
  font-size: 1.8rem;
}

.archive-header .archive-description {
  color: var(--color-text-light);
  margin-top: 5px;
  font-size: 14px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 40px 0 20px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: #d4a574;
}

.pagination .active span {
  background: var(--color-primary);
  color: #fff;
  border-color: #d4a574;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
/* Sidebar widget cards */
.sidebar .widget,
.sidebar-widget {
  margin-bottom: 30px;
  background: var(--color-card-bg);
  border-radius: 4px;
  overflow: hidden;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--color-widget-title-bg);
  padding: 10px 15px;
  margin: 0;
}

/* Search widget */
.sidebar-widget .search-form {
  display: flex;
  border: 1px solid var(--color-border);
  margin: 15px;
}

.sidebar-widget .search-input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  background: #2a2a2a;
  color: var(--color-text);
}

.sidebar-widget .search-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.sidebar-widget .search-btn:hover {
  background: var(--color-primary-dark);
}

#search-results {
  padding: 0 15px 15px;
  font-size: 0.85rem;
}
#search-results .search-result {
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}
#search-results a {
  color: var(--color-text);
}
#search-results a:hover {
  color: #d4a574;
}

/* Newsletter widget */
.widget-newsletter {
  background: #3a3530;
  padding: 20px;
  border: 1px solid #4a3f35;
}

.widget-newsletter .widget-title {
  margin: -20px -20px 15px -20px;
}

.widget-newsletter p {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Newsletter widget content */
.widget-text {
  font-size: 13px;
  color: var(--color-text-light);
  margin: 0;
  padding: 15px 15px 12px;
  line-height: 1.5;
}

.newsletter-form {
  padding: 0 15px 15px;
}

.widget-newsletter input[type="email"],
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #555;
  background: #2a2a2a;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
}

.widget-newsletter input[type="email"]:focus,
.newsletter-form input[type="email"]:focus {
  border-color: var(--color-newsletter-btn);
}

.widget-newsletter button,
.newsletter-btn {
  width: 100%;
  padding: 11px;
  background: var(--color-newsletter-btn);
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.widget-newsletter button:hover {
  background: #b5611a;
}

/* Recent posts widget */
.widget-recent-posts .recent-post {
  display: flex;
  gap: 12px;
  margin: 0 15px 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border);
}

.widget-recent-posts .recent-post:first-child {
  margin-top: 15px;
}

.widget-recent-posts .recent-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 15px;
}

.widget-recent-posts .recent-post img {
  width: 70px;
  height: 55px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.widget-recent-posts .recent-post-info h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.widget-recent-posts .recent-post-info h4 a {
  color: var(--color-text);
  transition: color 0.2s ease;
}

.widget-recent-posts .recent-post-info h4 a:hover {
  color: #d4a574;
}

.widget-recent-posts .recent-post-info time {
  font-size: 11px;
  color: var(--color-text-light);
}

/* Recent posts in sidebar (Ghost template uses ul.recent-posts li) */
.sidebar-widget .recent-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-widget .recent-posts li {
  display: flex;
  gap: 12px;
  margin: 0 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-widget .recent-posts li:last-child {
  border-bottom: none;
}

.sidebar-widget .recent-posts li img {
  width: 70px;
  height: 55px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.sidebar-widget .recent-posts li div {
  flex: 1;
  min-width: 0;
}

.sidebar-widget .recent-posts li a {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  display: block;
  margin-bottom: 3px;
}

.sidebar-widget .recent-posts li a:hover {
  color: #d4a574;
}

.sidebar-widget .recent-posts li time {
  font-size: 11px;
  color: var(--color-text-light);
}

/* Social widget */
.sidebar-widget .social-links {
  display: flex;
  gap: 8px;
  padding: 15px;
}

.widget-social .social-links {
  display: flex;
  gap: 8px;
  padding: 15px;
}

.widget-social .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  transition: opacity 0.2s ease;
}

.widget-social .social-links a:hover {
  opacity: 0.8;
}

.social-facebook { background: #3b5998; }
.social-twitter { background: #1da1f2; }
.social-instagram { background: #e1306c; }
.social-youtube { background: #ff0000; }
.social-pinterest { background: #bd081c; }

/* Tag cloud widget */
.widget-tags .tag-cloud,
.sidebar-widget .tag-cloud {
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.widget-tags .tag-cloud a,
.sidebar-widget .tag-cloud a {
  display: inline-block;
  padding: 4px 10px;
  background: #3a3a3a;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 11px;
  color: var(--color-text-light);
  transition: all 0.2s ease;
  text-decoration: none;
}

.widget-tags .tag-cloud a:hover,
.sidebar-widget .tag-cloud a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-footer-bg);
  padding: 40px 0;
}

.footer-inner {
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-family: var(--font-heading);
}

.footer-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.footer-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */
.toc {
  background: #333;
  border: 1px solid #444;
  border-left: 4px solid #821e21;
  border-radius: 4px;
  padding: 0;
  margin: 1.5rem 0 2rem;
}

.toc-title {
  font-family: var(--font-heading);
  color: #f0f0f0;
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.toc-title::marker { content: ''; }

.toc-title::before {
  content: '\25B8 ';
  font-size: 0.8em;
  color: #d4a574;
}

.toc[open] .toc-title::before {
  content: '\25BE ';
}

.toc-body {
  padding: 0 1.5rem 1rem;
  border-top: 1px solid #444;
}

.toc-body::-webkit-scrollbar {
  width: 6px;
}

.toc-body::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.toc-body::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc ul ul {
  padding-left: 1.25rem;
  margin-top: 0.25rem;
}

.toc li {
  margin: 0.4rem 0;
  padding: 0.1rem 0;
}

.toc a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.toc a:hover,
.toc a.active {
  color: #fff;
}

/* ==========================================================================
   VIDEO EMBEDS
   ========================================================================== */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 8px;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-content iframe {
  max-width: 100%;
  border-radius: 4px;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #222;
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  flex: 1;
  min-width: 250px;
  font-size: 0.85rem;
  color: #ccc;
  margin: 0;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-btn {
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cookie-btn:hover { opacity: 0.9; }

.cookie-btn-accept {
  background: var(--color-primary);
  color: #fff;
}

.cookie-btn-reject {
  background: #444;
  color: #ccc;
}

.cookie-learn-more {
  color: #aaa;
  font-size: 0.8rem;
  text-decoration: underline;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #444;
}

.comments-title {
  color: #f0f0f0;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.comment {
  background: #333;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 3px solid #555;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: #d4a574;
  font-size: 0.9rem;
}

.comment-author a {
  color: #d4a574;
  text-decoration: none;
}

.comment-date {
  color: #888;
  font-size: 0.8rem;
}

.comment-body {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.6;
}

.comment-body p {
  margin-bottom: 0.5rem;
}

/* Nested replies */
.comment-replies {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid #555;
}

.comment-replies .comment {
  background: #2d2d2d;
  border-left-color: #666;
}

.comment-replies .comment-replies {
  margin-left: 1rem;
}

.comment-replies .comment-replies .comment {
  background: #282828;
}

/* ==========================================================================
   POST PAGINATION (nextpage)
   ========================================================================== */
.nextpage-break {
  display: none;
}

.post-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #555;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #333;
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #444;
  color: #fff;
}

.page-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.post-page {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   GALLERY LIGHTBOX
   ========================================================================== */
.gallery-lightbox {
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.92);
  max-width: 90vw;
  max-height: 90vh;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.gallery-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   SEARCH PAGE
   ========================================================================== */
.search-page h1 {
  color: #f0f0f0;
  margin-bottom: 1.5rem;
}

.search-input-large {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.1rem;
  background: #333;
  border: 2px solid #555;
  border-radius: 6px;
  color: #f0f0f0;
  outline: none;
  transition: border-color 0.2s;
}

.search-input-large:focus {
  border-color: #d4a574;
}

.search-results {
  margin-top: 1.5rem;
}

.search-result {
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.search-result h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.search-result h3 a {
  color: #f0f0f0;
  text-decoration: none;
}

.search-result h3 a:hover {
  color: #d4a574;
}

.search-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.search-result p {
  color: #ccc;
  font-size: 0.9rem;
  margin: 0;
}

.search-hint, .search-no-results {
  color: #888;
  font-style: italic;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .home-columns {
    grid-template-columns: 1fr 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-nav-dropdown-bg);
    flex-direction: column;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav > a,
  .nav-dropdown > a {
    line-height: 1;
    padding: 12px 20px;
    color: var(--color-nav-dropdown-text);
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    max-height: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.15);
  }

  .dropdown-menu a {
    padding-left: 36px;
  }

  .dropdown-menu .has-submenu > a {
    padding-left: 36px;
  }

  .dropdown-menu .submenu {
    position: static;
    display: block;
    box-shadow: none;
    min-width: 0;
    border-radius: 0;
  }

  .dropdown-menu .submenu a {
    padding-left: 52px;
  }

  .social-top-bar {
    display: none;
  }

  .site-content > .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .home-columns {
    grid-template-columns: 1fr;
  }

  .home-two-columns {
    grid-template-columns: 1fr;
  }

  .featured-hero img {
    height: 300px;
  }

  .featured-hero-overlay h2 {
    font-size: 1.4rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }

  .post-share {
    flex-wrap: wrap;
  }

  .post-article {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .featured-hero img {
    height: 220px;
  }

  .featured-hero-overlay {
    padding: 20px 15px 15px;
  }

  .featured-hero-overlay h2 {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 15px;
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.view-all {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: #d4a574;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
  border-bottom: 2px solid #d4a574;
  transition: all 0.2s ease;
  text-decoration: none;
}

.view-all:hover {
  color: #fff;
  border-color: #fff;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* ---------- Paginated ToC ---------- */
.toc-pages {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}
.toc-pages li {
  margin: 0.3rem 0;
}
.toc-pages li.active > a {
  color: #fff;
  font-weight: 700;
}
.toc-pages a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}
.toc-pages a:hover {
  color: #d4a574;
}

/* ---------- Page Navigation (prev/next for paginated articles) ---------- */
.page-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.page-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 48%;
  text-decoration: none;
}
.page-nav-next {
  text-align: right;
  margin-left: auto;
}
.page-nav-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaa;
}
.page-nav-title {
  font-size: 0.95rem;
  color: #d4a574;
  font-weight: 600;
}
.page-nav-link:hover .page-nav-title {
  color: #fff;
}
.page-nav-link:hover .page-nav-title {
  color: #a52a2d;
}

/* ---------- Comment Form ---------- */
.comment-form-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #555;
}
.comment-form-section h4 {
  color: #f0f0f0;
  margin-bottom: 1rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 0.75rem;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: #f0f0f0;
  font-size: 0.9rem;
}
.comment-form textarea { resize: vertical; }
.comment-form button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.comment-form button:hover { opacity: 0.9; }

/* Comment form row (name + email side by side) */
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .comment-form-row { grid-template-columns: 1fr; }
}

/* Hidden comments (collapsed) */
.comment-hidden { display: none; }

/* Show all button */
.show-all-comments {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 1rem;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  color: #d4a574;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.show-all-comments:hover {
  background: #444;
  color: #fff;
}

/* Support links (BuyMeACoffee + Patreon) */
.support-links {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #333;
  border-radius: 8px;
  border: 1px solid #444;
  text-align: center;
}
.support-text {
  color: #ccc;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.support-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.bmc-btn {
  background: #FF813F;
  color: #fff;
}
.patreon-btn {
  background: #FF424D;
  color: #fff;
}

/* Header social icons (inline with nav) */
.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  margin: 0 8px;
  align-self: center;
}
.header-social {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.header-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s, background 0.2s;
}
.header-social-icon:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Center standalone images (award badges, logos) */
.post-content p:has(> img:only-child),
.post-content p:has(> a:only-child > img),
.gh-content p:has(> img:only-child),
.gh-content p:has(> a:only-child > img) {
  text-align: center;
}
/* Center images that are direct children of links (award badges) */
.gh-content > a > img,
.gh-content > a:only-child > img {
  display: block;
  margin: 1.5rem auto;
}
/* Center all content images by default */
.post-content img,
.gh-content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
/* But gallery images should NOT be centered/block */
.gallery img {
  display: block;
  margin: 0;
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.92);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
  opacity: 0.7;
}
.lightbox-close:hover { opacity: 1; }
.post-content img,
.gh-content img {
  cursor: zoom-in;
}

/* ==========================================================================
   GHOST-SPECIFIC OVERRIDES
   Ghost's navigation renders as a flat list of <a> inside .gh-head-menu.
   We adapt to match the Astro nav styles.
   ========================================================================== */

/* Ghost nav links — match our main-nav style */
.gh-head-menu .nav a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-nav-text);
  padding: 0 14px;
  line-height: var(--nav-height);
  display: block;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.gh-head-menu .nav a:hover {
  color: var(--color-nav-active);
}

/* Ghost renders post content inside .gh-content */
.gh-content {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  margin: 2rem 0 1rem;
}

.gh-content p {
  margin: 0 0 1.2rem;
}

.gh-content img {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.gh-content a {
  color: #d4a574;
  text-decoration: underline;
  text-decoration-color: rgba(212, 165, 116, 0.3);
}

.gh-content a:hover {
  color: #fff;
}

.gh-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: #e0e0e0;
  font-style: italic;
}
.gh-content blockquote p {
  color: #e0e0e0;
}

.gh-content ul,
.gh-content ol {
  margin: 1rem 0 1.2rem 1.5rem;
}

.gh-content li {
  margin: 0.4rem 0;
}

.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.gh-content th,
.gh-content td {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.gh-content th {
  background: rgba(130, 30, 33, 0.3);
  font-weight: 700;
}

/* Responsive table wrapper — prevents wide tables from breaking layout */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.table-responsive table {
  margin: 0;
  min-width: 600px;
}

/* Sortable survey/comparison tables */
.gh-content table.sortable {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.5;
}
.gh-content table.sortable th {
  background: rgba(130, 30, 33, 0.4);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
}
.gh-content table.sortable td {
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}
.gh-content table.sortable tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
.gh-content table.sortable tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Ghost HTML cards (kg-card) containing tables */
.kg-card table {
  width: 100%;
  max-width: 100%;
}

/* Ghost's native comment widget */
.gh-comments,
.comments-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* Newsletter form (Ghost members) */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.newsletter-form input[type="email"] {
  padding: 10px 12px;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: #f0f0f0;
  font-size: 0.9rem;
}

.newsletter-btn {
  background: var(--color-newsletter-btn);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.newsletter-btn:hover {
  opacity: 0.9;
}

/* Social links in sidebar */
.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.social-icon:hover { opacity: 0.8; color: #fff; }
.social-facebook { background: #3b5998; }
.social-twitter { background: #1da1f2; }
.social-instagram { background: #e1306c; }
.social-youtube { background: #ff0000; }
.social-pinterest { background: #bd081c; }

/* Widget text */
.widget-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Archive pages */
.archive-description {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
}

.pagination-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4a574;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: all 0.2s;
}

.pagination-link:hover {
  color: #fff;
  border-color: #d4a574;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* Mobile menu button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav > a,
  .nav-dropdown > a {
    line-height: 1;
    padding: 12px 20px;
  }

  .nav-divider,
  .header-social {
    display: none;
  }

  .site-content > .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   VIDEO EMBEDS
   ========================================================================== */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 4px;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   PAGE NAVIGATION (for multi-page articles)
   ========================================================================== */
.page-nav-info {
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-family: var(--font-heading);
}

/* ==========================================================================
   GHOST REQUIRED: kg-width classes for editor cards
   ========================================================================== */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 42.5vw);
}
.kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 50vw);
}
.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

/* Ghost card styles */
.kg-image-card,
.kg-gallery-card,
.kg-embed-card,
.kg-bookmark-card {
  margin: 1.5rem 0;
}
.kg-image-card img {
  margin: 0 auto;
  max-width: 100%;
}
.kg-bookmark-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: var(--color-text);
}
.kg-bookmark-content {
  flex: 1;
  padding: 1rem;
}
.kg-bookmark-title {
  font-weight: 700;
  color: var(--color-heading);
}
.kg-bookmark-description {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
}
.kg-bookmark-thumbnail {
  width: 200px;
  flex-shrink: 0;
}
.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kg-gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Centered badge/award images */
.badge-centered {
  text-align: center !important;
  margin: 2rem 0 !important;
  display: block !important;
}
.badge-centered img {
  display: inline-block !important;
  margin: 0 auto !important;
  max-width: 250px !important;
}

/* TablePress tables */
.tablepress-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.tablepress {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}
.tablepress thead th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
}
.tablepress tbody td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.tablepress tbody tr {
  background: var(--color-card-bg, #2a2a2a);
}
.tablepress tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
.tablepress tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* WordPress Gutenberg block tables - dark theme overrides */
.gh-content table.has-background {
  background: var(--color-card-bg, #2a2a2a) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  width: 100% !important;
  margin: 1rem 0 !important;
  border-collapse: separate !important;
  overflow: hidden !important;
}
.gh-content table.has-background td,
.gh-content table.has-background th {
  background: transparent !important;
  color: var(--color-text) !important;
  padding: 0.75rem 1rem !important;
  border-color: var(--color-border) !important;
  vertical-align: top !important;
  font-size: 0.9rem !important;
}
/* WordPress block tables - full width, stacked vertically like original */
.gh-content figure.wp-block-table {
  clear: both !important;
  float: none !important;
  display: block !important;
  width: 100% !important;
  margin: 1rem 0 !important;
  overflow: hidden !important;
}
.gh-content figure.wp-block-table table {
  width: 100% !important;
  table-layout: fixed !important;
}
/* Bare image links must be block-level and not float */
.gh-content > a:has(img) {
  display: block !important;
  float: none !important;
  margin: 1rem 0 !important;
}
/* Any element after consecutive images must clear */
.gh-content > a + figure,
.gh-content > a + a + figure,
.gh-content > a + a + a + figure {
  clear: both !important;
}

/* Semantic colored tables - dark theme */
.gh-content table.has-bg-green {
  background: rgba(76, 175, 80, 0.1) !important;
  border-color: rgba(76, 175, 80, 0.3) !important;
}
.gh-content table.has-bg-red {
  background: rgba(244, 67, 54, 0.1) !important;
  border-color: rgba(244, 67, 54, 0.3) !important;
}
.gh-content table.has-bg-blue {
  background: rgba(33, 150, 243, 0.1) !important;
  border-color: rgba(33, 150, 243, 0.3) !important;
}
.gh-content table.has-bg-neutral {
  background: var(--color-card-bg, #2a2a2a) !important;
  border-color: var(--color-border) !important;
}
.gh-content table.has-background strong {
  color: #e0e0e0 !important;
}

/* Badge images — centered, natural size, NOT full-width */
.gh-content img.badge-image,
.gh-content img[src*="editors-choice"],
.gh-content img[src*="badge"],
.gh-content .badge-centered img {
  width: auto !important;
  max-width: 250px !important;
  display: block !important;
  margin: 1.5rem auto !important;
}
.gh-content a:has(img.badge-image),
.gh-content a:has(img[src*="editors-choice"]) {
  width: auto !important;
  text-align: center;
  display: block !important;
}

/* Hide Disqus reactions widget */
#disqus_thread .reaction-item,
#disqus_thread [class*="reaction"],
.reaction-component {
  display: none !important;
}

/* YouTube embeds */
.youtube-embed {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  clear: both;
}
.youtube-embed iframe {
  display: block;
  width: 100%;
  min-height: 400px;
  border: none;
  border-radius: 4px;
}

/* WordPress image alignment overrides - prevent text wrapping */
.gh-content img.alignleft,
.gh-content img.alignright,
.gh-content .wp-image-alignleft,
.gh-content .wp-image-alignright {
  float: none;
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
}

/* ============================================================
   CONTENT LAYOUT RESET
   All content flows vertically. No floating. No wrapping.
   Everything is full-width blocks stacked top to bottom.
   ============================================================ */

/* Kill ALL floats inside content */
.gh-content * {
  float: none !important;
}

/* Every direct child is a full-width block */
.gh-content > * {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
}

/* Images: always full-width blocks */
.gh-content img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Links containing images: full-width block */
.gh-content a {
  display: block !important;
  width: 100% !important;
}
/* Exception: inline text links */
.gh-content p a,
.gh-content li a,
.gh-content td a,
.gh-content h2 a,
.gh-content h3 a,
.gh-content blockquote a {
  display: inline !important;
  width: auto !important;
}

/* Galleries: CSS grid, images fill evenly */
.gh-content .gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin: 1rem 0;
}
.gh-content .gallery a {
  display: block !important;
  width: auto !important;
  overflow: hidden;
}
.gh-content .gallery img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 2px;
}

/* Tables: always full-width, never overflow */
.gh-content table {
  max-width: 100% !important;
  width: 100% !important;
}
.gh-content .tablepress-wrapper,
.gh-content figure.wp-block-table {
  display: block !important;
  width: 100% !important;
  margin: 1rem 0;
  overflow-x: auto;
}
.gh-content .pros-cons-table {
  width: 100% !important;
}

/* WordPress list styling inside posts */
.gh-content .wptb-list-container ul {
  list-style: disc;
  padding-left: 1.5rem;
}
.gh-content .wptb-list-container li {
  margin-bottom: 0.3rem;
}

/* WP Table Builder tables - dark theme overrides + responsive fix */
.gh-content .tablepress-wrapper table,
.gh-content table.wptb-preview-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-color: var(--color-border) !important;
  border-collapse: collapse !important;
}
.gh-content .tablepress-wrapper table td,
.gh-content table.wptb-preview-table td {
  border-color: var(--color-border) !important;
  background: var(--color-card-bg, #2a2a2a) !important;
  width: 50% !important;
  vertical-align: top !important;
  padding: 1rem !important;
  font-size: 0.9rem !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}
.gh-content .tablepress-wrapper table .wptb-text-container,
.gh-content .tablepress-wrapper table .wptb-text-container p,
.gh-content .tablepress-wrapper table .wptb-list-container,
.gh-content .tablepress-wrapper table .wptb-list-container p,
.gh-content .tablepress-wrapper table .wptb-list-container li,
.gh-content table.wptb-preview-table .wptb-text-container,
.gh-content table.wptb-preview-table .wptb-text-container p,
.gh-content table.wptb-preview-table .wptb-list-container,
.gh-content table.wptb-preview-table .wptb-list-container p,
.gh-content table.wptb-preview-table .wptb-list-container li {
  color: var(--color-text) !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}
.gh-content .tablepress-wrapper table .wptb-text-container[style*="color: rgb(129, 215, 66)"],
.gh-content .tablepress-wrapper table .wptb-text-container[style*="color: rgb(129, 215, 66)"] p,
.gh-content table.wptb-preview-table .wptb-text-container[style*="color: rgb(129, 215, 66)"],
.gh-content table.wptb-preview-table .wptb-text-container[style*="color: rgb(129, 215, 66)"] p {
  color: #81d742 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
.gh-content .tablepress-wrapper table .wptb-text-container[style*="color: rgb(221, 51, 51)"],
.gh-content .tablepress-wrapper table .wptb-text-container[style*="color: rgb(221, 51, 51)"] p,
.gh-content table.wptb-preview-table .wptb-text-container[style*="color: rgb(221, 51, 51)"],
.gh-content table.wptb-preview-table .wptb-text-container[style*="color: rgb(221, 51, 51)"] p {
  color: #dd3333 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
.gh-content .tablepress-wrapper table ul,
.gh-content table.wptb-preview-table ul {
  padding-left: 1.2rem !important;
  margin: 0.5rem 0 !important;
}
.gh-content .tablepress-wrapper table li,
.gh-content table.wptb-preview-table li {
  margin-bottom: 0.4rem !important;
}
