/*
Theme Name: The Heath Press
Theme URI: https://theheathpress.net
Author: Wouter de Heij
Author URI: https://theheathnexus.net
Description: A custom WordPress theme for The Heath Press, designed to match The Heath Nexus visual identity. Features a dark engineering-precision aesthetic with blue, green, and orange accent colors, card-based layouts, and modern typography.
Version: 3.10.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-heath-press
Tags: dark, one-column, two-columns, three-columns, custom-menu, featured-images, blog
*/

/* ─── CSS Custom Properties (Design Tokens) ─── */
:root {
  /* Background colors */
  --bg-primary: #0d0e12;
  --bg-secondary: #161719;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-nav: rgba(13, 14, 18, 0.92);

  /* Accent colors */
  --accent-blue: #1A7AB5;
  --accent-green: #7AB648;
  --accent-orange: #F5A623;

  /* Text colors */
  --text-primary: rgba(255, 255, 255, 0.88);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.38);
  --text-faint: rgba(255, 255, 255, 0.18);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-heading: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --container-max: 1280px;
  --container-padding: 2rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
  --glow-blue: 0 0 20px -5px rgba(26, 122, 181, 0.3);
  --glow-green: 0 0 20px -5px rgba(122, 182, 72, 0.3);
  --glow-orange: 0 0 20px -5px rgba(245, 166, 35, 0.3);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1.5em;
  color: var(--text-secondary);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-green);
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

blockquote {
  border-left: 3px solid var(--accent-blue);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

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

/* ─── Container ─── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ─── Header / Navigation ─── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green), var(--accent-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* Custom logo uploaded via WordPress */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  border-radius: 6px;
  display: block;
}

.site-branding .site-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 0;
}

.site-branding .site-title a {
  color: inherit;
}

.site-branding .site-title a:hover {
  color: var(--accent-blue);
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Dropdown submenus */
.main-navigation li {
  position: relative;
}

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 0.5rem;
  z-index: 200;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  flex-direction: column;
  gap: 0;
}

.main-navigation .menu-item-has-children.is-open > .sub-menu {
  display: flex;
}

.main-navigation .sub-menu li {
  display: block;
}

.main-navigation .sub-menu a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  border-radius: 6px;
}

.main-navigation .menu-item-has-children > a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-navigation .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.5;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.main-navigation .menu-item-has-children.is-open > a::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* ─── Hero Section ─── */
.site-hero {
  padding: 10rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-label::before {
  content: '';
  width: 36px;
  height: 1.5px;
  background: var(--accent-blue);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-meta::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border-subtle);
}

/* ─── Section Styling ─── */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label .icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.section-title {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 400;
}

.section-description {
  color: var(--text-muted);
  max-width: 600px;
  margin-top: 1rem;
}

/* Section number watermark */
.section-number {
  position: absolute;
  left: 0;
  top: 2rem;
  font-family: var(--font-heading);
  font-size: clamp(100px, 15vw, 180px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* ─── Post Cards ─── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Dark cards on dark background — matching theheathnexus.net exactly */
.post-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(26, 122, 181, 0.35);
  box-shadow: 0 0 24px -4px rgba(26, 122, 181, 0.20);
  transform: translateY(-2px);
}

.post-card .card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

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

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

.post-card .card-content {
  padding: 1.5rem;
  flex: 1;
}

.post-card .card-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-card .card-meta .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.post-card .card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-card .card-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.post-card .card-title a:hover {
  color: var(--accent-blue);
}

.post-card .card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card .read-more {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.post-card .read-more:hover {
  color: var(--accent-green);
  gap: 0.65rem;
}

.post-card .read-more svg {
  width: 14px;
  height: 14px;
}

/* Category badge */
.category-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(26, 122, 181, 0.10);
  color: var(--accent-blue);
  border: 1px solid rgba(26, 122, 181, 0.20);
}

/* ─── Featured Post (first post larger) ─── */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  flex-direction: unset;
}

.post-card.featured .card-image {
  aspect-ratio: auto;
  min-height: 320px;
}

.post-card.featured .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
}

.post-card.featured .card-title {
  font-size: 1.625rem;
}

.post-card.featured .card-excerpt {
  -webkit-line-clamp: 5;
}

.post-card.featured .card-content {
  background: transparent;
}

/* ─── Single Post ─── */
.single-post-content {
  padding: 7rem 0 4rem;
}

.single-post-content .post-header {
  margin-bottom: 3rem;
}

.single-post-content .post-category {
  margin-bottom: 1rem;
}

.single-post-content .post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.single-post-content .post-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.single-post-content .post-meta .author {
  color: var(--text-secondary);
}

.single-post-content .post-featured-image {
  margin: 2rem -2rem 3rem;
  border-radius: 12px;
  overflow: hidden;
}

.single-post-content .entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.single-post-content .entry-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.single-post-content .entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-post-content .entry-content ul,
.single-post-content .entry-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.single-post-content .entry-content li {
  margin-bottom: 0.5rem;
}

