/* ================================================================
   Analytics Hub + Video Tutorials (templates/analytics-hub-page.php, templates/yt-members-page.php)
   Builds on the program pages' design system (analytics-professional.css: .ap, .ap-hero, .ap-section,
   .ap-btn, .ap-eyebrow …). Only what those two pages add lives here.
   ================================================================ */

/* ---------------------------------------------------------------- Hero */
.hub-hero .ap-hero__inner { align-items: center; }
.hub-kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 7px; border: 1px solid var(--ap-line-2); border-bottom-width: 2px; border-radius: 6px;
  font: 700 .875rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ap-heading); background: var(--ap-tint); text-align: center;
}
.hub-stat { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 600; color: var(--ap-muted); font-variant-numeric: tabular-nums; }
.hub-stat svg { flex-shrink: 0; }

/* Top skills right now: the Jobz home page's live card (top 5), in the program pages' style. */
.hub-skills {
  padding: 26px 26px 20px; border-radius: var(--ap-radius); background: #fff; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow-lg);
}
.hub-skills__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 20px; }
.hub-skills__title { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; font-size: 1.125rem; font-weight: 800; color: var(--ap-heading); }
.hub-skills__live { width: 8px; height: 8px; border-radius: 50%; background: #3dcd58; box-shadow: 0 0 0 3px rgba(61, 205, 88, .2); }
.hub-skills__scope { font-size: .8125rem; color: var(--ap-muted); white-space: nowrap; }
.hub-skills__list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.hub-skills__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; margin: 0; }
.hub-skills__rank {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .8125rem; font-weight: 800;
  color: var(--ap-teal-text); background: var(--color-secondary-10); font-variant-numeric: tabular-nums;
}
.hub-skills__item:first-child .hub-skills__rank { color: #fff; background: var(--ap-grad); }
.hub-skills__name { font-size: 1rem; font-weight: 700; color: var(--ap-heading); min-width: 0; }
.hub-skills__pct { font-size: 1rem; font-weight: 800; color: var(--ap-heading); font-variant-numeric: tabular-nums; }
.hub-skills__track { grid-column: 2 / -1; height: 8px; border-radius: 999px; background: var(--ap-tint); overflow: hidden; }
.hub-skills__fill { display: block; width: var(--pct); height: 100%; border-radius: inherit; background: var(--ap-grad); transform-origin: left; }
.hub-skills__foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--ap-line); font-size: .875rem; color: var(--ap-muted);
}
.hub-skills__foot a { font-weight: 700; color: var(--ap-teal-text); text-decoration: none; }
.hub-skills__foot a:hover { text-decoration: underline; }
.hub-skills__foot a:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .hub-skills__fill { animation: hub-grow .8s cubic-bezier(.2, .7, .2, 1) calc(.1s + var(--i) * .08s) both; }
}
@keyframes hub-grow { from { transform: scaleX(0); } }

