/*
Theme Name: Editorial Pulse
Theme URI: https://example.com/editorial-pulse
Author: Editorial Pulse
Author URI: https://example.com
Description: A premium full-width editorial blogging theme for modern online publications. Clean, spacious, highly readable magazine-style layout with sophisticated typography and refined accents.
Version: 1.3.7
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: editorial-pulse
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template, one-column, two-columns, right-sidebar, sticky-post, theme-options, editor-style, wide-blocks
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  --ep-color-text: #111111;
  --ep-color-text-muted: #6B6B6B;
  --ep-color-bg: #FAF9F7;
  --ep-color-bg-elevated: #FFFFFF;
  --ep-color-border: #E8E6E1;
  --ep-color-accent: #1A3A5C;
  --ep-color-accent-hover: #0F2840;
  --ep-color-accent-soft: rgba(26, 58, 92, 0.08);
  --ep-color-placeholder-1: #2C3E50;
  --ep-color-placeholder-2: #8B7355;
  --ep-font-heading: "Fraunces", "Georgia", "Times New Roman", serif;
  --ep-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ep-space-xs: 0.5rem;
  --ep-space-sm: 1rem;
  --ep-space-md: 1.5rem;
  --ep-space-lg: 2.5rem;
  --ep-space-xl: 4rem;
  --ep-space-2xl: 6rem;
  --ep-radius: 4px;
  --ep-radius-lg: 8px;
  --ep-shadow-sm: 0 1px 3px rgba(17, 17, 17, 0.06);
  --ep-shadow-md: 0 4px 20px rgba(17, 17, 17, 0.08);
  --ep-shadow-header: 0 2px 12px rgba(17, 17, 17, 0.08);
  --ep-max-content: 720px;
  --ep-max-wide: 1280px;
  --ep-header-height: 72px;
  --ep-transition: 0.25s ease;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ep-font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.7;
  color: var(--ep-color-text);
  background-color: var(--ep-color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

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

a:hover, a:focus {
  color: var(--ep-color-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--ep-color-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ep-font-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--ep-space-sm);
  color: var(--ep-color-text);
}

h1 { font-size: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 var(--ep-space-md); }

ul, ol { margin: 0 0 var(--ep-space-md); padding-left: 1.5rem; }

blockquote {
  margin: var(--ep-space-lg) 0;
  padding: var(--ep-space-md) var(--ep-space-lg);
  border-left: 3px solid var(--ep-color-accent);
  font-family: var(--ep-font-heading);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ep-color-text);
  background: var(--ep-color-accent-soft);
}

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

hr {
  border: none;
  border-top: 1px solid var(--ep-color-border);
  margin: var(--ep-space-lg) 0;
}

figure { margin: 0 0 var(--ep-space-md); }
figcaption {
  font-size: 0.875rem;
  color: var(--ep-color-text-muted);
  margin-top: var(--ep-space-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--ep-space-md);
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--ep-color-border);
  text-align: left;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.ep-container {
  width: 100%;
  max-width: var(--ep-max-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  overflow-x: clip;
}

.ep-container--narrow {
  max-width: var(--ep-max-content);
}

.ep-full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

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

.screen-reader-text:focus {
  background: var(--ep-color-bg-elevated);
  clip: auto !important;
  clip-path: none;
  color: var(--ep-color-text);
  display: block;
  font-size: 0.875rem;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--ep-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  border-radius: var(--ep-radius);
  cursor: pointer;
  transition: all var(--ep-transition);
  text-decoration: none;
}

.ep-btn--primary {
  background: var(--ep-color-accent);
  color: #fff;
  border-color: var(--ep-color-accent);
}

.ep-btn--primary:hover,
.ep-btn--primary:focus {
  background: var(--ep-color-accent-hover);
  border-color: var(--ep-color-accent-hover);
  color: #fff;
}

.ep-btn--outline {
  background: transparent;
  color: var(--ep-color-accent);
  border-color: var(--ep-color-accent);
}

.ep-btn--outline:hover,
.ep-btn--outline:focus {
  background: var(--ep-color-accent);
  color: #fff;
}

.ep-btn--ghost {
  background: transparent;
  color: var(--ep-color-text);
  border-color: var(--ep-color-border);
}

.ep-btn--ghost:hover {
  border-color: var(--ep-color-text);
  color: var(--ep-color-text);
}

.ep-btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--ep-transition), border-color var(--ep-transition);
}

.site-header.is-scrolled {
  box-shadow: var(--ep-shadow-header);
  border-bottom-color: var(--ep-color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--ep-header-height);
  gap: var(--ep-space-md);
}

.site-branding {
  flex-shrink: 0;
}

.site-title {
  margin: 0;
  font-family: var(--ep-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-title a {
  color: var(--ep-color-text);
  text-decoration: none;
  margin-right: -0.28em;
}

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

.custom-logo-link { display: block; }
.custom-logo {
  max-height: 40px;
  width: auto;
}

.site-description {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--ep-color-text-muted);
  font-weight: 400;
}

.primary-nav {
  display: none;
  flex: 1;
  justify-content: center;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ep-color-text);
  letter-spacing: 0.01em;
  border-radius: var(--ep-radius);
  transition: background var(--ep-transition), color var(--ep-transition);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--ep-color-accent);
  background: var(--ep-color-accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-search-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  cursor: pointer;
  color: var(--ep-color-text);
  transition: all var(--ep-transition);
}

.header-search-toggle:hover,
.menu-toggle:hover {
  border-color: var(--ep-color-text);
  background: var(--ep-color-bg-elevated);
}

.header-search-toggle svg,
.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.header-cta {
  display: none;
}

.header-search-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ep-color-bg-elevated);
  border-bottom: 1px solid var(--ep-color-border);
  padding: var(--ep-space-md) 0;
  box-shadow: var(--ep-shadow-md);
}

.header-search-panel.is-open { display: block; }

.header-search-panel .search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 0.5rem;
}

.header-search-panel .search-field {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--ep-font-body);
  border: 1.5px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  background: var(--ep-color-bg);
  color: var(--ep-color-text);
}

.header-search-panel .search-field:focus {
  outline: none;
  border-color: var(--ep-color-accent);
}

.header-search-panel .search-submit {
  padding: 0.875rem 1.5rem;
  background: var(--ep-color-accent);
  color: #fff;
  border: none;
  border-radius: var(--ep-radius);
  font-weight: 500;
  cursor: pointer;
  font-family: var(--ep-font-body);
}

.header-search-panel .search-submit:hover {
  background: var(--ep-color-accent-hover);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ep-color-bg-elevated);
  border-bottom: 1px solid var(--ep-color-border);
  padding: var(--ep-space-md);
  box-shadow: var(--ep-shadow-md);
  max-height: calc(100vh - var(--ep-header-height));
  overflow-y: auto;
}

.mobile-nav.is-open { display: block; }

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

.mobile-nav a {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ep-color-text);
  border-bottom: 1px solid var(--ep-color-border);
}

.mobile-nav a:hover { color: var(--ep-color-accent); }

.mobile-nav .header-cta-mobile {
  margin-top: var(--ep-space-md);
  width: 100%;
}

@media (min-width: 900px) {
  .primary-nav { display: flex; }
  .menu-toggle { display: none; }
  .header-cta { display: inline-flex; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.ep-hero {
  padding: var(--ep-space-xl) 0 var(--ep-space-lg);
}

.ep-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-lg);
  align-items: center;
}

.ep-hero__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--ep-radius-lg);
  background: #e8e6e1;
}

.ep-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.ep-hero:hover .ep-hero__media img {
  transform: scale(1.03);
}

.ep-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--ep-space-sm);
}

.ep-hero__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-color-accent);
}

.ep-hero__title {
  margin: 0;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  line-height: 1.15;
}

.ep-hero__title a {
  color: var(--ep-color-text);
  text-decoration: none;
}

.ep-hero__title a:hover { color: var(--ep-color-accent); }

.ep-hero__excerpt {
  font-size: 1.125rem;
  color: var(--ep-color-text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 540px;
}

.ep-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--ep-color-text-muted);
}

.ep-hero__meta .author-name {
  font-weight: 500;
  color: var(--ep-color-text);
}

.ep-hero__cta { margin-top: var(--ep-space-xs); }

@media (min-width: 900px) {
  .ep-hero__grid {
    grid-template-columns: 1.15fr 1fr;
    gap: var(--ep-space-xl);
  }
  .ep-hero__media { aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   Category Strip
   ========================================================================== */
