/* ═══════════════════════════════════════════════════════════
   FirefighterNow Theme — main.css
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --red:          #C40001;
  --red-dark:     #a80001;
  --dark:         #111111;
  --white:        #ffffff;
  --bg:           #ffffff;
  --text:         #2D2D2D;
  --muted:        #6B6B6B;
  --border:       #E5E7EB;
  --surface:      #F9FAFB;
  --radius:       8px;
  --shadow:       0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.13);
  --max-w:        1100px;
  --max-w-post:   720px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-footer { margin-top: auto; }

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

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--red-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--dark);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 8px;
  overflow: visible;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 200px;
}
/* WordPress custom_logo wraps in <a>, constrain the img inside */
.site-logo .custom-logo-link,
.site-logo a { display: flex; align-items: center; text-decoration: none; }
.site-logo img,
.site-logo .custom-logo {
  height: 44px !important;
  width: auto !important;
  display: block;
  filter: none !important;
  max-width: 100%;
}
.logo-text {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.logo-text strong { color: var(--red); font-weight: 700; }

/* Desktop nav */
.primary-nav {
  display: flex;
  align-items: stretch;
  flex: 1;
  justify-content: flex-end;
  height: 100%;
  overflow: visible;
}
.primary-nav > div,
.primary-nav > nav { height: 100%; }
.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  height: 100%;
  margin: 0;
  padding: 0;
}
.primary-nav ul > li {
  position: relative;
  display: flex;
  align-items: center;
}
.primary-nav ul > li > a {
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 0 7px;
  border-radius: 6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  transition: color 0.15s, background 0.15s;
}
.primary-nav ul > li > a:hover,
.primary-nav ul > li:hover > a {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ── Dropdown sub-menus ──────────────────────────────────────── */
/* Hide by default — use visibility+opacity so we can animate, but
   also set display:none so it takes no space and defeats plugin overrides */
.site-header .primary-nav ul li ul,
.site-header .primary-nav ul li ul.sub-menu {
  display: none !important;
  visibility: hidden !important;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 200px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.5);
  z-index: 400;
  flex-direction: column;
  gap: 0;
}
/* Show on hover / focus / JS-toggled */
.site-header .primary-nav ul > li:hover > ul,
.site-header .primary-nav ul > li:hover > ul.sub-menu,
.site-header .primary-nav ul > li:focus-within > ul,
.site-header .primary-nav ul > li:focus-within > ul.sub-menu,
.site-header .primary-nav ul > li.is-open > ul,
.site-header .primary-nav ul > li.is-open > ul.sub-menu {
  display: flex !important;
  visibility: visible !important;
}
.primary-nav ul li ul li {
  display: block;
}
.primary-nav ul li ul li a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(255,255,255,0.75);
  border-radius: 0;
  height: auto;
  line-height: 1.4;
}
.primary-nav ul li ul li a:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

/* Dropdown indicator arrow */
.primary-nav ul > li:has(> ul) > a::after {
  content: '▾';
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
}
.primary-nav ul li ul li a:hover {
  background: rgba(255,255,255,0.06);
}
.nav-cta a,
.primary-nav .nav-cta > a {
  background: var(--red) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
}
.nav-cta a:hover,
.primary-nav .nav-cta > a:hover {
  background: var(--red-dark) !important;
}

/* Search toggle */
/* Ensure sub-menus in the mobile nav don't inherit dropdown styles */
.mobile-nav .sub-menu { display: block !important; position: static !important; box-shadow: none !important; background: transparent !important; }

