/* HQM home (ACF rebuild) — matched to live MEASURED values (not guessed).
   headings #004b8b blue 2px/20px 21px700; featured cards 331x313 (2x2, 15px col
   gap, 0 row gap); top cols 473/697; body main/225px sidebar; promo 915x230. */

.hqm-home {
  --hqm-navy: #0b2a4a;
  --hqm-blue: #004b8b;     /* heading pills + News insights tag */
  --hqm-green: #079907;
  --hqm-ink: #1a1a1a;
  --hqm-title: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --hqm-sans: "Barlow", system-ui, sans-serif;
  color: var(--hqm-ink);
  padding: 25px 0 40px;
}
.hqm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 15px; }  /* usable 1170 = live */

/* ---- Top: cover (473) + featured 2x2 grid (697) ---- */
.hqm-top {
  display: grid;
  grid-template-columns: minmax(0, 473fr) minmax(0, 697fr);
  gap: 15px;
  align-items: start;
}
/* The grid is aspect-locked to the cover IMAGE (724x1024), so its height equals
   the visible cover at ANY width, in ANY browser, with zero scripting/timing.
   ratio = gridTrack/coverTrack x imgW/imgH = (697/473) x (724/1024) = 1.0419.
   overflow:hidden cards can't push it taller. */
.hqm-top__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 15px;
  row-gap: 15px;               /* live has a 15px gap between the two rows */
  aspect-ratio: 1.0419;
}
.hqm-top__grid .hqm-card { min-height: 0; }  /* the aspect-locked rows drive height */

/* ---- Cards ---- */
.hqm-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 232px;
  padding: 16px;
  overflow: hidden;
  text-decoration: none;
  background: var(--hqm-navy) center/cover no-repeat;
  color: #fff;
  isolation: isolate;
}
.hqm-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11,42,74,0) 30%, rgba(8,20,36,0.86) 100%);
}
/* theme colours bare <a> gold — force white */
.hqm-home .hqm-card,
.hqm-home .hqm-card:hover,
.hqm-home .hqm-card:focus,
.hqm-home .hqm-card__title { color: #fff !important; }
.hqm-card__cat {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 8px; background: var(--hqm-green); color: #fff;
  font: 400 14px/1.2 var(--hqm-sans);
}
.hqm-card__title { display: block; font: 500 21px/1.15 var(--hqm-title); text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.hqm-card__meta { display: block; margin-top: 6px; font: 400 12px/1.4 var(--hqm-sans); color: rgba(255,255,255,0.85); }
.hqm-cmt-icon { vertical-align: -1px; margin-right: 2px; opacity: 0.85; }

/* ---- Body: main + 225px sidebar ---- */
.hqm-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
  gap: 15px;
  margin-top: 34px;
}
/* Paddle layout: 2 large cards, then 3 smaller per row (matches old home). */
.hqm-grid { display: grid; gap: 15px; }
.hqm-grid--primary { grid-template-columns: 1fr 1fr; margin-bottom: 15px; }
.hqm-grid--primary .hqm-card { min-height: 300px; }
.hqm-grid--secondary { grid-template-columns: 1fr 1fr 1fr; margin-bottom: 15px; }
.hqm-grid--secondary .hqm-card { min-height: 200px; }
.hqm-card--sm .hqm-card__title { font: 500 17px/1.15 var(--hqm-title); }

/* ---- Headings: blue tab sitting on a 1px blue rule across the column ---- */
.hqm-headwrap {
  border-bottom: 1px solid var(--hqm-blue);
  margin: 0 0 16px;
  line-height: 0;              /* pill sits on the rule, no gap */
}
/* .hqm-home prefix + !important — the theme's h2 typography (42px/600) otherwise
   wins over the class and makes the pills massive. Live = 21px/27.3px/700. */
.hqm-home .hqm-heading {
  display: inline-block;
  vertical-align: bottom;      /* pill bottom aligns with the rule */
  margin: 0;
  padding: 2px 20px;
  background: var(--hqm-blue);
  color: #fff;
  font-family: var(--hqm-title);   /* Previous issues = Barlow Condensed */
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 27.3px !important;
  white-space: nowrap;
}
.hqm-home .hqm-heading--sans { font-family: var(--hqm-sans); }  /* Latest articles = Barlow */

/* ---- Previous issues + archive ---- */
.hqm-prev { display: grid; gap: 18px; }
.hqm-prev__item img { width: 100%; height: auto; display: block; }

/* The covers are <button>s; the theme paints bare buttons black with padding
   (the "black frame"). Kill it hard, and no image border/shadow. */
.hqm-home .hqm-cover {
  background: none !important;
  padding: 0 !important;
  border: 0 !important;
}
.hqm-home .hqm-cover img { border: 0; box-shadow: none; }
.hqm-archive-btn {
  display: block; margin-top: 18px; padding: 11px 16px;
  background: #000; color: #fff; text-align: center; text-decoration: none;
  font: 700 16px/1.3 var(--hqm-title);
}
.hqm-archive-btn:hover { background: var(--hqm-blue); }

/* ---- Sliders (round dots — theme renders bare <button> as dark squares) ---- */
.hqm-slider { position: relative; overflow: hidden; }
.hqm-slider--wide { margin-bottom: 26px; }
.hqm-slider--square { margin-top: 18px; }
.hqm-slider__track { display: flex; transition: transform 0.5s ease; }
.hqm-slider__slide { flex: 0 0 100%; line-height: 0; }
.hqm-slider__slide img { width: 100%; height: auto; display: block; }
.hqm-slider__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 7px; justify-content: center; z-index: 2; }
/* Theme styles bare <button> as a dark padded box — override hard. */
.hqm-home .hqm-slider__dots button {
  -webkit-appearance: none !important; appearance: none !important;
  width: 9px !important; height: 9px !important;
  min-width: 0 !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
  border-radius: 50% !important; background: rgba(255,255,255,0.6) !important;
  box-shadow: none !important; line-height: 0 !important; cursor: pointer;
}
.hqm-home .hqm-slider__dots button[aria-current="true"] { background: #fff !important; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hqm-top { grid-template-columns: 1fr; }
  .hqm-top__cover { max-width: 360px; margin: 0 auto; }
  .hqm-top__grid { aspect-ratio: auto; grid-template-rows: auto; }
  .hqm-top__grid .hqm-card { min-height: 232px; }
  .hqm-body { grid-template-columns: 1fr; }
  .hqm-body__side { max-width: 360px; }
  .hqm-grid--secondary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hqm-top__grid, .hqm-grid--primary, .hqm-grid--secondary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hqm-slider__track { transition: none; }
}
