/* Unit pages: the homepage's Media Hub and Press Releases sections, filtered to one unit
   (commerce_bb_after in inc/page-sections.php). Rules are the homepage's own
   (home-reference-v2.css, media-glass.css), scoped to .unit-media so they touch nothing else. */

.unit-media { margin-top: 84px; }
.unit-media .ref-wrap { width: 84%; max-width: 1220px; margin-inline: auto; }
.unit-media .ref-section { padding: 52px 0; }
.unit-media h2 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.035em; line-height: 1.06; color: inherit; font-size: clamp(30px, 3.15vw, 46px); margin: 12px 0 18px; }
.unit-media .ref-kicker { font-size: 11px; letter-spacing: 1.2px; font-weight: 700; text-transform: uppercase; color: #c38a07; display: flex; align-items: center; gap: 8px; }
.unit-media .ref-kicker::before { content: ''; width: 22px; height: 3px; background: #f4bd2b; flex: none; }
.unit-media .ref-heading { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-bottom: 28px; }
.unit-media .ref-heading p { margin: 0; }
.unit-media .ref-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 15px 20px; min-height: 44px; font-size: 12px; font-weight: 700; border: 1px solid transparent; border-radius: 3px; white-space: nowrap; text-decoration: none; transition: background .2s, box-shadow .2s; }
.unit-media .ref-outline { border-color: #cbdce9; color: inherit; background: transparent; }
.unit-media .ref-outline:hover { background: #e6f0f844; }
.unit-media .ref-text-link { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; color: #104878; text-decoration: none; }

/* Media Hub (homepage #media-centre glass band) */
.unit-media #media-centre.ref-media { position: relative; isolation: isolate; overflow: hidden; padding: 44px 0 38px; color: #fff;
  background: radial-gradient(ellipse at 6% 4%, #14448f 0, transparent 55%), radial-gradient(ellipse at 96% 92%, #0a2f6e 0, transparent 52%), linear-gradient(160deg, #0c2f72 0%, #092456 46%, #05193f 100%); }
.unit-media #media-centre.ref-media::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: url(media-waves.svg) no-repeat 50% 50%; background-size: 100% 100%; }
.unit-media #media-centre.ref-media > .ref-wrap { position: relative; z-index: 1; }
.unit-media #media-centre .ref-heading { margin-bottom: 20px; align-items: center; }
.unit-media #media-centre .ref-heading h2 { font: 700 clamp(30px, 3vw, 44px)/1.1 Georgia, serif; margin: 10px 0 12px; letter-spacing: -.025em; color: #fff; }
.unit-media #media-centre .ref-heading p { font-size: 15px; line-height: 1.5; color: #d8e7f5; }
.unit-media #media-centre .ref-kicker { color: #f3c951; }
.unit-media #media-centre .ref-outline { border: 1px solid #caa74c; background: #ffffff07; box-shadow: inset 0 1px 0 #ffffff24, 0 4px 16px #0002; backdrop-filter: blur(12px); border-radius: 0; color: #fff; }

/* Press Releases (homepage featured story + directory) */
.unit-media .ref-press { background: #fff; padding-bottom: 30px; color: #102f49; }
.unit-media .ref-press-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 28px; }
.unit-media .ref-feature, .unit-media .ref-news-directory { background: #fff; border: 1px solid #e4edf4; border-radius: 7px; box-shadow: 0 8px 26px #174a7612; overflow: hidden; }
.unit-media .ref-feature-image { display: block; position: relative; height: 238px; overflow: hidden; }
.unit-media .ref-feature-image > img { width: 100%; height: 100%; object-fit: cover; }
.unit-media .ref-feature-image > span { position: absolute; left: 22px; bottom: 10px; background: #ffce46; padding: 6px 9px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #052c4b; }
.unit-media .ref-feature-image time { background: #062c4b; color: #fff; padding: 6px 9px; margin-left: 9px; }
.unit-media .ref-feature-copy { padding: 20px 23px; }
.unit-media .ref-feature-copy h3 { font: 700 27px/1.15 Georgia, 'Times New Roman', serif; letter-spacing: -.02em; margin: 0 0 12px; }
.unit-media .ref-feature-copy h3 a { color: #102f49; text-decoration: none; }
.unit-media .ref-feature-copy p { font-size: 13px; color: #516b80; margin: 0 0 12px; }
.unit-media .ref-feature-copy .ref-text-link { color: #b38113; }
.unit-media .ref-news-directory { position: relative; display: flex; flex-direction: column; min-height: 0; max-height: clamp(360px, 29vw, 440px); }
.unit-media #unit-release-list { overflow-y: auto; }
.unit-media .ref-news-tabs { display: flex; border-bottom: 1px solid #e6eef4; background: #f9fcfe; min-height: 44px; flex: none; }
.unit-media .ref-news-tabs > * { flex: 1; font-size: 12px; padding: 13px 8px; color: #1a3c57; font-weight: 600; border: 0; border-top: 3px solid transparent; background: none; text-align: center; text-decoration: none; cursor: pointer; font-family: inherit; }
.unit-media .ref-news-tabs > [aria-selected=true] { border-top-color: #efb326; background: #fff; }
.unit-media .ref-news-row { display: grid; grid-template-columns: 66px 1fr 30px; align-items: center; gap: 15px; margin: 0 15px; padding: 17px 0; border-bottom: 1px solid #e4edf5; min-height: 87px; color: #102f49; text-decoration: none; }
.unit-media .ref-news-row:last-child { border: 0; }
.unit-media .ref-news-row img { width: 66px; height: 56px; object-fit: cover; border-radius: 3px; }
.unit-media .ref-news-row strong { font-size: 13px; line-height: 1.35; display: block; }
.unit-media .ref-news-row time { font-size: 11px; color: #577086; display: block; margin-top: 5px; }
.unit-media .ref-news-row > i { width: 28px; height: 28px; border-radius: 50%; background: #eff6fb; color: #155581; font-size: 11px; display: flex; justify-content: center; align-items: center; }
.unit-media .ref-news-row:hover { background: #f3f8fc; }
.unit-media .ref-news-row[hidden] { display: none; }
.unit-media .ref-news-empty { margin: 0; padding: 22px; color: #516b80; font-size: 14px; }

/* The contact band follows the media sections */
.unit-contact-section { padding-top: 0; }
.unit-contact-section .bb-band { margin-top: 20px; }

@media (max-width: 1150px) {
  .unit-media .ref-button { padding: 12px; font-size: 11px; }
  .unit-media .ref-feature-image { height: 210px; }
  .unit-media .ref-news-row { padding: 13px 0; gap: 10px; }
}
@media (max-width: 900px) {
  .unit-media .ref-heading { gap: 20px; }
  .unit-media .ref-heading p { font-size: 14px; }
  .unit-media .ref-news-tabs > * { font-size: 10px; }
  .unit-media .ref-feature-copy h3 { font-size: 23px; }
  .unit-media .ref-news-row { grid-template-columns: 46px 1fr 22px; margin: 0 10px; gap: 8px; }
  .unit-media .ref-news-row img { width: 46px; height: 48px; }
  .unit-media .ref-news-row strong { font-size: 11px; }
  .unit-media #media-centre.ref-media::after { top: auto; height: 46%; }
}
@media (max-width: 650px) {
  .unit-media #media-centre.ref-media { padding: 30px 0; }
  .unit-media #media-centre .ref-heading { align-items: flex-start; gap: 16px; }
  .unit-media #media-centre .ref-heading p { font-size: 13px; }
}
@media (max-width: 600px) {
  .unit-media .ref-wrap { width: 90%; }
  .unit-media .ref-section { padding: 32px 0; }
  .unit-media .ref-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; gap: 14px; }
  .unit-media .ref-heading .ref-button { min-height: 36px; padding: 9px 12px; font-size: 10px; }
  .unit-media .ref-heading p { font-size: 13px; }
  .unit-media .ref-press-grid { grid-template-columns: 1fr; gap: 20px; }
  .unit-media .ref-feature-image { height: 205px; }
  .unit-media .ref-news-row { grid-template-columns: 62px 1fr 26px; padding: 14px 0; margin: 0 14px; }
  .unit-media .ref-news-row img { width: 62px; height: 54px; }
  .unit-media .ref-news-row strong { font-size: 13px; }
  .unit-media .ref-news-tabs > * { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .unit-media .ref-button { transition: none !important; } }

/* Media Hub redesign: light section, the player is the navy banner-style panel. */
.unit-media #media-centre.ref-media { background: linear-gradient(180deg, #f5f8fc 0%, #eaf1f9 100%); color: #0a2c6b; }
.unit-media #media-centre.ref-media::after { display: none; }
.unit-media #media-centre .ref-heading h2 { color: #0a2c6b; }
.unit-media #media-centre .ref-heading h2::after { content: "."; color: #f7c21b; }
.unit-media #media-centre .ref-heading p { color: #53627a; }
.unit-media #media-centre .ref-kicker { color: #8a5d00; }
.unit-media #media-centre .ref-outline { border: 2px solid #0a2c6b; background: #fff; color: #0a2c6b; border-radius: 4px; box-shadow: none; backdrop-filter: none; }
.unit-media #media-centre .ref-outline:hover { background: #0a2c6b; color: #fff; }