.header-search { display: flex; align-items: center; }
.header-search form { display: flex; align-items: center; gap: 4px; }
.header-search input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  width: 160px;
  outline: none;
}
.header-search input::placeholder { color: rgba(255,255,255,0.4); }
.header-search input:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.header-search button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  padding: 6px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  transition: color 0.15s;
}
.header-search button:hover { color: #fff; }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  border-radius: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  background: #1a1a1a;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; padding: 12px 0; }
.mobile-nav ul li a {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 24px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.mobile-nav ul li a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.mobile-nav .nav-cta a {
  color: var(--red) !important;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HERO (homepage + archive top)
   ═══════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 44px 24px 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════ */
.site-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* ── Section label ─────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.section-label span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  white-space: nowrap;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   POST CARDS
   ═══════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.card:hover .card-thumbnail img { transform: scale(1.03); }

.card-no-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8edf3 0%, #d1dae6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-no-image svg { opacity: 0.3; }

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
  text-decoration: none;
}
.card-category:hover { color: var(--red-dark); }

.card-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 10px;
  flex: 1;
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: auto;
}

/* Featured card (spans 2 cols) */
.card-featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
}
.card-featured .card-thumbnail,
.card-featured .card-no-image {
  width: 280px;
  min-width: 280px;
  aspect-ratio: auto;
}
.card-featured .card-title { font-size: 1.35rem; }
.card-featured .card-excerpt { -webkit-line-clamp: 4; }

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
}
.pagination ul.page-numbers {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.pagination ul.page-numbers li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pagination .page-numbers:hover {
  border-color: var(--red);
  color: var(--red);
}
.pagination .page-numbers.current {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════ */
.post-container {
  max-width: var(--max-w-post);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.post-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.post-breadcrumb a { color: var(--red); text-decoration: none; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb span { color: var(--muted); }

.post-category-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
  text-decoration: none;
}
.post-category-badge:hover { background: var(--red-dark); color: #fff; }

.post-title {
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.4px;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.post-meta a { color: var(--muted); text-decoration: none; }
.post-meta a:hover { color: var(--text); }
.post-meta-dot::before { content: '·'; margin-right: 0; }

.post-featured-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}
.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Post body typography ─────────────────────────────────── */
.post-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.post-body p { margin-bottom: 1.5em; }

.post-body h2 {
  font-family: Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--dark);
  margin: 2.25em 0 0.75em;
  padding-top: 0.25em;
  border-top: 2px solid var(--border);
}
.post-body h3 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin: 1.75em 0 0.6em;
}
.post-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin: 1.5em 0 0.5em;
}

.post-body ul, .post-body ol {
  margin: 0 0 1.5em 1.5em;
}
.post-body li { margin-bottom: 0.4em; }

.post-body blockquote {
  border-left: 4px solid var(--red);
  margin: 1.75em 0;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted);
}
.post-body blockquote p { margin-bottom: 0; }

.post-body strong { color: var(--dark); font-weight: 700; }
.post-body em { font-style: italic; }

.post-body a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: rgba(196,0,1,0.3);
  text-underline-offset: 2px;
}
.post-body a:hover { text-decoration-color: var(--red); }

.post-body img {
  border-radius: var(--radius);
  margin: 1.5em 0;
  box-shadow: var(--shadow);
}

.post-body figure { margin: 1.5em 0; }
.post-body figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9375rem;
}
.post-body th {
  background: var(--surface);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.post-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.post-body tr:last-child td { border-bottom: none; }
.post-body tr:hover td { background: var(--surface); }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* WordPress block alignment */
.post-body .alignwide {
  margin-left: -10%;
  margin-right: -10%;
  max-width: 120%;
}
.post-body .alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
}
.post-body .aligncenter { text-align: center; }
.post-body .alignleft { float: left; margin: 0 1.5em 1em 0; }
.post-body .alignright { float: right; margin: 0 0 1em 1.5em; }

