/* =========================================================
   /onesolution-media/ — "In the media" feature switcher (redesign 2026-10-29).
   Loaded only by onesolution-media.php, after design-system.css and blog.css.
   Layout and colours follow the approved media design review; type comes from the ds- system
   (Montserrat headings, Poppins text). Every rule is scoped to .page-media or an md- class.
   ========================================================= */

.page-media {
  --md-navy: #004886;           /* design review accent: tabs, buttons, podcast band */
  --md-navy-dark: #00345f;
  --md-light: #f1f7fb;
  --md-line: #d5e2eb;
}

/* ---------- Switcher band (page H1 + feature tabs) ---------- */
.md-switch {
  padding: clamp(118px, 13vw, 182px) 0 24px;   /* top: room for the fixed site header */
  background: var(--md-light);
  border-bottom: 1px solid #dce9f3;
  font-family: var(--ds-font-body);
}
.md-switch .ds-container { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.md-switch-title {
  margin: 0 12px 0 0;
  font-family: var(--ds-font-head); font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ds-muted);
}
.md-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.md-tab {
  display: inline-flex; align-items: center;
  min-height: 42px; padding: 9px 18px;
  border: 1px solid #d1e0eb; border-radius: var(--ds-radius-pill);
  background: #fff; color: var(--md-navy);
  font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.md-tab:hover { border-color: var(--md-navy); }
.md-tab[aria-current="true"] { background: var(--md-navy); border-color: var(--md-navy); color: #fff; }
.md-tab:focus-visible, .md-cta:focus-visible, .md-related a:focus-visible { outline: 3px solid var(--ds-brand); outline-offset: 4px; }

/* ---------- Feature panels ---------- */
.md-panel { padding-block: 36px clamp(48px, 5vw, 64px); }
.md-panel[hidden] { display: none; }
.md-crumb { margin: 0 0 36px; font-size: var(--ds-fs-small); color: var(--ds-muted); }
.md-panel .ds-eyebrow { color: var(--md-navy); }
.md-panel .ds-eyebrow::before { background: var(--ds-brand); }
.md-title { margin: 6px 0 22px; }
.md-accent { color: var(--md-navy); }
.md-lead { max-width: 470px; margin: 0; color: var(--ds-text); }

.md-cta {
  display: inline-flex; align-items: center; gap: 30px;
  margin-top: 26px; padding: 15px 22px;
  background: var(--md-navy); color: #fff;
  font-family: var(--ds-font-body); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: background-color .2s;
  border-radius: 6px;
}
.md-cta:hover { background: var(--md-navy-dark); color: #fff; }

/* image + caption (square corners, as in the design review) */
.md-figure { margin: 0; }
.md-figure img { display: block; width: 100%; height: auto; object-fit: cover; }
.md-figure figcaption { margin-top: 11px; font-size: 12.5px; line-height: 1.5; color: var(--ds-muted); }

/* text + image hero: text and image half and half on every tab */
.md-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; }
.md-hero .md-figure img { aspect-ratio: 1; object-position: center top; }
.md-hero--insta .md-figure img { aspect-ratio: 1.35; object-position: center; }
.md-hero--press .md-figure img { aspect-ratio: 1.35; object-position: center 40%; }
.md-hero--agc .md-figure img { object-fit: contain; background: #000; }

/* event logo bar above the speaker hero */
.md-event-brand {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 24px; padding: 20px; background: #082c4d;
}
.md-event-brand img { width: min(80%, 320px); height: auto; }
.md-event-brand span { color: #fff; font-family: var(--ds-font-head); font-size: 24px; font-weight: 600; }

/* key facts row */
.md-facts {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 24px;
  margin: 42px 0 0; padding: 24px 0;
  border-block: 1px solid var(--md-line);
}
.md-facts dt, .md-label {
  display: block; margin: 0 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ds-muted);
}
.md-facts dd { margin: 0; font-family: var(--ds-font-head); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ds-navy); }

/* two-column recap: heading left, text right */
.md-recap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 60px; padding: 38px 0 12px; }
.md-recap .ds-title { margin-top: 4px; }
.md-recap .ds-text { color: var(--ds-text); }
.md-recap .ds-title + .ds-text { margin-top: 16px; }
.md-role { margin: 12px 0 0; font-size: var(--ds-fs-small); line-height: 1.6; color: var(--ds-muted); }
.md-bio { margin-top: 20px; border-top: 1px solid var(--md-line); }
.md-topics { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.md-topics li { padding: 9px 12px; background: var(--md-light); color: var(--md-navy); font-size: 13px; font-weight: 500; line-height: 1.3; }

/* numbered talking points (podcast) */
.md-points { margin: 0; padding: 0; list-style: none; }
.md-points li {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--md-line);
  font-family: var(--ds-font-head); font-weight: 600; font-size: 16px; color: var(--ds-navy);
}
.md-points span { color: var(--ds-brand); font-size: 22px; font-weight: 700; }

/* second image + text block (course) */
.md-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 44px; align-items: center; margin-top: 34px; }
.md-detail .md-figure img { aspect-ratio: 1.5; }
.md-detail .ds-title { margin: 4px 0 16px; }