.ep-category-strip {
  padding: var(--ep-space-md) 0;
  border-top: 1px solid var(--ep-color-border);
  border-bottom: 1px solid var(--ep-color-border);
  margin-bottom: var(--ep-space-xl);
}

.ep-category-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.ep-category-strip__list a {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ep-color-text-muted);
  border: 1px solid var(--ep-color-border);
  border-radius: 999px;
  background: var(--ep-color-bg-elevated);
  transition: all var(--ep-transition);
}

.ep-category-strip__list a:hover,
.ep-category-strip__list a.is-active {
  color: #fff;
  background: var(--ep-color-accent);
  border-color: var(--ep-color-accent);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.ep-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: visible;
  padding: var(--ep-space-lg) 0;
}

.ep-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ep-space-md);
  margin-bottom: var(--ep-space-lg);
  padding-bottom: var(--ep-space-sm);
  border-bottom: 1px solid var(--ep-color-border);
}

.ep-section__title {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ep-section__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ep-color-accent);
  white-space: nowrap;
}

.ep-section__link:hover { text-decoration: underline; }

/* ==========================================================================
   Post Cards
   ========================================================================== */
.ep-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  transition: transform var(--ep-transition);
}

.ep-card:hover { transform: translateY(-2px); }

.ep-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--ep-radius-lg);
  background: #e8e6e1;
  margin-bottom: var(--ep-space-sm);
}

