/*
Theme Name: UBM Scans
Theme URI: https://new.ubmscans.com.au/
Author: Evosion
Description: Brand-matched blog theme for UBM Scans. Reuses the static site's design system so the blog and the marketing pages never drift apart.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ubm
*/

/* The shared design system lives at the site root and is enqueued in
   functions.php. Only blog-specific layout belongs here. */

.blog-main { padding-bottom: var(--sp-10); }

.post-hero {
  background: var(--cream);
  position: relative; overflow: hidden;
  padding-block: clamp(2.25rem, 1.4rem + 3vw, 4rem);
}
.post-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(56% 66% at 88% 6%, var(--blush) 0%, transparent 62%);
  opacity: .8;
}
.post-hero > .container { position: relative; }
.post-hero h1 { max-width: 22ch; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm); margin-bottom: var(--sp-4); align-items: center;
}
.post-meta svg { width: 16px; height: 16px; color: var(--peach); }
.post-meta span { display: inline-flex; align-items: center; gap: .45rem; }

.post-featured {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  margin-bottom: var(--sp-7); aspect-ratio: 16 / 9;
}
.post-featured img { width: 100%; height: 100%; object-fit: cover; }

.entry {
  max-width: 72ch; margin-inline: auto;
  font-size: 1.04rem; line-height: 1.78;
}
.entry > * + * { margin-top: var(--sp-4); }
.entry h2 { font-size: var(--fs-h2); margin-top: var(--sp-8); }
.entry h3 { font-size: var(--fs-h3); margin-top: var(--sp-6); }
.entry img, .entry figure { border-radius: var(--radius); overflow: hidden; }
.entry figcaption { font-size: var(--fs-xs); margin-top: var(--sp-2); opacity: .85; text-align: center; }
.entry a { color: var(--slate); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--peach); text-decoration-thickness: 2px; }
.entry a:hover { text-decoration-thickness: 3px; }
.entry blockquote {
  margin: var(--sp-6) 0; padding: var(--sp-5) var(--sp-6);
  background: var(--blush); border-left: 3px solid var(--peach); border-radius: var(--radius);
  font-family: var(--font-display); font-size: 1.24rem; line-height: 1.5;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry ul, .entry ol { padding-left: 1.3rem; }
.entry code { background: var(--blush); padding: .12em .4em; border-radius: 4px; font-size: .92em; }
.entry table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.entry th, .entry td { padding: .65rem .75rem; border-bottom: 1px solid var(--line-soft); text-align: left; }

.post-grid { display: grid; gap: clamp(1.25rem, .8rem + 1.4vw, 2.25rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: box-shadow var(--dur-mid) var(--ease-out), transform var(--dur-press) var(--ease-out); }
.post-card:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .post-card:hover { box-shadow: var(--shadow-md); } }
.post-card__media { aspect-ratio: 16 / 10; background: var(--blush); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.post-card__body h2 { font-size: var(--fs-h3); margin: 0; }
.post-card__body p { font-size: var(--fs-sm); margin: 0; }
.post-card__date { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }

.pagination { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-8); justify-content: center; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; min-height: 46px; padding: 0 .85rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  text-decoration: none; font-size: var(--fs-sm); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--slate); color: var(--white); border-color: var(--slate); }
@media (hover: hover) and (pointer: fine) { .pagination a.page-numbers:hover { background: var(--blush); border-color: var(--peach); } }

.blog-empty { text-align: center; padding-block: var(--sp-9); }