/* "next feature" row */
.md-related {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 35px; padding-top: 28px; border-top: 1px solid var(--md-line);
}
.md-related .md-label { margin-bottom: 6px; }
.md-related .ds-h3 { font-size: 18px; }
.md-related .ds-link { color: var(--md-navy); white-space: nowrap; }

/* podcast: dark band with the video */
.md-podhero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: center;
  padding: clamp(25px, 3.5vw, 44px); background: var(--md-navy); color: #fff;
}
.md-podhero .ds-eyebrow { color: #82e1ff; }
.md-podhero .ds-eyebrow::before { background: currentColor; }
.md-podhero .md-title { font-size: clamp(32px, calc(2.4vw + 14px), 50px); }   /* narrower column than the other heroes */
.md-podhero .md-title, .md-podhero .md-accent { color: #fff; }
.md-podhero .md-lead { color: #d2e5f5; }
.md-podhero .md-cta { background: #fff; color: var(--md-navy); }
.md-podhero .md-cta:hover { background: var(--ds-brand-50); color: var(--md-navy); }
.md-podcast-brand { display: inline-block; margin-bottom: 22px; padding: 14px 18px; background: #ffd500; }
.md-podcast-brand img { display: block; width: 200px; max-width: 100%; height: auto; }
.md-video { aspect-ratio: 16 / 9; border-radius: 0; box-shadow: none; }
.md-play-label {
  position: absolute; z-index: 2; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: 5px 12px; background: rgba(0, 52, 95, 0.9); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.md-podhero .md-figure figcaption { color: rgba(255, 255, 255, 0.7); }

/* press feature: narrow column, wide photo */
.md-press { max-width: 1200px; width: 100%; }
.md-press .md-title { max-width: 820px; }
.md-press .md-lead { max-width: 720px; }
.md-press .md-recap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.md-actioncol { display: flex; align-items: center; justify-content: flex-end; }
.md-actioncol .md-cta { margin: 0; }

/* media article tabs: cover (text on a tinted card + full-height photo), facts row,
   then a sticky side column ("In this article", article page, share) beside the article text */
.md-title--long { font-size: var(--ds-fs-h2); line-height: 1.14; }
.md-art-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); background: var(--md-light); }
.md-art-hero-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4.5vw, 60px); }
.md-art-hero-text .md-title { margin-bottom: 18px; }
.md-art-lead { margin: 0; font-size: var(--ds-fs-lead); line-height: 1.65; color: var(--ds-text); }
.md-art-lead strong { color: var(--ds-navy); }
.md-art-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--md-line);
  font-size: var(--ds-fs-small); font-weight: 500; color: var(--ds-muted);
}
.md-art-meta span + span::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 14px 2px 0; border-radius: 50%; background: var(--ds-brand); }
.md-art-cover { position: relative; min-height: 420px; margin: 0; overflow: hidden; background: #0d1a2a; }
.md-art-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.md-art-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 37, 64, 0) 55%, rgba(10, 37, 64, 0.75)); pointer-events: none; }
.md-art-badge {
  position: absolute; z-index: 1; top: 20px; left: 20px;
  padding: 7px 14px; background: #fff; color: var(--md-navy);
  font-family: var(--ds-font-head); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.md-art-cover figcaption {
  position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px;
  font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.92);
}