.ep-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ep-card:hover .ep-card__media img {
  transform: scale(1.04);
}

.ep-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--ep-color-placeholder-1) 0%, var(--ep-color-placeholder-2) 100%);
  opacity: 0.85;
}


/* ==========================================================================
   Reading-time badge on images
   ========================================================================== */
.ep-card__media,
.ep-hero__media,
.single-featured__media {
  position: relative;
}

.ep-read-badge {
  display: none; /* reading time moved to byline meta in 1.1.0 */
}

.ep-card--sm .ep-read-badge,
.ep-card--horizontal .ep-read-badge {
  left: 0.6rem;
  bottom: 0.6rem;
  font-size: 0.6875rem;
  padding: 0.3rem 0.65rem;
}

.ep-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.ep-card__category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ep-color-accent);
}

.ep-card__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.ep-card__title a {
  color: var(--ep-color-text);
  text-decoration: none;
}

.ep-card__title a:hover { color: var(--ep-color-accent); }

.ep-card__excerpt {
  font-size: 0.9375rem;
  color: var(--ep-color-text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--ep-color-text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
}

.ep-card--featured .ep-card__media { aspect-ratio: 16 / 9; }
.ep-card--featured .ep-card__title { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
.ep-card--featured .ep-card__excerpt { font-size: 1.0625rem; -webkit-line-clamp: 4; }

.ep-card--horizontal {
  flex-direction: row;
  gap: var(--ep-space-md);
  align-items: stretch;
  min-width: 0;
  width: 100%;
  height: auto;
}

.ep-card--horizontal .ep-card__media {
  flex: 0 0 auto;
  width: 140px;
  max-width: 40%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0;
}

.ep-card--horizontal .ep-card__body {
  min-width: 0;
  overflow: hidden;
  justify-content: center;
}

.ep-card--horizontal .ep-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-card--horizontal .ep-card__excerpt {
  -webkit-line-clamp: 2;
}

.ep-card--sm .ep-card__title { font-size: 1.0625rem; }
.ep-card--sm .ep-card__media { aspect-ratio: 3 / 2; }

@media (max-width: 599px) {
  .ep-card--horizontal { flex-direction: column; }
  .ep-card--horizontal .ep-card__media {
    flex: none;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: var(--ep-space-sm);
  }
}

/* ==========================================================================
   Grids
   ========================================================================== */
.ep-grid {
  display: grid;
  gap: var(--ep-space-lg);
}

.ep-grid--2 {
  grid-template-columns: 1fr;
}

.ep-grid--3 {
  grid-template-columns: 1fr;
}

.ep-grid--magazine {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-lg);
}

@media (min-width: 600px) {
  .ep-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .ep-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .ep-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .ep-grid--magazine {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-flow: row dense;
    align-items: start;
    gap: var(--ep-space-lg);
  }
  .ep-grid--magazine .ep-card:nth-child(1) {
    grid-column: 1 / span 7;
    grid-row: 1 / span 2;
  }
  .ep-grid--magazine .ep-card:nth-child(2) {
    grid-column: 8 / span 5;
    grid-row: 1;
  }
  .ep-grid--magazine .ep-card:nth-child(3) {
    grid-column: 8 / span 5;
    grid-row: 2;
  }
  .ep-grid--magazine .ep-card:nth-child(n+4) {
    grid-column: span 4;
    grid-row: auto;
  }
}

/* Featured row */
.ep-featured-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-lg);
  width: 100%;
  max-width: 100%;
  margin-bottom: var(--ep-space-xl);
  align-items: start;
}

