/* TheMiddleEast.com: balance fixes from the three-site scan (Keith, December 1, 2026: "IF something is out of balance,
   balance it", on phones and computers). Linked last in the head of every page. */

/* Mid-page Music buttons never split a card grid: they sit after the last card, across the full row */
.cards > .music-row { order: 99; grid-column: 1 / -1; }

/* "At a glance": no lone fact on the last row (6 or 9 facts in threes, 8 in fours) */
@media (min-width: 1000px) {
  .glance:has(> div:nth-of-type(6)):not(:has(> div:nth-of-type(7))),
  .glance:has(> div:nth-of-type(9)):not(:has(> div:nth-of-type(10))) { grid-template-columns: repeat(3, 1fr); }
  .glance:has(> div:nth-of-type(8)):not(:has(> div:nth-of-type(9))) { grid-template-columns: repeat(4, 1fr); }
  /* four cards: two rows of two, never three and one alone */
  .cards:has(> article:nth-of-type(4)):not(:has(> article:nth-of-type(5))) { grid-template-columns: repeat(2, 1fr); }
}

/* 404: the quick links wrap as centred lines, never off the screen */
.quick { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 4px; max-width: 100%; }

/* Founding Partners: gold buttons with their words centred */
.hero-cta .btn, .fp-two .btn { justify-content: center; text-align: center; }

/* Founding Partner preview: the place name keeps its title's type */
.pv-places b .t-name { font: inherit; color: inherit; }

@media (max-width: 600px) {
  .hero-cta { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-cta .btn { width: 100%; box-sizing: border-box; margin: 0; }
}

@media (max-width: 480px) {
  /* hero weather: the label on its own line, Day high and Sea together below */
  .wx-now .wx-k { flex-basis: 100%; }
}

/* Homepage phones: one left line for every band */
@media (max-width: 900px) {
  html body #today-band > div { padding-left: 32px !important; padding-right: 32px !important; }
  html body .cg-grid { padding-left: 32px !important; padding-right: 32px !important; }
}
@media (max-width: 480px) {
  /* 404: two even pairs, Destinations · Stay / Luxury Real Estate · The Leader */
  .quick > b:nth-of-type(2) { flex-basis: 100%; height: 0; overflow: hidden; }
}