.md-art-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(32px, 4vw, 48px); }
.md-art-layout--single { grid-template-columns: minmax(0, 1fr); }
.md-art-aside { position: sticky; top: 150px; }
.md-art-toc .md-label { margin-bottom: 12px; }
.md-art-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: md-toc; border-left: 2px solid var(--md-line); }
.md-art-toc li { counter-increment: md-toc; }
.md-art-toc a {
  display: flex; gap: 10px; margin-left: -2px; padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--ds-text); text-decoration: none;
  transition: color .2s, border-color .2s;
}
.md-art-toc a::before { content: counter(md-toc, decimal-leading-zero); color: var(--ds-brand); font-weight: 700; }
.md-art-toc a:hover { color: var(--md-navy); border-left-color: var(--ds-brand); }
.md-art-toc a:focus-visible { outline: 3px solid var(--ds-brand); outline-offset: 2px; }

.md-article-body { max-width: 780px; font-size: 17.5px; line-height: 1.8; color: var(--ds-text); }
.md-article-body p { margin: 0 0 1.2em; }
.md-article-body > p:first-child::first-letter {   /* only when the article opens with a paragraph */
  float: left; margin: 0.08em 0.12em 0 0;
  font-family: var(--ds-font-head); font-weight: 800; font-size: 3.6em; line-height: 0.82; color: var(--md-navy);
}
.md-article-h {
  margin: 1.8em 0 0.7em; scroll-margin-top: 150px;
  font-family: var(--ds-font-head); font-weight: 700; font-size: clamp(21px, 1vw + 14px, 27px); line-height: 1.3; color: var(--ds-navy);
}
.md-article-h::before { content: ''; display: block; width: 36px; height: 3px; margin-bottom: 14px; background: var(--ds-brand); }
.md-article-list { margin: 0 0 1.4em; padding: 20px 24px; list-style: none; background: var(--md-light); }
.md-article-list li { position: relative; margin: 0; padding: 8px 0 8px 1.6em; }
.md-article-list li + li { border-top: 1px solid var(--md-line); }
.md-article-list li::before { content: ''; position: absolute; left: 0.15em; top: 1.1em; width: 8px; height: 8px; border-radius: 50%; background: var(--ds-brand); }
.md-article-video { position: relative; aspect-ratio: 16 / 9; margin: 0.4em 0 1.6em; background: #062d50; }
.md-article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md-article-img { margin: 0.6em 0 1.8em; }
.md-quote { position: relative; margin: 1.8em 0; padding: clamp(26px, 3vw, 38px) clamp(24px, 3vw, 40px) clamp(24px, 3vw, 34px) clamp(64px, 6vw, 92px); background: var(--md-navy); color: #fff; }
.md-quote::before {
  content: '\201C'; position: absolute; left: clamp(18px, 2vw, 30px); top: clamp(4px, 1vw, 12px);
  font-family: var(--ds-font-head); font-weight: 800; font-size: clamp(64px, 6vw, 88px); line-height: 1; color: var(--ds-brand);
}
.md-quote p { margin: 0 0 14px; font-family: var(--ds-font-head); font-weight: 700; font-size: clamp(20px, 1.2vw + 12px, 27px); line-height: 1.35; color: #fff; }
.md-quote cite { font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #82e1ff; }

/* ---------- Broward Periodontics event (above the article cards) ---------- */
.md-event { border-top: 1px solid var(--md-line); }
.md-event-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 60px; align-items: start; }
.md-event .md-facts { grid-template-columns: 1fr 1.2fr 1.4fr; margin-top: 32px; }
.md-event-flyer { margin: 0; box-shadow: 0 18px 40px rgba(10, 37, 64, 0.14); }
.md-event-flyer img { display: block; width: 100%; height: auto; }   /* the whole flyer, never cropped */
.md-event-slider { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--md-line); }
.md-event-slider .md-label { margin: 0; }
/* slider (design-system .ds-track): 4 tiles on desktop, 3 on laptop, 2 on tablet, 1 on mobile; arrows and swipe
   whenever there are more tiles than fit */
.md-event-gallery { --ds-gap: 18px; grid-auto-columns: calc((100% - 3 * var(--ds-gap)) / 4); padding: 0 0 4px; }
@media (max-width: 1366px) {
  .md-event-gallery { grid-auto-columns: calc((100% - 2 * var(--ds-gap)) / 3); }
}
.md-event-gallery li { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #0a2540; }   /* the videos are vertical 9:16 */
.md-event-gallery iframe, .md-event-gallery img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md-event-gallery img { object-fit: cover; }

/* click the flyer or a photo: full-size view (.md-viewer) */
.md-zoom { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.md-zoom img { transition: transform .5s var(--ds-ease); }
.md-zoom:focus-visible { outline: 3px solid var(--ds-brand); outline-offset: 3px; }
.md-event-gallery .md-zoom { position: absolute; inset: 0; overflow: hidden; }
.md-event-gallery .md-zoom:hover img { transform: scale(1.04); }
/* magnifier badge: always on (phones have no hover), fully shown on hover / keyboard focus */
.md-zoom-icon {
  position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230096d1' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: var(--ds-shadow-sm); opacity: .85; transition: opacity .25s, transform .25s var(--ds-ease);
}
.md-zoom:hover .md-zoom-icon, .md-zoom:focus-visible .md-zoom-icon { opacity: 1; transform: scale(1.08); }

/* photo viewer: full-screen variant of .ds-dialog */
.md-viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 64px 84px; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.md-viewer[open] { display: flex; align-items: center; justify-content: center; }
.md-viewer::backdrop { background: rgba(10, 27, 46, 0.92); }
.md-viewer-figure { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; }
.md-viewer-img { max-width: min(1100px, 100%); max-height: calc(100% - 40px); width: auto; height: auto; box-shadow: var(--ds-shadow-lg); }
.md-viewer-count { margin-top: 14px; font-size: var(--ds-fs-small); font-weight: 500; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.75); }
.md-viewer-close { position: absolute; top: 16px; right: 16px; float: none; margin: 0; z-index: 2; }
.md-viewer .ds-arrow { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); border-color: transparent; }
.md-viewer-prev { left: 20px; }
.md-viewer-next { right: 20px; }

/* article cards under the features */
.md-articles .blog-grid { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .md-art-hero, .md-art-layout { grid-template-columns: 1fr; }
  .md-art-hero .md-art-cover { order: -1; min-height: 340px; }
  .md-art-aside { position: static; }
  .md-hero, .md-podhero, .md-detail { grid-template-columns: 1fr; gap: 28px; }
  .md-hero .md-figure img { aspect-ratio: 1.55; }
  .md-hero--agc .md-figure img { aspect-ratio: 1; max-width: 560px; margin-inline: auto; }
  .md-recap { gap: 32px; }
  .md-lead { max-width: 640px; }
  .md-event-intro { grid-template-columns: 1fr; gap: 36px; }
  .md-event-flyer { max-width: 520px; }
  .md-event-gallery { grid-auto-columns: calc((100% - var(--ds-gap)) / 2); }
}
@media (max-width: 767px) {
  .md-switch-title { width: 100%; }
  .md-tabs { gap: 8px; }
  .md-tab { min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
  .md-crumb { margin-bottom: 24px; }
  .md-facts { grid-template-columns: 1fr; gap: 20px; }
  .md-facts dt { margin-bottom: 6px; }
  .md-recap, .md-press .md-recap { grid-template-columns: 1fr; gap: 24px; }
  .md-actioncol { justify-content: flex-start; }
  .md-related { flex-direction: column; align-items: flex-start; }
  .md-related .ds-link { white-space: normal; }
  .md-cta { gap: 18px; }
  .md-play-label { display: none; }   /* small video: the play button says it */
  .md-article-body { font-size: 16.5px; }
  .md-art-hero .md-art-cover { min-height: 0; aspect-ratio: 16 / 10; }
  .md-event .md-facts { grid-template-columns: 1fr; }
  .md-event-gallery { --ds-gap: 12px; grid-auto-columns: 100%; }
  .md-viewer { padding: 68px 12px 84px; }
  .md-viewer .ds-arrow { top: auto; bottom: 18px; transform: none; }
  .md-viewer-prev { left: calc(50% - 58px); }
  .md-viewer-next { right: calc(50% - 58px); }
}
@media (prefers-reduced-motion: reduce) {
  .md-tab, .md-cta, .md-zoom img { transition: none; }
  .md-event-gallery .md-zoom:hover img { transform: none; }
}