.ep-featured-row__primary,
.ep-featured-row__secondary {
  min-width: 0;
}

.ep-featured-row__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--ep-space-lg);
}

.ep-featured-row__secondary .ep-card {
  height: auto;
  position: relative;
}

@media (min-width: 900px) {
  .ep-featured-row {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--ep-space-xl);
  }
}

/* ==========================================================================
   Newsletter
   ========================================================================== */
.ep-newsletter {
  padding: var(--ep-space-xl) 0;
  background: var(--ep-color-accent);
  color: #fff;
  margin: var(--ep-space-xl) 0 0;
}

.ep-newsletter__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.ep-newsletter__title {
  color: #fff;
  margin-bottom: var(--ep-space-xs);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
}

.ep-newsletter__text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--ep-space-md);
  font-size: 1.0625rem;
}

.ep-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.ep-newsletter__form input[type="email"] {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--ep-font-body);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--ep-radius);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ep-newsletter__form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.ep-newsletter__form input[type="email"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.ep-newsletter__form button {
  padding: 0.875rem 1.75rem;
  background: #fff;
  color: var(--ep-color-accent);
  border: none;
  border-radius: var(--ep-radius);
  font-family: var(--ep-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ep-transition);
  white-space: nowrap;
}

.ep-newsletter__form button:hover {
  background: var(--ep-color-bg);
  transform: translateY(-1px);
}

.ep-newsletter__note {
  margin-top: var(--ep-space-sm);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 600px) {
  .ep-newsletter__form {
    flex-direction: row;
  }
}

/* Inline newsletter variant */
.ep-newsletter--inline {
  background: var(--ep-color-accent-soft);
  color: var(--ep-color-text);
  border-radius: var(--ep-radius-lg);
  margin: var(--ep-space-xl) 0;
  padding: var(--ep-space-lg);
}

.ep-newsletter--inline .ep-newsletter__title { color: var(--ep-color-text); }
.ep-newsletter--inline .ep-newsletter__text { color: var(--ep-color-text-muted); }
.ep-newsletter--inline .ep-newsletter__form input[type="email"] {
  background: var(--ep-color-bg-elevated);
  border-color: var(--ep-color-border);
  color: var(--ep-color-text);
}
.ep-newsletter--inline .ep-newsletter__form input[type="email"]::placeholder {
  color: var(--ep-color-text-muted);
}
.ep-newsletter--inline .ep-newsletter__form button {
  background: var(--ep-color-accent);
  color: #fff;
}
.ep-newsletter--inline .ep-newsletter__note { color: var(--ep-color-text-muted); }

/* ==========================================================================
   About / Author Section
   ========================================================================== */
.ep-about {
  padding: var(--ep-space-xl) 0;
}

.ep-about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-lg);
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.ep-about__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--ep-color-placeholder-1), var(--ep-color-placeholder-2));
}

.ep-about__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-about__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-color-accent);
  margin-bottom: 0.5rem;
}

.ep-about__name {
  margin: 0 0 var(--ep-space-sm);
}

.ep-about__bio {
  color: var(--ep-color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 700px) {
  .ep-about__inner {
    grid-template-columns: auto 1fr;
    text-align: left;
    gap: var(--ep-space-xl);
  }
  .ep-about__avatar { margin: 0; }
  .ep-about__bio { margin-left: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ep-color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--ep-space-xl) 0 var(--ep-space-lg);
  margin-top: var(--ep-space-2xl);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--ep-transition);
}

.site-footer a:hover { color: #fff; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-lg);
  margin-bottom: var(--ep-space-xl);
}

.site-footer__brand .site-title {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: var(--ep-space-sm);
}

.site-footer__brand .site-title a { color: #fff; }

.site-footer__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0;
  max-width: 320px;
}

.site-footer__heading {
  color: #fff;
  font-family: var(--ep-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--ep-space-sm);
}

.site-footer__nav ul,
.site-footer__cats ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav li,
.site-footer__cats li {
  margin-bottom: 0.5rem;
}

.site-footer__nav a,
.site-footer__cats a {
  font-size: 0.9375rem;
}

.site-footer__social {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--ep-transition);
}

.site-footer__social a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.site-footer__social svg {
  width: 16px;
  height: 16px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--ep-space-sm);
  padding-top: var(--ep-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
}

@media (min-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--ep-space-xl);
  }
}

/* ==========================================================================
   Single Post
   ========================================================================== */
.single-header {
  padding: var(--ep-space-xl) 0 var(--ep-space-md);
  text-align: center;
}

