/* ==========================================================================
   HEROIC 3.0 — Template styles
   Listing templates (search, archive, taxonomy, blog index) + 404.
   Reuses .hrc-post-card / .hrc-post-card-grid from style.css and the
   --hrc-* design tokens from DW Tools global_css. Loaded site-wide via
   utilities/template-styles.php.
   ========================================================================== */

/* --- Listing shell (search / archive / taxonomy / home) --------------- */
.hrc-listing {
  padding-block: calc(72px + var(--hrc-space-2xl, 3rem)) var(--hrc-space-4xl, 6rem);
  background: var(--hrc-white, #ffffff);
}
.hrc-listing__container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--hrc-space-lg, 1.75rem);
}

/* --- Listing / search / archive header -------------------------------- */
.hrc-listing-header {
  margin-bottom: var(--hrc-space-2xl, 3rem);
}
.hrc-listing-header__eyebrow {
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hrc-primary, #ba0202);
  margin: 0 0 10px;
}
.hrc-listing-header__title {
  font-family: var(--hrc-font-heading, sans-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--hrc-text-heading, #1d1d1d);
  margin: 0;
}
.hrc-listing-header__title span { color: var(--hrc-primary, #ba0202); }
.hrc-listing-header__desc {
  margin-top: var(--hrc-space-sm, 0.75rem);
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--hrc-text-muted, #666);
  max-width: 60ch;
}

/* --- Pagination (the_posts_pagination) -------------------------------- */
.hrc-pagination { margin-top: var(--hrc-space-2xl, 3rem); }
.hrc-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hrc-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--hrc-text-body, #454545);
  background: var(--hrc-white, #fff);
  border: 1px solid var(--hrc-border, #e2e8f0);
  border-radius: var(--hrc-radius-md, 4px);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.hrc-pagination .page-numbers:hover {
  border-color: var(--hrc-primary, #ba0202);
  color: var(--hrc-primary, #ba0202);
}
.hrc-pagination .page-numbers.current {
  background: var(--hrc-primary, #ba0202);
  border-color: var(--hrc-primary, #ba0202);
  color: var(--hrc-white, #fff);
}
.hrc-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* --- Empty state (content-none) --------------------------------------- */
.hrc-empty {
  text-align: center;
  max-width: 520px;
  margin-inline: auto;
  padding-block: var(--hrc-space-2xl, 3rem);
}
.hrc-empty__title {
  font-family: var(--hrc-font-heading, sans-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--hrc-text-heading, #1d1d1d);
  margin: 0 0 var(--hrc-space-sm, 0.75rem);
}
.hrc-empty__text {
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--hrc-text-muted, #666);
  margin: 0 0 var(--hrc-space-lg, 1.5rem);
}
.hrc-empty .hrc-btn { margin-top: var(--hrc-space-lg, 1.5rem); }

/* --- Search form (searchform.php / get_search_form) ------------------- */
.hrc-search-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin-inline: auto;
}
.hrc-search-form__field { position: relative; flex: 1; }
.hrc-search-form input[type="search"] {
  width: 100%;
  font-family: var(--hrc-font-body, sans-serif);
  font-size: 0.95rem;
  padding: 0.8em 1.1em;
  border: 1px solid var(--hrc-border, #e2e8f0);
  border-radius: var(--hrc-radius-full, 9999px);
  background: var(--hrc-white, #fff);
  color: var(--hrc-text-body, #454545);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hrc-search-form input[type="search"]:focus {
  border-color: var(--hrc-primary, #ba0202);
  box-shadow: 0 0 0 3px rgba(186, 2, 2, 0.12);
}
.hrc-search-form button {
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8em 1.7em;
  background: var(--hrc-primary, #ba0202);
  color: var(--hrc-white, #fff);
  border: 0;
  border-radius: var(--hrc-radius-full, 9999px);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}
.hrc-search-form button:hover { background: var(--hrc-primary-dark, #8a0101); }

/* --- 404 -------------------------------------------------------------- */
.hrc-404 {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: var(--hrc-white, #ffffff);
  padding-block: calc(72px + var(--hrc-space-3xl, 4rem)) var(--hrc-space-4xl, 6rem);
  background:
    radial-gradient(ellipse at 50% 18%, rgba(30, 120, 220, 0.45) 0%, rgba(20, 80, 180, 0.15) 42%, transparent 72%),
    linear-gradient(180deg, var(--hrc-color-bg-navy, #0b0e1a) 0%, #0d1025 100%);
}
.hrc-404__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline: auto;
  padding-inline: var(--hrc-space-lg, 1.75rem);
}
.hrc-404__code {
  font-family: var(--hrc-font-display, 'Anton', sans-serif);
  font-weight: 400;
  font-size: clamp(5rem, 3rem + 13vw, 10rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--hrc-white, #fff);
  text-shadow: 0 0 40px rgba(46, 163, 242, 0.25);
}
.hrc-404__title {
  font-family: var(--hrc-font-heading, sans-serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.25rem);
  line-height: 1.2;
  color: var(--hrc-white, #fff);
  margin: var(--hrc-space-md, 1rem) 0 var(--hrc-space-sm, 0.75rem);
}
.hrc-404__text {
  font-family: var(--hrc-font-body, sans-serif);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
  margin: 0 auto;
}
.hrc-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: var(--hrc-space-xl, 2rem);
}
.hrc-404__search { margin-top: var(--hrc-space-xl, 2rem); }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 600px) {
  .hrc-search-form { flex-direction: column; }
  .hrc-search-form button { width: 100%; }
}

/* --- Screen-reader-only text (e.g. the "Posts pagination" heading) ---- */
.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 !important;
  width: 1px;
  word-wrap: normal !important;
}