/* ---------------------------------------------------------------- Learn Free: offerings */
.hub-offers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.hub-offer {
  display: flex; flex-direction: column; margin: 0; overflow: hidden; border-radius: var(--ap-radius); background: #fff; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hub-offer:hover { transform: translateY(-4px); box-shadow: var(--ap-shadow-lg); }
.hub-offer__visual { position: relative; display: grid; place-items: center; min-height: 210px; padding: 28px; overflow: hidden; }
.hub-offer.is-video .hub-offer__visual { background: radial-gradient(120% 90% at 20% 10%, #fbeef6 0%, #f4e6ee 45%, #ecd9e6 100%); }
.hub-offer.is-blog .hub-offer__visual { background: radial-gradient(120% 90% at 80% 10%, #eef8f8 0%, #e6f3f4 45%, #d6ebec 100%); }
.hub-offer.is-jobz .hub-offer__visual { background: radial-gradient(120% 90% at 50% 0%, #eef1f9 0%, #e6eaf4 45%, #d8deef 100%); }
.hub-offer__body { position: relative; display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 24px 26px 28px; }
.hub-offer__num { position: absolute; top: 22px; right: 24px; font-size: .875rem; font-weight: 800; letter-spacing: .08em; color: var(--ap-line-2); }
.ap .hub-offer__title { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; line-height: 1.2; }
.hub-offer__icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; }
.hub-offer__icon svg { width: 22px; height: 22px; }
.hub-offer.is-video .hub-offer__icon { color: var(--color-primary); background: var(--color-primary-10, #f4e6ee); }
.hub-offer.is-blog .hub-offer__icon { color: var(--ap-teal-text); background: #e6f3f4; }
.hub-offer.is-jobz .hub-offer__icon { color: var(--color-support); background: #e6eaf4; }
.hub-offer__purpose { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 800; color: var(--ap-heading); }
.hub-offer.is-video .hub-offer__purpose { color: var(--color-primary); }
.hub-offer.is-blog .hub-offer__purpose { color: var(--ap-teal-text); }
.hub-offer.is-jobz .hub-offer__purpose { color: var(--color-support); }
.hub-offer__text { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--ap-muted); }
.hub-offer__cta { margin-top: auto; align-self: flex-start; }
.hub-offer__body .hub-offer__cta { margin-top: 14px; }

/* Visual treats: a mini player, an article page, a job card — real thumbnails and titles. */
.hub-mock { position: relative; width: min(100%, 290px); border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -16px rgba(20, 24, 40, .35), 0 0 0 1px rgba(16, 20, 28, .05); transition: transform .3s ease; }
.hub-offer:hover .hub-mock:not(.is-back) { transform: translateY(-4px) rotate(-1deg); }
.hub-mock--player { padding: 10px; }
.hub-mock__screen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; background: #1b1d24 center / cover no-repeat; }
.hub-mock__play { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; background: rgba(162, 45, 117, .92); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.hub-mock__bar { height: 4px; margin: 10px 2px 8px; border-radius: 99px; background: #eee; overflow: hidden; }
.hub-mock__progress { display: block; width: 38%; height: 100%; border-radius: 99px; background: var(--color-primary); }
.hub-mock__row { display: flex; align-items: center; gap: 8px; padding: 0 2px 2px; }
.hub-mock__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--ap-grad); }
.hub-mock__line { display: block; flex: 1; height: 7px; border-radius: 99px; background: #e9ebef; }
.hub-mock__time { font-size: .75rem; font-weight: 700; color: var(--ap-muted); }
.hub-mock--article { overflow: hidden; }
.hub-mock__top { display: flex; gap: 5px; padding: 9px 12px; background: #f3f4f6; }
.hub-mock__top span { width: 8px; height: 8px; border-radius: 50%; background: #d4d7dd; }
.hub-mock__top span:first-child { background: #ff5f57; } .hub-mock__top span:nth-child(2) { background: #febc2e; } .hub-mock__top span:nth-child(3) { background: #28c840; }
.hub-mock__page { display: grid; gap: 8px; padding: 14px 16px 18px; }
.hub-mock__img { display: block; height: 82px; border-radius: 8px; background: #e6f3f4 center / cover no-repeat; }
.hub-mock__h { font-size: .9375rem; font-weight: 800; line-height: 1.3; color: var(--ap-heading); }
.hub-mock__page .hub-mock__line { flex: none; width: 100%; height: 6px; }
.hub-mock__page .hub-mock__line.is-short { width: 70%; }
.hub-mock__page .hub-mock__line.is-mark { width: 55%; background: rgba(241, 211, 6, .55); }
.hub-mock--job { z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo h" "logo sub" "apply apply"; gap: 2px 12px; padding: 18px; }
.hub-mock--job.is-back { position: absolute; z-index: 0; width: min(78%, 240px); height: 110px; top: 50%; left: 50%; transform: translate(-44%, -18%) rotate(5deg); opacity: .6; }
.hub-mock__badge { position: absolute; top: -9px; right: 14px; padding: 2px 9px; border-radius: 999px; font-size: .6875rem; font-weight: 800; text-transform: uppercase; color: #fff; background: var(--color-secondary); }
.hub-mock__logo { grid-area: logo; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-weight: 800; color: #fff; background: var(--color-support); }
.hub-mock--job .hub-mock__h { grid-area: h; align-self: end; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-mock__sub { grid-area: sub; font-size: .8125rem; color: var(--ap-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-mock__apply { grid-area: apply; justify-self: start; margin-top: 12px; padding: 6px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 800; color: #fff; background: var(--color-support); }

/* ---------------------------------------------------------------- Row headers + latest blogs */
.hub-row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.hub-more { font-weight: 700; color: var(--color-primary); text-decoration: none; white-space: nowrap; }
.hub-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hub-blogs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hub-blog { margin: 0; }
.hub-blog a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "img title" "img meta"; gap: 6px 14px; align-items: center; height: 100%;
  padding: 14px 18px 14px 14px; border-radius: var(--ap-radius-sm); text-decoration: none; background: #fff; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-blog a:hover { transform: translateY(-2px); box-shadow: var(--ap-shadow-lg); }
.hub-blog__img { grid-area: img; display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; color: var(--ap-teal-text); background: #e6f3f4; }
.hub-blog__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-blog__title { grid-area: title; align-self: end; font-weight: 700; line-height: 1.35; color: var(--ap-heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-blog__meta { grid-area: meta; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8125rem; color: var(--ap-muted); }

/* ---------------------------------------------------------------- Latest jobs */
.hub-jobs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hub-job { margin: 0; }
.hub-job a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; border-radius: var(--ap-radius-sm); text-decoration: none;
  background: #fff; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hub-job a:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow-lg); border-color: var(--color-support); }
.hub-job a:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.hub-job__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hub-job__logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 800; color: var(--color-support); background: #e6eaf4; }
.hub-job__date { padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--ap-teal-text); background: #e6f3f4; }
.hub-job__title { font-size: .9688rem; font-weight: 800; line-height: 1.3; color: var(--ap-heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-job__co { font-size: .875rem; color: var(--ap-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-job__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8125rem; color: var(--ap-muted); }
.hub-job__meta span { display: inline-flex; align-items: center; gap: 4px; }
.hub-job__apply { margin-top: auto; padding-top: 8px; font-size: .875rem; font-weight: 800; color: var(--color-support); }

/* ---------------------------------------------------------------- Who it's for */
.hub-who { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hub-who__item { margin: 0; padding: 24px; border-radius: var(--ap-radius-sm); border: 1px solid var(--ap-line); background: #fff; border-top: 4px solid var(--color-secondary); }
.hub-who__item.is-tone-1 { border-top-color: var(--color-support); }
.hub-who__item.is-tone-2 { border-top-color: var(--color-primary); }
.hub-who__item.is-tone-3 { border-top-color: var(--color-highlight); }
.ap .hub-who__item h3 { font-size: 1.1875rem; }
.hub-who__item p { margin: 8px 0 0; line-height: 1.55; color: var(--ap-muted); }

/* ---------------------------------------------------------------- Final */
.hub-final { max-width: 760px; margin-inline: auto; text-align: center; }
.hub-final__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px; color: #6b5f00; background: #fdfae1; }
.hub-final .ap-lead { margin-inline: auto; }
.hub-bm[hidden] { display: none; }
.hub-final .ap-actions { justify-content: center; }

/* ---------------------------------------------------------------- Video cards (both pages) */
.vt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.vt-card { margin: 0; }
.vt-card[hidden] { display: none; }
.vt-card__link {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--ap-radius-sm); text-decoration: none; color: var(--ap-heading);
  background: #fff; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.vt-card__link:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow-lg); color: var(--ap-heading); }
.vt-card__link:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.vt-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ap-tint); overflow: hidden; }
.vt-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.vt-card__link:hover .vt-card__thumb img { transform: scale(1.04); }
.vt-card__play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  color: #fff; background: rgba(162, 45, 117, .92); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .18s ease;
}
.vt-card__link:hover .vt-card__play { transform: scale(1.08); }
.vt-card__body { display: grid; gap: 8px; padding: 16px 18px 20px; }
.vt-card__tag { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--ap-teal-text); background: #e6f3f4; }
.vt-card__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vt-card__desc { font-size: .9375rem; line-height: 1.5; color: var(--ap-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- Video Tutorials page */
/* The program hero's tall min-height suits a landing hero, not a listing page: size to content. */
.vt-hero { min-height: 0; padding-bottom: clamp(48px, 6vw, 80px); }
.vt-hero .ap-eyebrow a { color: inherit; text-decoration: none; }
.vt-hero .ap-eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vt-hero__title { font-size: clamp(2.5rem, 5vw, 4rem); }
.vt-search { position: relative; display: flex; align-items: center; max-width: 480px; margin-top: 28px; }
.vt-search svg { position: absolute; left: 16px; color: var(--ap-muted); pointer-events: none; }
.vt-search input {
  width: 100%; min-height: 52px; padding: 0 18px 0 46px; border: 1px solid var(--ap-line-2); border-radius: 999px; font-size: 1rem; color: var(--ap-heading); background: #fff; box-shadow: var(--ap-shadow);
}
.vt-search input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(162, 45, 117, .18); }
.vt-latest { margin: 0; display: grid; gap: 12px; }
.vt-latest__label { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); }
.vt-latest__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 4px rgba(162, 45, 117, .18); }
.vt-latest__player { border-radius: var(--ap-radius); overflow: hidden; box-shadow: var(--ap-shadow-lg); }
.ap .vt-latest__player.ap-video { max-width: none; margin: 0; }
.vt-latest__img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.vt-latest__img.is-empty { display: block; aspect-ratio: 16 / 9; background: var(--ap-soft), var(--ap-tint); }
.vt-latest__title { font-size: 1.125rem; font-weight: 700; line-height: 1.4; color: var(--ap-heading); text-decoration: none; }
.vt-latest__title:hover { color: var(--color-primary); }
.vt-jump { position: sticky; top: var(--ap-secnav-top, 68px); z-index: calc(var(--z-nav, 100) - 2); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-block: 1px solid var(--ap-line); }
.vt-jump__inner { display: flex; gap: 8px; overflow-x: auto; padding-block: 12px; scrollbar-width: thin; }
.vt-jump a {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ap-line);
  font-size: .9375rem; font-weight: 600; color: var(--ap-text); text-decoration: none; background: #fff; white-space: nowrap;
}
.vt-jump a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.vt-jump a span { padding: 0 7px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--ap-muted); background: var(--ap-tint); }
.vt-jump a[hidden] { display: none; }
.vt-section { scroll-margin-top: calc(var(--ap-secnav-top, 68px) + 72px); }
.vt-section[hidden] { display: none; }
.vt-empty { padding: 48px 16px; text-align: center; font-size: 1.0625rem; color: var(--ap-muted); }

/* ---------------------------------------------------------------- Larger screens */
@media (min-width: 640px) {
  .vt-grid, .hub-blogs, .hub-who, .hub-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .hub-offers, .vt-grid, .hub-blogs, .hub-jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Learn Free cards side by side: one shared set of rows (subgrid) so the banner, title, subtitle,
     description and button line up across all three and every card is the same height. */
  @supports (grid-template-rows: subgrid) {
    .hub-offer { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
    .hub-offer__visual { grid-row: 1; }
    .hub-offer__body { grid-row: 2 / span 4; display: grid; grid-template-rows: subgrid; row-gap: 10px; }
    .hub-offer__body .hub-offer__cta { align-self: end; justify-self: start; min-width: 12.5rem; justify-content: center; }
  }
  .hub-who { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vt-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
/* Jobs: 5 in a row (10 = two rows) on wide screens. */
@media (min-width: 1200px) {
  .hub-jobs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hub-offer__visual { min-height: 180px; padding: 22px; }
  .hub-offer__body { padding: 20px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-offer, .hub-mock, .hub-blog a, .hub-job a, .vt-card__link, .vt-card__thumb img, .vt-card__play { transition: none; }
}