.single-header__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-color-accent);
  margin-bottom: var(--ep-space-sm);
}

.single-header__title {
  margin: 0 0 var(--ep-space-sm);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.single-header__subtitle {
  font-family: var(--ep-font-body);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.35rem);
  font-weight: 400;
  color: var(--ep-color-text-muted);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto var(--ep-space-md);
}

.single-header__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ep-color-text-muted);
}

.single-header__meta .author-name {
  font-weight: 500;
  color: var(--ep-color-text);
}

.single-featured {
  margin-bottom: var(--ep-space-xl);
}

.single-featured__media {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(135deg, var(--ep-color-placeholder-1), var(--ep-color-placeholder-2));
}

.single-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .single-featured__media {
    border-radius: var(--ep-radius-lg);
    max-width: var(--ep-max-wide);
    margin: 0 auto;
  }
}

.entry-content {
  max-width: var(--ep-max-content);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  font-size: 1.125rem;
  line-height: 1.8;
}

.entry-content > *:first-child { margin-top: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--ep-space-lg);
  margin-bottom: var(--ep-space-sm);
}

.entry-content p { margin-bottom: 1.5em; }

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.entry-content a:hover {
  text-decoration-thickness: 2px;
}

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

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

.entry-content img {
  border-radius: var(--ep-radius);
  margin: var(--ep-space-lg) 0;
}

.entry-content .alignwide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

.entry-content .wp-block-quote,
.entry-content blockquote {
  margin: var(--ep-space-xl) 0;
  padding: var(--ep-space-md) var(--ep-space-lg);
  border-left: 3px solid var(--ep-color-accent);
  font-family: var(--ep-font-heading);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.45;
  background: var(--ep-color-accent-soft);
  border-radius: 0 var(--ep-radius) var(--ep-radius) 0;
}

.entry-content .wp-block-pullquote {
  border: none;
  border-top: 2px solid var(--ep-color-accent);
  border-bottom: 2px solid var(--ep-color-accent);
  padding: var(--ep-space-lg) 0;
  margin: var(--ep-space-xl) 0;
  text-align: center;
}

.entry-content .wp-block-pullquote blockquote {
  border: none;
  background: none;
  padding: 0;
  font-size: 1.6rem;
}

.entry-content .wp-block-image figcaption,
.entry-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--ep-color-text-muted);
}

.entry-content pre {
  background: #1a1a1a;
  color: #f0f0f0;
  padding: var(--ep-space-md);
  border-radius: var(--ep-radius);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.entry-content code {
  font-size: 0.875em;
  background: var(--ep-color-accent-soft);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.entry-content pre code {
  background: none;
  padding: 0;
}

.entry-tags {
  max-width: var(--ep-max-content);
  margin: var(--ep-space-lg) auto 0;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entry-tags a {
  display: inline-block;
  padding: 0.35rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ep-color-text-muted);
  background: var(--ep-color-bg-elevated);
  border: 1px solid var(--ep-color-border);
  border-radius: 999px;
  transition: all var(--ep-transition);
}

.entry-tags a:hover {
  color: var(--ep-color-accent);
  border-color: var(--ep-color-accent);
}

/* Post navigation */
.post-navigation {
  max-width: var(--ep-max-content);
  margin: var(--ep-space-xl) auto;
  padding: var(--ep-space-lg) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--ep-color-border);
  border-bottom: 1px solid var(--ep-color-border);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-md);
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ep-space-md);
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ep-color-text-muted);
  margin-bottom: 0.35rem;
}

.post-navigation .nav-title {
  font-family: var(--ep-font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ep-color-text);
  line-height: 1.35;
}

.post-navigation a:hover .nav-title { color: var(--ep-color-accent); }

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

/* Related posts */
.ep-related {
  padding: var(--ep-space-xl) 0;
}

.ep-related .ep-section__header {
  max-width: var(--ep-max-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

/* Author box */
.ep-author-box {
  max-width: var(--ep-max-content);
  margin: var(--ep-space-xl) auto;
  padding: var(--ep-space-lg) clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--ep-space-md);
  align-items: start;
  background: var(--ep-color-bg-elevated);
  border: 1px solid var(--ep-color-border);
  border-radius: var(--ep-radius-lg);
}

.ep-author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ep-color-placeholder-1), var(--ep-color-placeholder-2));
  flex-shrink: 0;
}

.ep-author-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-author-box__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-color-text-muted);
  margin-bottom: 0.25rem;
}

