/* The Mortgage Desk Video Learning Center filter controls.
   Deliberately scoped to /videos.html to protect global navigation and forms. */
body.home-loan-site .tmd-video-library {
  padding-top: 28px;
  padding-bottom: 44px;
}
body.home-loan-site .tmd-video-library-intro {text-align:center;max-width:760px;margin:0 auto 22px;}
body.home-loan-site .tmd-video-library-intro h2 {font-size:clamp(1.55rem,2.4vw,2.15rem);margin:0 0 8px;color:#102b50;}
body.home-loan-site .tmd-video-library-intro p {font-size:.98rem;line-height:1.55;margin:0;color:#52657d;}
body.home-loan-site .tmd-video-filters {
  display:flex;
  align-items:stretch;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  padding:0;
  margin:0 auto 12px;
  max-width:1060px;
}
body.home-loan-site .tmd-video-filter {
  --tmd-filter-fill:#334155;
  --tmd-filter-outline:#CBD5E1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid var(--tmd-filter-outline);
  border-radius:999px;
  background:#FBFCFE;
  color:#475569;
  font-family:inherit;
  font-size:clamp(.86rem,1.15vw,.98rem);
  line-height:1.25;
  font-weight:750;
  text-align:center;
  white-space:nowrap;
  padding:13px 18px;
  min-height:48px;
  max-width:100%;
  box-shadow:none;
  cursor:pointer;
  transition:background-color .2s ease,color .2s ease, border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
body.home-loan-site .tmd-video-filter svg {width:19px;height:19px;flex:none;}
body.home-loan-site .tmd-video-filter--purchase {--tmd-filter-fill:#22C55E;--tmd-filter-outline:#A7F3C0;}
body.home-loan-site .tmd-video-filter--refinance {--tmd-filter-fill:#1E40AF;--tmd-filter-outline:#BFDBFE;}
body.home-loan-site .tmd-video-filter--investor {--tmd-filter-fill:#D97706;--tmd-filter-outline:#FCD99C;}
body.home-loan-site .tmd-video-filter:hover,
body.home-loan-site .tmd-video-filter[aria-pressed="true"] {
  background-color:var(--tmd-filter-fill);
  color:#fff;
  border-color:var(--tmd-filter-fill);
  box-shadow:0 6px 17px color-mix(in srgb, var(--tmd-filter-fill) 25%, transparent);
  text-decoration:none;
}
body.home-loan-site .tmd-video-filter:hover {transform:translateY(-1px);}
/* White text over #22C55E / #D97706 is below WCAG AA small-text contrast.
   The requested palette is preserved; darken those two fills if WCAG AA is required. */
body.home-loan-site .tmd-video-filter:focus-visible {outline:3px solid #135ec1;outline-offset:4px;}
body.home-loan-site .tmd-video-filter-status {min-height:1.6em;margin:0 auto 24px;text-align:center;color:#64748b;font-size:.85rem;}
body.home-loan-site .tmd-video-topic-groups {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
body.home-loan-site .tmd-video-topic-group {min-width:0;padding:22px;border:1px solid #dae4ef;border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(9,48,92,.05);}
body.home-loan-site .tmd-video-topic-group[hidden] {display:none!important;}
body.home-loan-site .tmd-video-topic-groups[data-active-filter]:not([data-active-filter="all"]) {grid-template-columns:minmax(0,760px);justify-content:center;}
body.home-loan-site .tmd-video-category-heading {display:flex;align-items:center;gap:10px;margin-bottom:8px;}
body.home-loan-site .tmd-video-category-heading h3 {font-size:1.23rem;color:#0f2d56;letter-spacing:-.02em;margin:0;}
body.home-loan-site .tmd-video-category-icon {width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:9px;font-size:20px;font-weight:800;background:#f1f5f9;color:#334155;}
body.home-loan-site .tmd-video-category-icon--purchase {background:#dcfce7;color:#166534;}
body.home-loan-site .tmd-video-category-icon--refinance {background:#dbeafe;color:#1e40af;}
body.home-loan-site .tmd-video-category-icon--investor {background:#fef3c7;color:#92400e;}
body.home-loan-site .tmd-video-topic-group>p {font-size:.87rem;color:#52657d;line-height:1.45;min-height:2.7em;margin-bottom:14px;}
body.home-loan-site .tmd-video-topic-grid {display:grid;grid-template-columns:1fr;gap:8px;list-style:none;padding:0;margin:0;}
body.home-loan-site .tmd-video-topic-grid li {padding:9px 11px;background:#f6f9fd;border:1px solid #e1eaf3;border-radius:8px;color:#244261;font-size:.88rem;line-height:1.35;}
body.home-loan-site .tmd-video-library-note {margin:18px 0 0;text-align:center;color:#64748b;font-size:.84rem;line-height:1.5;}
body.home-loan-site .tmd-video-library-note a {color:#0a65b5;font-weight:700;text-decoration:underline;text-underline-offset:3px;}
@media(max-width:900px){body.home-loan-site .tmd-video-topic-groups {grid-template-columns:1fr 1fr;}body.home-loan-site .tmd-video-topic-group:last-child:nth-child(odd) {grid-column:1/-1;}}
@media(max-width:670px){body.home-loan-site .tmd-video-filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}body.home-loan-site .tmd-video-filter{white-space:normal;border-radius:15px;padding:12px 9px;font-size:.87rem;min-height:58px;}body.home-loan-site .tmd-video-topic-groups {grid-template-columns:1fr;}body.home-loan-site .tmd-video-topic-group:last-child:nth-child(odd){grid-column:auto;}body.home-loan-site .tmd-video-topic-group>p{min-height:0;}body.home-loan-site .tmd-video-library{padding-top:28px;}}
@media(max-width:350px){body.home-loan-site .tmd-video-filters {grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce){body.home-loan-site .tmd-video-filter{transition:none;}body.home-loan-site .tmd-video-filter:hover{transform:none;}}


/* Unified clickable topic links. Retain the original list-item styling. */
body.home-loan-site .tmd-video-topic-grid li{padding:0;overflow:hidden;}
body.home-loan-site .tmd-video-topic-grid .filter-trigger{display:block;padding:9px 11px;color:#244261;font-size:inherit;font-weight:inherit;line-height:inherit;text-decoration:none;border-radius:inherit;transition:background-color .2s ease,color .2s ease;}
body.home-loan-site .tmd-video-topic-grid .filter-trigger:hover{background:#eaf2ff;color:#064d95;text-decoration:underline;text-underline-offset:3px;}
body.home-loan-site .tmd-video-topic-grid .filter-trigger:focus-visible{outline:3px solid #0b64bd;outline-offset:-3px;}
body.home-loan-site .tmd-video-topic-grid .filter-trigger[aria-current="true"]{background:#e6f1ff;color:#063c77;font-weight:800;box-shadow:inset 4px 0 0 #1371d2;}
/* Preserve all 3 topic columns even while filtering the lower thumbnail gallery. */
body.home-loan-site #tmd-video-topic-groups .tmd-video-topic-group[hidden]{display:block!important;}
body.home-loan-site #tmd-video-topic-groups[data-active-filter]:not([data-active-filter="all"]){grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch;}
body.home-loan-site .tmd-video-gallery{margin-top:33px;padding-top:30px;border-top:1px solid #dce8f4;scroll-margin-top:90px;}
body.home-loan-site .tmd-video-gallery-top{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:20px;}
body.home-loan-site .tmd-video-gallery-eyebrow{display:block;font-size:.74rem;letter-spacing:.15em;font-weight:800;color:#276199;margin-bottom:5px;}
body.home-loan-site .tmd-video-gallery-top h2{margin:0 0 6px;color:#0d2e62;font-size:clamp(1.45rem,2.1vw,2.1rem);line-height:1.15;}
body.home-loan-site .tmd-video-gallery-top p{margin:0;color:#5b6d82;font-size:.96rem;}
body.home-loan-site .tmd-video-clear-filter{border:1px solid #a8c8e7;border-radius:999px;color:#0b4f90;background:#f7fbff;padding:11px 16px;cursor:pointer;white-space:nowrap;font-weight:800;}
body.home-loan-site .tmd-video-clear-filter:hover{background:#e8f3ff;}
body.home-loan-site .tmd-video-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
body.home-loan-site .tmd-video-visual-card{min-width:0;border:1px solid #e1e8f0;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 5px 17px rgba(12,43,78,.10);transition:transform .2s ease,box-shadow .2s ease;}
body.home-loan-site .tmd-video-visual-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(12,43,78,.20);}
body.home-loan-site .tmd-video-visual-card[hidden]{display:none!important;}
body.home-loan-site .tmd-video-thumbnail{position:relative;aspect-ratio:413/250;overflow:hidden;background:#e4ebf3;}
body.home-loan-site .tmd-video-thumbnail>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .28s ease,filter .28s ease;}
body.home-loan-site .tmd-video-visual-card:hover .tmd-video-thumbnail>img{transform:scale(1.045);filter:saturate(1.07);}
/* Glowing play marker is visual only for previews; not a fake clickable player. */
body.home-loan-site .tmd-video-play-halo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:60px;height:60px;background:rgba(255,255,255,.25);border:2px solid rgba(255,255,255,.75);border-radius:50%;color:#fff;opacity:.20;box-shadow:0 0 0 6px rgba(255,255,255,.12);pointer-events:none;transition:opacity .2s ease,box-shadow .2s ease;}
body.home-loan-site .tmd-video-play-halo svg{width:26px;height:26px;}
body.home-loan-site .tmd-video-visual-card:hover .tmd-video-play-halo{opacity:.9;box-shadow:0 0 0 11px rgba(255,255,255,.22),0 0 30px rgba(255,255,255,.75);}
body.home-loan-site .tmd-video-concept-badge{position:absolute;right:10px;top:10px;background:rgba(8,32,66,.86);color:#fff;border-radius:999px;padding:6px 10px;font-size:.7rem;letter-spacing:.01em;font-weight:800;}
body.home-loan-site .tmd-video-visual-copy{padding:18px 18px 19px;display:flex;flex-direction:column;gap:8px;}
body.home-loan-site .tmd-video-program-label{align-self:flex-start;border-radius:999px;padding:6px 10px;font-size:.71rem;line-height:1.1;font-weight:800;letter-spacing:.03em;}
body.home-loan-site .tmd-video-program-label--purchase{background:#dcfce7;color:#166534;}
body.home-loan-site .tmd-video-program-label--refinance{background:#dbeafe;color:#1e40af;}
body.home-loan-site .tmd-video-program-label--investor{background:#fef3c7;color:#92400e;}
body.home-loan-site .tmd-video-visual-copy h3{font-size:clamp(1.05rem,1.35vw,1.26rem);color:#102b50;line-height:1.23;letter-spacing:-.018em;margin:0;}
body.home-loan-site .tmd-video-visual-copy p{margin:0;color:#42556e;font-size:.89rem;line-height:1.46;}
body.home-loan-site .tmd-video-availability{font-weight:800;font-size:.8rem;color:#557b9c;margin-top:6px;}
body.home-loan-site .tmd-video-card-link{display:inline-flex;align-self:flex-start;margin-top:5px;color:#fff;background:#0d5ba7;padding:10px 14px;border-radius:8px;font-weight:800;font-size:.85rem;text-decoration:none;}
body.home-loan-site .tmd-video-card-link:hover{background:#073d77;color:#fff;}
body.home-loan-site .tmd-video-card-link:focus-visible{outline:3px solid #ffca62;outline-offset:3px;}
body.home-loan-site .tmd-video-no-results{padding:36px 22px;text-align:center;background:#f6faff;border:1px dashed #a9cbe9;border-radius:13px;}
body.home-loan-site .tmd-video-no-results[hidden],body.home-loan-site .tmd-video-clear-filter[hidden]{display:none!important;}
body.home-loan-site .tmd-video-no-results-icon{font-size:2.3rem;color:#5186c0;display:block;line-height:1.1;}
body.home-loan-site .tmd-video-no-results h3{margin:10px 0 6px;font-size:1.18rem;color:#163963;}
body.home-loan-site .tmd-video-no-results p{margin:0 0 15px;color:#52677d;}
body.home-loan-site .tmd-video-no-results button{border:0;border-radius:9px;background:#176bc7;color:white;padding:11px 16px;font:inherit;font-size:.9rem;font-weight:800;cursor:pointer;}
body.home-loan-site .tmd-video-gallery-disclaimer{margin:14px 0 0;color:#6c7b8d;font-size:.79rem;line-height:1.4;}
@media(max-width:1000px){body.home-loan-site #tmd-video-topic-groups[data-active-filter]:not([data-active-filter="all"]){grid-template-columns:repeat(2,minmax(0,1fr));}body.home-loan-site .tmd-video-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:670px){body.home-loan-site #tmd-video-topic-groups[data-active-filter]:not([data-active-filter="all"]){grid-template-columns:1fr;}body.home-loan-site .tmd-video-gallery-top{display:block;}body.home-loan-site .tmd-video-clear-filter{margin-top:14px;}body.home-loan-site .tmd-video-card-grid{grid-template-columns:1fr;gap:18px;}body.home-loan-site .tmd-video-visual-copy{padding:16px;}body.home-loan-site .tmd-video-gallery{margin-top:27px;}}
@media(prefers-reduced-motion:reduce){body.home-loan-site .tmd-video-visual-card,body.home-loan-site .tmd-video-thumbnail>img,body.home-loan-site .tmd-video-play-halo,body.home-loan-site .tmd-video-topic-grid .filter-trigger{transition:none!important;}body.home-loan-site .tmd-video-visual-card:hover{transform:none;}body.home-loan-site .tmd-video-visual-card:hover .tmd-video-thumbnail>img{transform:none;}}

/* Approved artwork already includes the white play icon; do not layer a duplicate. */
body.home-loan-site .tmd-video-visual-card .tmd-video-play-halo{display:none!important;}

/* Keep the approved headline/photo artwork fully visible at every card width (no crop or stretching). */
body.home-loan-site .tmd-video-thumbnail > img {object-fit:contain!important;background:#0e335e;}