/* ── Amazon affiliate auto-button ────────────────────────── */
.post-body a[href*="amazon.com/dp/"],
.post-body a[href*="amzn.to/"],
.post-body a[href*="amazon.com/gp/product/"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff !important;
  text-decoration: none !important;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  margin: 4px 0 20px;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.post-body a[href*="amazon.com/dp/"]:hover,
.post-body a[href*="amzn.to/"]:hover,
.post-body a[href*="amazon.com/gp/product/"]:hover {
  background: var(--red-dark);
  color: #fff !important;
}
.post-body a[href*="amazon.com/dp/"]::before,
.post-body a[href*="amzn.to/"]::before,
.post-body a[href*="amazon.com/gp/product/"]::before {
  content: '🛒';
  font-size: 14px;
}

/* ── Tags ─────────────────────────────────────────────────── */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.post-tags a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 10px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.post-tags a:hover { border-color: var(--red); color: var(--red); }

/* ── Post author box ──────────────────────────────────────── */
.author-box {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 40px;
}
.author-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
.author-info { flex: 1; }
.author-name {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.author-bio { font-size: 0.875rem; color: var(--muted); }

/* ── Related posts ────────────────────────────────────────── */
.related-posts {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-posts .section-label { margin-bottom: 20px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Post nav ─────────────────────────────────────────────── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-nav-item:hover {
  border-color: var(--red);
  box-shadow: var(--shadow);
}
.post-nav-item.next { text-align: right; }
.post-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.post-nav-title {
  font-family: Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   STATIC PAGE
   ═══════════════════════════════════════════════════════════ */
.page-container {
  max-width: var(--max-w-post);
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   ARCHIVE
   ═══════════════════════════════════════════════════════════ */
.archive-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}
.archive-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.archive-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.archive-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 10px;
}
.archive-description {
  color: var(--muted);
  font-size: 1rem;
  max-width: 600px;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════ */
.search-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}
.search-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.search-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.search-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  color: var(--text);
}
.search-form input[type="search"]:focus { border-color: var(--red); }
.search-form button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.search-form button:hover { background: var(--red-dark); }
.search-count {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.no-results {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.no-results h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark);
}

/* ═══════════════════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════════════════ */
.error-404 {
  max-width: 560px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.error-404 .error-number {
  font-family: Georgia, serif;
  font-size: 8rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
}
.error-404 h1 { font-size: 1.75rem; margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 28px; }
.btn-primary {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--red-dark); color: #fff; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  padding: 11px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-outline:hover { background: var(--red); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   POPUP / FORM OVERRIDES
   Targets OptinMonster, Popup Maker, generic modals
   ═══════════════════════════════════════════════════════════ */

/* Generic email inputs inside any popup/modal/widget */
.pum-container input[type="email"],
.pum-container input[type="text"],
.ffn-popup input[type="email"],
.ffn-popup input[type="text"],
/* also target naked WP widget forms */
.widget input[type="email"],
.widget input[type="text"] {
  width: 100%;
  padding: 13px 16px !important;
  font-size: 15px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 6px !important;
  margin-bottom: 10px !important;
  outline: none !important;
  box-shadow: none !important;
}
.pum-container input[type="email"]:focus,
.ffn-popup input[type="email"]:focus {
  border-color: var(--red) !important;
}

/* Generic submit/subscribe buttons inside popups */
.pum-container input[type="submit"],
.pum-container button[type="submit"],
.ffn-popup input[type="submit"],
.ffn-popup button[type="submit"] {
  width: 100%;
  background: var(--red) !important;
  color: #fff !important;
  border: none !important;
  padding: 13px 20px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}
.pum-container input[type="submit"]:hover,
.pum-container button[type="submit"]:hover,
.ffn-popup input[type="submit"]:hover,
.ffn-popup button[type="submit"]:hover {
  background: var(--red-dark) !important;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  margin-top: 80px;
  padding: 56px 24px 32px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo-text { font-size: 20px; color: #fff; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 6px; }
.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-nav-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
}
.footer-nav-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-nav-col a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.footer-nav-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ═══════════════════════════════════════════════════════════
   WORDPRESS CORE OVERRIDES
   ═══════════════════════════════════════════════════════════ */
/* Yoast breadcrumb */
.yoast-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.yoast-breadcrumb a { color: var(--red); }
.yoast-breadcrumb a:hover { text-decoration: underline; }

/* WP caption */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; }

/* Gutenberg embed */
.wp-block-embed { margin: 1.5em 0; }
.wp-block-embed iframe { border-radius: var(--radius); }

/* Gutenberg callout */
.wp-block-pullquote {
  border-top: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  padding: 20px 0;
  margin: 2em 0;
  text-align: center;
}
.wp-block-pullquote blockquote { border: none; background: transparent; padding: 0; }
.wp-block-pullquote p { font-size: 1.25rem; font-style: italic; color: var(--dark); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-featured { grid-column: span 2; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .primary-nav, .header-search { display: none; }
  .nav-hamburger { display: flex; }

  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .card-featured { grid-column: span 1; flex-direction: column; }
  .card-featured .card-thumbnail,
  .card-featured .card-no-image { width: 100%; min-width: unset; aspect-ratio: 16/9; }

  .page-hero { padding: 32px 20px 28px; }
  .site-main { padding: 28px 20px 48px; }
  .post-container { padding: 28px 20px 48px; }

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

  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 4px; }

  .post-body .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }
  .post-body .alignfull { margin-left: -20px; margin-right: -20px; max-width: calc(100% + 40px); }
  .post-body .alignleft, .post-body .alignright { float: none; margin: 0 0 1em 0; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 18px; }
  .header-inner { padding: 0 16px; }
  .post-title { font-size: 1.6rem; }
}

@media (max-width: 390px) {
  .ffn-form-row { flex-direction: column; gap: 10px; }
  .ffn-submit-btn { width: 100%; }
  .post-title { font-size: 1.4rem; }
  .archive-title { font-size: 1.5rem; }
  .header-inner { gap: 4px; }
  .site-main { padding: 20px 16px 40px; }
  .post-container { padding: 20px 16px 40px; }
}

/* ═══════════════════════════════════════════════════════════
   FFN NEWSLETTER FORM OVERRIDES
   Forces correct sizing/colors regardless of plugin CSS load order
   ═══════════════════════════════════════════════════════════ */
.ffn-form-row {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.ffn-email-input {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  padding: 14px 18px !important;
  font-size: 16px !important;
  border-radius: 6px !important;
  border: 1.5px solid #E0D9CE !important;
  background: #fff !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
}
.ffn-email-input:focus {
  outline: none !important;
  border-color: #C40001 !important;
  box-shadow: 0 0 0 2px rgba(196,0,1,0.15) !important;
}
.ffn-submit-btn {
  flex-shrink: 0 !important;
  padding: 14px 24px !important;
  background: #C40001 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.ffn-submit-btn:hover { background: #a30001 !important; }
/* Popup-specific: full-width stacked layout */
.ffn-nl-modal .ffn-email-input,
.ffn-popup-box .ffn-email-input { width: 100% !important; margin-bottom: 10px !important; }
.ffn-nl-modal .ffn-submit-btn,
.ffn-popup-box .ffn-submit-btn { width: 100% !important; }
