/* -----------------------------------------------------------------------------
 * Default templates: blog index, archives, single post, search, 404.
 *
 * SCAFFOLD DEFAULTS. Every one of these is meant to be rewritten to the site's
 * design during the build. They exist so that a site which never got round to it
 * still ships something presentable instead of unstyled WordPress -- these are
 * the pages nobody designs and everybody eventually lands on.
 *
 * One stylesheet rather than a <style> block per template: the five of them share
 * a card, a page banner and a prose measure, and when that lived inline they had
 * already drifted into two different card designs.
 *
 * Everything reads from the :root tokens in style.css, so setting the palette
 * there restyles all five at once. No FontAwesome -- the kit ships it commented
 * out in header.php, so any icon class here would render as blank space.
 * -------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
 * Page banner
 * -------------------------------------------------------------------------- */
/* Same language as the sanctuaryhero interior hero: estate photo under a navy
   wash, breadcrumbs, terracotta eyebrow, and a short terracotta rule under the
   title so the blog and posts read as part of the site, not a bare band. */
.devq-pagehead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--primary);
  padding: 112px 0 92px;
  color: #fff;
}

.devq-pagehead__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.devq-pagehead__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.devq-pagehead.has-image .devq-pagehead__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0, 28, 54, .95) 0%, rgba(0, 39, 74, .86) 50%, rgba(0, 39, 74, .6) 100%);
}

.devq-pagehead__inner {
  max-width: 760px;
}

/* Single posts: banner text sits on the same 72ch column as the article. */
.devq-pagehead.is-narrow .devq-pagehead__inner {
  max-width: 72ch;
  margin: 0 auto;
  font-size: 1.0625rem;
}

/* Breadcrumbs: the sanctuaryhero block's CSS only loads on pages that use the
   block, so the banner carries its own copy. */
.devq-pagehead__crumbs {
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, .7);
}

.devq-pagehead__crumbs a {
  display: inline-block;
  padding: 4px 0;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
}

.devq-pagehead__crumbs a:hover {
  color: var(--secondary);
}

.devq-pagehead__crumbs .breadcrumb_last {
  color: #fff;
}

.devq-pagehead h1 {
  margin: 0;
  color: #fff;
}

.devq-pagehead h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 22px;
  border-radius: 3px;
  background: var(--secondary);
}

.devq-pagehead .devq-pagehead__eyebrow {
  color: var(--secondary);
}

.devq-pagehead__sub {
  max-width: 60ch;
  margin: var(--spacing-small) 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.devq-pagehead__meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.devq-pagehead__meta span + span::before {
  content: "·";
  margin: 0 8px;
}

@media (max-width: 1199px) {
  .devq-pagehead { padding: 96px 0 80px; }
}

@media (max-width: 767px) {
  .devq-pagehead { padding: 56px 0 48px; }
  .devq-pagehead.has-image .devq-pagehead__media::after { background: rgba(0, 32, 60, .86); }
  .devq-pagehead.is-narrow .devq-pagehead__inner { font-size: 1rem; }
}

/* -----------------------------------------------------------------------------
 * Card grid
 * -------------------------------------------------------------------------- */
/* Top/bottom only: the shorthand used to zero .container's side padding, so on anything narrower
   than the container the cards and post text ran into the screen edge. */
.devq-section {
  padding-top: var(--section-padding-top);
  padding-bottom: var(--section-padding-bottom);
}

.devq-cardgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-medium);
}

.devq-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--button-radius);
  background: #fff;
  transition: var(--transition-default);
}

.devq-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.devq-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.devq-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
}

.devq-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.devq-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--spacing-medium);
}

.devq-card__date {
  color: var(--secondary);
  font-family: var(--font2);
  font-size: 0.85rem;
}

.devq-card__body h2 {
  margin: 8px 0 var(--spacing-small);
  font-size: 1.35rem;
}

.devq-card__excerpt {
  flex: 1;
}

.devq-card__excerpt p {
  margin: 0;
}

.devq-card__more {
  margin-top: var(--spacing-small);
  color: var(--primary);
  font-family: var(--font2);
  font-weight: 600;
}

.devq-card__more::after {
  content: " \2192";
}

/* -----------------------------------------------------------------------------
 * Post body
 * -------------------------------------------------------------------------- */
.devq-prose {
  max-width: 72ch;
  margin: 0 auto;
}

.devq-prose > *:first-child {
  margin-top: 0;
}

.devq-prose img {
  height: auto;
  border-radius: var(--button-radius);
}

/* -----------------------------------------------------------------------------
 * Prev / next
 * -------------------------------------------------------------------------- */
.devq-postnav {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-medium);
  max-width: 72ch;
  margin: var(--spacing-large) auto 0;
  padding-top: var(--spacing-medium);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.devq-postnav a {
  max-width: 45%;
  color: inherit;
  text-decoration: none;
}

/* Keyed to the actual direction, not :last-child -- a post with only a previous
 * link would otherwise have it shoved over to the right. */
.devq-postnav__next {
  margin-left: auto;
  text-align: right;
}

.devq-postnav__label {
  display: block;
  color: var(--secondary);
  font-family: var(--font2);
  font-size: 0.85rem;
}

.devq-postnav__title {
  display: block;
  color: var(--primary);
  font-weight: 600;
}

/* -----------------------------------------------------------------------------
 * Pagination
 * -------------------------------------------------------------------------- */
.devq-pagination {
  margin-top: var(--spacing-large);
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.devq-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.devq-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--button-radius);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: var(--transition-default);
}

.devq-pagination a.page-numbers:hover,
.devq-pagination a.page-numbers:focus-visible {
  border-color: var(--secondary);
  color: var(--terracotta-dark);
}

.devq-pagination .page-numbers.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.devq-pagination .page-numbers.dots {
  min-width: 24px;
  padding: 0;
  border: 0;
  background: none;
}

.devq-pagination .prev,
.devq-pagination .next {
  padding: 8px 20px;
}

/* -----------------------------------------------------------------------------
 * Empty state / search form
 * -------------------------------------------------------------------------- */
.devq-empty {
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}

.devq-searchform {
  display: flex;
  max-width: 480px;
  margin: var(--spacing-medium) auto 0;
}

.devq-searchform .search-field {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-right: 0;
  border-radius: var(--button-radius) 0 0 var(--button-radius);
  font-family: var(--font2);
  font-size: var(--body-size);
}

.devq-searchform .search-submit {
  padding: 10px 20px;
  border: 0;
  border-radius: 0 var(--button-radius) var(--button-radius) 0;
  background: var(--primary);
  color: #fff;
  font-family: var(--font2);
  cursor: pointer;
}

.devq-quicklinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-small);
  margin-top: var(--spacing-large);
}

/* -----------------------------------------------------------------------------
 * Breakpoints -- 1199 and 767, per the kit. Never 991.
 * -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .devq-cardgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .devq-cardgrid {
    grid-template-columns: 1fr;
  }

  .devq-postnav {
    flex-direction: column;
  }

  .devq-postnav a,
  .devq-postnav__next {
    max-width: 100%;
    margin-left: 0;
    text-align: left;
  }
}

/* 404: admissions line above the search box (FHR). */
.fhr-404-call { max-width: 72ch; margin: 0 auto 28px; text-align: center; font-size: 1.1rem; color: var(--primary); }
.fhr-404-call a { font-weight: 800; color: var(--terracotta-dark); white-space: nowrap; }