.ep-author-box__name {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.ep-author-box__name a { color: var(--ep-color-text); }
.ep-author-box__name a:hover { color: var(--ep-color-accent); }

.ep-author-box__bio {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ep-color-text-muted);
  line-height: 1.6;
}

@media (max-width: 500px) {
  .ep-author-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .ep-author-box__avatar { margin: 0 auto; }
}

/* ==========================================================================
   Archive / Search / Page
   ========================================================================== */
.page-header {
  padding: var(--ep-space-xl) 0 var(--ep-space-lg);
  text-align: center;
  border-bottom: 1px solid var(--ep-color-border);
  margin-bottom: var(--ep-space-xl);
}

.page-header--archive {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--ep-space-lg);
}

.page-header__title {
  margin: 0 0 var(--ep-space-sm);
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-header__desc {
  color: var(--ep-color-text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.65;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--ep-space-md);
  max-width: 100%;
}

.archive-featured {
  margin-bottom: var(--ep-space-xl);
  min-width: 0;
  width: 100%;
}

.archive-content {
  padding-bottom: var(--ep-space-xl);
  overflow-x: clip;
}

/* Pagination */
.ep-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin: var(--ep-space-xl) 0;
  flex-wrap: wrap;
}

.ep-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ep-color-text-muted);
  border: 1px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  background: var(--ep-color-bg-elevated);
  transition: all var(--ep-transition);
}

.ep-pagination .page-numbers:hover,
.ep-pagination .page-numbers.current {
  color: #fff;
  background: var(--ep-color-accent);
  border-color: var(--ep-color-accent);
}

.ep-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

.ep-pagination .page-numbers.dots:hover {
  color: var(--ep-color-text-muted);
  background: transparent;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  max-width: var(--ep-max-content);
  margin: var(--ep-space-xl) auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: var(--ep-space-lg);
  padding-bottom: var(--ep-space-sm);
  border-bottom: 1px solid var(--ep-color-border);
}

.comment-list {
  list-style: none;
  margin: 0 0 var(--ep-space-xl);
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: var(--ep-space-md) 0 0;
  padding-left: var(--ep-space-lg);
  border-left: 2px solid var(--ep-color-border);
}

.comment-body {
  padding: var(--ep-space-md) 0;
  border-bottom: 1px solid var(--ep-color-border);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--ep-space-sm);
  margin-bottom: var(--ep-space-sm);
}

.comment-author .avatar {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

.comment-author .fn {
  font-family: var(--ep-font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9375rem;
}

.comment-author .fn a { color: var(--ep-color-text); }

.comment-metadata {
  font-size: 0.8125rem;
  color: var(--ep-color-text-muted);
}

.comment-content {
  font-size: 0.975rem;
  line-height: 1.65;
}

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

.reply {
  margin-top: 0.5rem;
}

.comment-reply-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ep-color-accent);
}

.comment-respond {
  margin-top: var(--ep-space-lg);
}

.comment-reply-title {
  font-size: 1.35rem;
  margin-bottom: var(--ep-space-md);
}

.comment-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--ep-color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--ep-font-body);
  font-size: 0.975rem;
  border: 1.5px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  background: var(--ep-color-bg-elevated);
  color: var(--ep-color-text);
  margin-bottom: var(--ep-space-sm);
  transition: border-color var(--ep-transition);
}

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

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-form .form-submit { margin-top: var(--ep-space-sm); }

.comment-form .submit {
  display: inline-flex;
  padding: 0.75rem 1.75rem;
  background: var(--ep-color-accent);
  color: #fff;
  border: none;
  border-radius: var(--ep-radius);
  font-family: var(--ep-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ep-transition);
}

.comment-form .submit:hover {
  background: var(--ep-color-accent-hover);
}

.no-comments {
  color: var(--ep-color-text-muted);
  font-style: italic;
}

/* ==========================================================================
   Empty States / 404
   ========================================================================== */
.ep-empty {
  text-align: center;
  padding: var(--ep-space-2xl) var(--ep-space-md);
}

.ep-empty__title {
  margin-bottom: var(--ep-space-sm);
}

.ep-empty__text {
  color: var(--ep-color-text-muted);
  max-width: 440px;
  margin: 0 auto var(--ep-space-md);
}

.error-404 {
  text-align: center;
  padding: var(--ep-space-2xl) 0;
}

.error-404__code {
  font-family: var(--ep-font-heading);
  font-size: clamp(5rem, 4rem + 4vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ep-color-accent);
  opacity: 0.2;
  margin-bottom: var(--ep-space-sm);
}

