/* ============================================================
   Delta Machine & Tool — News section
   archive-news.php · taxonomy-news_*.php · single-news.php
   Loaded after location.css, which supplies the shared sidebar
   cards, FAQ accordion, prose and CTA band styles.
============================================================ */

/* WordPress core pagination heading is visually hidden */
.news-archive .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}


/* ── HERO ────────────────────────────────────────────────── */
.interior-hero.news-hero {
  height: auto;
  min-height: 400px;
  padding-top: 8.5rem;
}
.news-hero .ih-content { padding-bottom: 3rem; }
.news-hero .ih-title { max-width: 20ch; }
.news-hero--single .ih-title.news-title {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  max-width: 26ch;
  line-height: 1.12;
}
.news-hero-sub {
  color: rgba(255,255,255,0.78);
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 1rem 0 0;
}
.news-hero-sub:empty { display: none; }
.news-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.news-hero-meta > * + *::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sky);
  margin-right: 1.25rem;
  vertical-align: middle;
}


/* ── CATEGORY FILTER ─────────────────────────────────────── */
.news-filter { margin-bottom: 2.5rem; }
.news-filter ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.news-filter a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 0.55rem 1rem;
  border-radius: 2px;
  text-decoration: none;
  transition: all var(--t-fast);
}
.news-filter a:hover { border-color: var(--cobalt); color: var(--cobalt); }
.news-filter a.is-active { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }


/* ── CARD GRID ───────────────────────────────────────────── */
.news-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.news-grid > li { display: flex; }

.news-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--t-mid), transform var(--t-mid), border-color var(--t-mid);
}
.news-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-4px); }

.news-card-media {
  display: block;
  text-decoration: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}
.news-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.news-card:hover .news-card-media img { transform: scale(1.04); }

/* Branded panel for articles without a featured image */
.news-card-placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%; height: 100%;
  padding: 1.25rem 1.4rem;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 85% 20%, rgba(36,104,178,0.35) 0%, transparent 55%),
    linear-gradient(rgba(74,144,217,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,217,0.08) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}
.news-card-placeholder::before {
  content: '';
  position: absolute;
  top: 1.25rem; left: 1.4rem;
  width: 36px; height: 3px;
  background: var(--sky);
}
.news-card-placeholder-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.4rem;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  font-size: 0.76rem;
  color: var(--slate);
  margin-bottom: 0.7rem;
}
.news-cat {
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
  text-decoration: none;
}
.news-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.6rem;
}
.news-card-title a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
.news-card-title a:hover { color: var(--cobalt); }
.news-card-excerpt { font-size: 0.88rem; color: var(--slate); line-height: 1.7; margin: 0 0 1.1rem; }
.news-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  text-decoration: none;
  transition: gap var(--t-fast);
}
.news-card-link:hover { gap: 0.7rem; }


/* ── PAGINATION / EMPTY ──────────────────────────────────── */
.news-pagination { margin-top: 3rem; }
.news-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.news-pagination .page-numbers {
  min-width: 2.6rem;
  padding: 0.6rem 0.85rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
}
.news-pagination a.page-numbers:hover { border-color: var(--cobalt); color: var(--cobalt); }
.news-pagination .page-numbers.current { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.news-pagination .page-numbers.dots { background: none; border: 0; }

.news-empty { text-align: center; padding: 3rem 0; }


/* ── SINGLE ARTICLE ──────────────────────────────────────── */
.news-featured { margin: 0 0 2.25rem; }
.news-featured img { width: 100%; height: auto; border-radius: 4px; display: block; }
.news-featured figcaption { font-size: 0.8rem; color: var(--slate); margin-top: 0.6rem; }

.news-content { font-size: 1.02rem; line-height: 1.85; }
.news-content > p:first-child { font-size: 1.12rem; color: var(--ink); }
.news-content h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 2.5rem 0 1rem; color: var(--ink); }
.news-content h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; color: var(--ink); }
.news-content h4 { font-size: 1.02rem; margin: 1.75rem 0 0.6rem; color: var(--ink); }
.news-content img, .news-content figure img { max-width: 100%; height: auto; border-radius: 4px; }
.news-content figure { margin: 2rem 0; }
.news-content figcaption { font-size: 0.8rem; color: var(--slate); margin-top: 0.5rem; }
.news-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--smoke);
  border-left: 3px solid var(--cobalt);
  font-size: 1.08rem;
  color: var(--ink);
}
.news-content blockquote p:last-child { margin-bottom: 0; }
.news-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.news-content th, .news-content td { border: 1px solid var(--rule); padding: 0.65rem 0.85rem; text-align: left; }
.news-content th { background: var(--smoke); color: var(--ink); font-family: var(--font-display); font-weight: 700; }
.news-content .wp-block-table { overflow-x: auto; }

.news-faq { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.news-faq-heading { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: 1.25rem; }

.news-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.news-tags .loc-label { margin: 0; }
.news-faq + .news-tags { border-top: 0; padding-top: 0; }
.news-tags ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.news-tags a {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--smoke);
  border: 1px solid var(--rule);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  text-decoration: none;
  transition: all var(--t-fast);
}
.news-tags a:hover { border-color: var(--cobalt); color: var(--cobalt); }

.news-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}
.news-pn a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color var(--t-fast);
}
.news-pn a:hover { border-color: var(--cobalt); }
.news-pn-next { grid-column: 2; text-align: right; }
.news-pn-dir {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.news-pn-title { font-size: 0.92rem; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* Sidebar lists */
.news-side-list, .news-side-recent { list-style: none; padding: 0; margin: 0; }
.news-side-list li { border-bottom: 1px solid var(--rule); }
.news-side-list li:last-child { border-bottom: 0; }
.news-side-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
}
.news-side-list a:hover { color: var(--cobalt); }
.news-count {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cobalt);
  background: var(--mist);
  padding: 0.1rem 0.5rem;
  border-radius: 2px;
}
.news-side-recent li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.news-side-recent li:first-child { padding-top: 0; }
.news-side-recent li:last-child { border-bottom: 0; padding-bottom: 0; }
.news-side-recent a {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.news-side-recent a:hover { color: var(--cobalt); }
.news-side-recent time { font-size: 0.75rem; color: var(--slate); }


/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
  .interior-hero.news-hero { min-height: 0; padding-top: 7rem; }
}
@media (max-width: 767.98px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-hero .ih-content { padding-bottom: 2.25rem; }
  .news-hero-meta { gap: 0.35rem 1rem; }
  .news-hero-meta > * + *::before { display: none; }
  .news-filter ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; }
  .news-filter a { white-space: nowrap; }
  .news-pn { grid-template-columns: 1fr; }
  .news-pn-next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card-media img { transition: none; }
}