.single-post-content .entry-content a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-content .entry-content a:hover {
  color: var(--accent-green);
}

.single-post-content .entry-content img {
  border-radius: 8px;
  margin: 2rem 0;
}

/* Post navigation */
.post-navigation {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.post-navigation .nav-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.post-navigation a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.post-navigation a:hover {
  color: var(--accent-blue);
}

.post-navigation .nav-next {
  text-align: right;
}

/* ─── Sidebar ─── */
.sidebar {
  padding-top: 2rem;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.widget ul li a:hover {
  color: var(--accent-blue);
}

/* ─── Page Template ─── */
.page-content {
  padding: 0 0 6rem;
}

.page-content .page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

.page-content .entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Gutenberg wide/full blocks break out of the text column */
.page-content .entry-content .alignwide {
  max-width: 100%;
}

.page-content .entry-content .alignfull {
  max-width: 100%;
  margin-left: calc(-1 * var(--container-padding));
  margin-right: calc(-1 * var(--container-padding));
}

/* ─── Page / Archive Header (THN-stijl: — LABEL boven titel) ─── */
.thp-page-header {
  padding: 7rem 0 3rem;
}

.thp-page-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.thp-page-label::before {
  content: '';
  display: block;
  width: 36px;
  height: 1.5px;
  background: var(--accent-blue);
  flex-shrink: 0;
}

.thp-page-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.thp-page-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 0;
  font-weight: 400;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-branding .footer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.footer-social a svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
  background: rgba(26, 122, 181, 0.1);
}

.pagination .current {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* ─── Search ─── */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast);
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.search-form .search-submit {
  background: var(--accent-blue);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: white;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-form .search-submit:hover {
  background: var(--accent-green);
}

/* ─── Comments ─── */
.comments-area {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
}

.comment {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.comment-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.comment-content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.comment-respond .comment-form input,
.comment-respond .comment-form textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  margin-bottom: 1rem;
  transition: border-color var(--transition-fast);
}

.comment-respond .comment-form input:focus,
.comment-respond .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.comment-respond .comment-form .submit {
  background: var(--accent-blue);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.comment-respond .comment-form .submit:hover {
  background: var(--accent-green);
}

/* ─── 404 Page ─── */
.error-404 {
  text-align: center;
  padding: 10rem 0;
}

.error-404 .error-code {
  font-family: var(--font-heading);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-404 h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-404 p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-green);
  color: white;
}

/* ─── Plugin: hpagg / hp-rss card overrides (dark theme) ─── */
.hpagg-card,
.hp-rss-card {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 12px !important;
}

.hpagg-card-title a,
.hpagg-card-title a:visited,
.hpagg-kicker {
  color: var(--text-primary) !important;
}

.hpagg-card-title a:hover {
  color: var(--accent-blue) !important;
}

.hpagg-card-excerpt,
.hpagg-card-meta,
.hpagg-card-meta a {
  color: var(--text-secondary) !important;
}

.hpagg-card-meta a:hover {
  color: var(--accent-blue) !important;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .post-card.featured {
    grid-template-columns: 1fr;
  }

  .post-card.featured .card-image {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  .main-navigation {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 2rem;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid var(--border-subtle);
  }

  .main-navigation.toggled {
    display: flex;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation a {
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Mobile: submenus expand inline */
  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 1rem;
    min-width: auto;
  }

  .main-navigation .menu-item-has-children.is-open > .sub-menu {
    display: flex;
  }

  .main-navigation .sub-menu a {
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    color: var(--text-muted);
  }

  .menu-toggle {
    display: flex;
  }

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

  .site-hero {
    padding: 8rem 0 4rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .single-post-content .post-featured-image {
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

@media (max-width: 480px) {
  .site-hero {
    padding: 7rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }
}

/* ─── WordPress Core Alignment ─── */
.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100% + 4rem);
}

.alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

/* WordPress caption */
.wp-caption {
  margin-bottom: 1.5rem;
}

.wp-caption-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* WordPress gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0;
}

.gallery-item img {
  border-radius: 8px;
}

/* ─── Dark Background Overrides ─── */
/* Force dark background on html/body so no white flash appears */
html {
  background-color: var(--bg-primary);
}

/* Override WordPress & Gutenberg white backgrounds */
.wp-site-blocks,
.wp-block-post-content,
.entry-content,
.entry-content > *,
.wp-block-group,
.wp-block-group__inner-container {
  color: var(--text-primary);
}

.wp-block-group:where(.has-white-background-color),
.wp-block-group:where(.has-background) {
  background-color: var(--bg-card) !important;
}

/* Page template: ensure dark background on wide layouts */
.page .page-content,
.single .single-post-content {
  background-color: transparent;
}

/* Remove any white background applied by block editor to body */
body.page,
body.single,
body.home,
body.blog,
body.archive,
body.search,
body.error404 {
  background-color: var(--bg-primary) !important;
}

/* WordPress admin bar compensation when logged in */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