.error-404__title {
  margin-bottom: var(--ep-space-sm);
}

.error-404__text {
  color: var(--ep-color-text-muted);
  margin-bottom: var(--ep-space-lg);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.error-404 .search-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto var(--ep-space-md);
  gap: 0.5rem;
}

.error-404 .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  font-family: var(--ep-font-body);
  font-size: 1rem;
  background: var(--ep-color-bg-elevated);
}

.error-404 .search-submit {
  padding: 0.75rem 1.25rem;
  background: var(--ep-color-accent);
  color: #fff;
  border: none;
  border-radius: var(--ep-radius);
  font-weight: 500;
  cursor: pointer;
  font-family: var(--ep-font-body);
}

/* ==========================================================================
   Page Template
   ========================================================================== */
.page-content {
  max-width: var(--ep-max-content);
  margin: 0 auto;
  padding: var(--ep-space-xl) clamp(1.25rem, 4vw, 2.5rem);
}

.page-content .entry-title {
  text-align: center;
  margin-bottom: var(--ep-space-lg);
}

/* ==========================================================================
   Widgets (minimal sidebar)
   ========================================================================== */
.widget-area {
  padding: var(--ep-space-lg) 0;
}

.widget {
  margin-bottom: var(--ep-space-lg);
}

.widget-title {
  font-size: 0.875rem;
  font-family: var(--ep-font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--ep-space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ep-color-border);
}

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

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ep-color-border);
  font-size: 0.9375rem;
}

.widget a { color: var(--ep-color-text); }
.widget a:hover { color: var(--ep-color-accent); }

/* ==========================================================================
   Gutenberg / Alignments
   ========================================================================== */
.alignleft {
  float: left;
  margin: 0.5em 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0.5em 0 1em 1.5em;
}

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

.wp-caption {
  max-width: 100%;
}

.wp-block-image { margin: var(--ep-space-lg) 0; }

.has-large-font-size { font-size: 1.5rem; }
.has-huge-font-size { font-size: 2rem; }

/* ==========================================================================
   Misc
   ========================================================================== */
.site-main { min-height: 50vh; }

.sticky-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ep-color-accent);
  color: #fff;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

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

/* Print */
@media print {
  .site-header, .site-footer, .ep-newsletter, .comments-area, .post-navigation {
    display: none;
  }
  body { background: #fff; color: #000; }
  .entry-content { max-width: 100%; }
}

.ep-btn--ghost.is-active,
.archive-filters .is-active {
  background: var(--ep-color-accent);
  color: #fff;
  border-color: var(--ep-color-accent);
}

.ep-empty .search-form,
.page-header .search-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  gap: 0.5rem;
}

.ep-empty .search-field,
.page-header .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--ep-color-border);
  border-radius: var(--ep-radius);
  font-family: var(--ep-font-body);
  font-size: 1rem;
  background: var(--ep-color-bg-elevated);
  color: var(--ep-color-text);
}

.ep-empty .search-submit,
.page-header .search-submit {
  padding: 0.75rem 1.25rem;
  background: var(--ep-color-accent);
  color: #fff;
  border: none;
  border-radius: var(--ep-radius);
  font-weight: 500;
  cursor: pointer;
  font-family: var(--ep-font-body);
}

.ep-empty .search-submit:hover,
.page-header .search-submit:hover {
  background: var(--ep-color-accent-hover);
}

/* ==========================================================================
   Explore the Pathway — category cards
   ========================================================================== */
.ep-pathway-section {
  padding-top: var(--ep-space-xl);
}

.ep-pathway-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ep-space-md);
  width: 100%;
  max-width: 100%;
}

.ep-pathway-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: var(--ep-space-md);
  background: var(--ep-color-bg-elevated);
  border: 1px solid var(--ep-color-border);
  border-radius: var(--ep-radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform var(--ep-transition), box-shadow var(--ep-transition), border-color var(--ep-transition);
}

.ep-pathway-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ep-shadow-md);
  border-color: rgba(26, 58, 92, 0.25);
  text-decoration: none;
  color: inherit;
}

.ep-pathway-card__name {
  font-family: var(--ep-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ep-color-text);
}

.ep-pathway-card__desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ep-color-text-muted);
  flex: 1;
}

.ep-pathway-card__count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ep-color-accent);
  margin-top: 0.25rem;
}

.ep-pathway-card--placeholder {
  opacity: 0.85;
}

.ep-meta-sep {
  opacity: 0.55;
  user-select: none;
}

.ep-read-time {
  white-space: nowrap;
}

/* Responsive: pathway, featured, magazine, single */
@media (min-width: 600px) {
  .ep-pathway-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .ep-pathway-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ep-space-md);
  }
}

@media (max-width: 899px) {
  .ep-featured-row,
  .ep-grid--magazine,
  .ep-pathway-grid,
  .archive-featured,
  .single-featured,
  .ep-hero__grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ep-card,
  .ep-card__body,
  .ep-card__title,
  .ep-hero__title,
  .single-header__title {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .ep-card__media,
  .ep-hero__media,
  .single-featured__media {
    max-width: 100%;
  }

  .single-featured__media {
    aspect-ratio: 16 / 9;
  }

  .archive-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .archive-filters .ep-btn {
    flex: 0 0 auto;
  }
}

@media (max-width: 599px) {
  .ep-section {
    padding: var(--ep-space-md) 0;
  }

  .ep-featured-row__secondary {
    gap: var(--ep-space-md);
  }

  .ep-pathway-card {
    padding: 1.125rem;
  }

  .ep-hero__excerpt {
    font-size: 1rem;
  }

  .single-header {
    padding: var(--ep-space-lg) 0 var(--ep-space-sm);
    text-align: left;
  }

  .single-header__meta {
    justify-content: flex-start;
  }

  .entry-content {
    font-size: 1.0625rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .ep-grid--magazine,
  .ep-grid--3,
  .ep-pathway-grid {
    gap: var(--ep-space-md);
  }
}


/* Desktop primary nav — clean spacing (v1.1.1) */
@media (min-width: 900px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(140px, auto) 1fr minmax(140px, auto);
    align-items: center;
    gap: 1.5rem 2rem;
    min-height: 72px;
  }
  .site-branding {
    justify-self: start;
  }
  .primary-nav {
    display: flex;
    justify-content: center;
    min-width: 0;
  }
  .primary-nav ul.menu,
  .primary-nav .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.15rem 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
  }
  .primary-nav .menu-item {
    margin: 0;
  }
  .primary-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--ep-color-text-muted);
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
  }
  .primary-nav a:hover {
    color: var(--ep-color-text);
    background: var(--ep-color-accent-soft);
  }
  .primary-nav .current-menu-item > a {
    color: var(--ep-color-text);
    background: var(--ep-color-accent-soft);
    font-weight: 600;
  }
  .header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
}

@media (min-width: 900px) {
  .site-footer__grid--three {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.ep-photo-credit {
  margin-top: var(--ep-space-xl);
  padding-top: var(--ep-space-md);
  border-top: 1px solid var(--ep-color-border);
  font-size: 0.8125rem;
  color: var(--ep-color-text-muted);
  line-height: 1.5;
}
.ep-photo-credit a {
  color: var(--ep-color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.single-featured__credit {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--ep-color-text-muted);
  text-align: left;
}

.ep-newsletter__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.ep-newsletter--inline .ep-newsletter__eyebrow {
  color: var(--ep-color-accent);
}
.ep-newsletter-flash {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--ep-radius);
  font-size: 0.9375rem;
}
.ep-newsletter-flash--ok {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.ep-newsletter--inline .ep-newsletter-flash--ok {
  background: var(--ep-color-accent-soft);
  color: var(--ep-color-text);
}
.ep-newsletter-flash--err {
  background: rgba(180, 40, 40, 0.15);
  color: #fff;
}

.site-branding .custom-logo-link img {
  max-height: 52px;
  width: auto;
}
@media (min-width: 900px) {
  .site-branding .custom-logo-link img {
    max-height: 56px;
  }
}

/* Text wordmark */
.site-header .site-title,
.site-footer .site-title,
.site-footer__brand .site-title {
  margin: 0;
  font-family: var(--ep-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}
.site-header .site-title {
  letter-spacing: 0.18em;
}
.site-footer .site-title,
.site-footer__brand .site-title {
  letter-spacing: 0.28em;
}
.site-header .site-title a,
.site-footer .site-title a,
.site-footer__brand .site-title a {
  color: inherit;
  text-decoration: none;
}
.site-header .site-title a {
  margin-right: -0.18em;
}
.site-footer .site-title a,
.site-footer__brand .site-title a {
  margin-right: -0.28em;
}
.site-header .site-title a:hover {
  color: var(--ep-color-accent);
}
.site-footer .site-title,
.site-footer__brand .site-title {
  color: #fff;
}
.site-footer .site-title a,
.site-footer__brand .site-title a {
  color: #fff;
}
