/* Home page blocks (resources/views/home/*). Built on the glass theme: panels, tiles, headings, buttons and swipe rows
   come from theme-base.css / theme-parts.css; this file only places things. Phone first, computers from 1024px. */

/* ---------- Hero: text, two buttons, a fan of book covers behind one course poster ---------- */
.hm-hero { display: flex; flex-direction: column; gap: 12px; padding: 20px 14px 14px; text-align: center; overflow: hidden; }
.hm-hero__text { position: relative; display: flex; flex-direction: column; gap: 12px; }
.hm-hero h1 { margin: 0; font-size: 26px; line-height: 1.35; text-wrap: balance; }
.hm-hero p { margin: 0; font-size: 16px; color: var(--g-muted); }
.hm-hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-hero__actions .g-btn { padding: 0 8px; }
/* On narrow phones "অ্যাপ ডাউনলোড করুন" does not fit half a row, so the two buttons stack. */
@media (max-width: 419px) { .hm-hero__actions { grid-template-columns: 1fr; gap: 8px; } }

.hm-fan { position: relative; height: 190px; margin-top: 4px; }
.hm-fan--books { height: 150px; }
.hm-fan__book, .hm-fan__poster { position: absolute; display: block; overflow: hidden; background: var(--g-icon-bg); border: 3px solid #fff; box-shadow: 0 6px 16px rgba(30, 20, 90, .18); }
.hm-fan img { width: 100%; height: 100%; object-fit: cover; }
.hm-fan__book { top: 7px; width: 27%; max-width: 150px; aspect-ratio: 85 / 120; border-radius: 8px; }
.hm-fan__book--1 { left: 1%; transform: rotate(-18deg); }
.hm-fan__book--2 { left: 19%; transform: rotate(-9deg); }
.hm-fan__book--3 { left: 54%; transform: rotate(9deg); }
.hm-fan__book--4 { left: 72%; transform: rotate(18deg); }
.hm-fan--books .hm-fan__book { top: 10px; }
.hm-fan__poster { left: 50%; bottom: 0; width: 69%; max-width: 380px; aspect-ratio: 16 / 9; transform: translateX(-50%); border-width: 4px; border-radius: 12px; box-shadow: 0 10px 24px rgba(30, 20, 90, .25); }
@media (hover: hover) {
  .hm-fan__book, .hm-fan__poster { transition: transform .2s; }
  .hm-fan__book:hover { z-index: 2; }
}

/* ---------- Proof chip above the heading ---------- */
.hm-hero .hm-proof { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px; border-radius: 999px;
  background: var(--g-year); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.45; text-align: left; }
.hm-hero .hm-proof svg { flex: none; color: var(--g-gold); }

/* ---------- Free tools strip under the hero ---------- */
.hm-quick { display: flex; flex-direction: column; gap: 6px; margin-top: calc(var(--g-gap) * -.5); }
.hm-quick__name { font-size: 15px; color: var(--g-muted); }
.hm-quick ul { display: flex; gap: 8px; margin: 0 -12px; padding: 0 12px 4px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.hm-quick ul::-webkit-scrollbar { display: none; }
.hm-quick a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: var(--g-tile); border: 1px solid var(--g-tile-line); color: var(--g-text); font-size: 15px; font-weight: 700; }
.hm-quick a svg { color: var(--g-accent); }
.hm-quick a:hover { background: var(--g-tile-hover); color: var(--g-accent); }
.hm-quick a.hm-quick__all { color: var(--g-accent); }

/* ---------- Which step are you on: chips and the course grid ---------- */
.hm-steps__beat { display: block; width: 100%; height: 34px; margin: -6px 0 2px; }
.hm-steps__beat polyline { fill: none; stroke: var(--g-pink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hm-chips { display: flex; gap: 8px; margin: 0 -12px 12px; padding: 2px 12px 6px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.hm-chips::-webkit-scrollbar { display: none; }
.hm-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  background: var(--g-tile); border: 2px solid var(--g-tile-line); color: var(--g-text); font-size: 16px; font-weight: 700; }
.hm-chip:hover { color: var(--g-accent); }
.hm-chip[aria-current="true"] { background: var(--g-brand); border-color: var(--g-brand); color: #fff; }
/* One card a row on phones, swiping sideways; the next card peeks in so the row looks swipeable. */
.hm-grid { --g-swipe-w: min(300px, calc(100vw - 72px)); }
.hm-grid > [hidden] { display: none; }
.hm-steps__all { display: flex; width: 100%; margin-top: 6px; }

/* ---------- Features with a drawn preview ---------- */
.hm-feat { overflow: hidden; padding-bottom: 0; }
.hm-feat__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-feat__tab { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 14px; border: 2px solid var(--g-tile-line);
  background: var(--g-tile); color: var(--g-text); font: inherit; text-align: left; cursor: pointer; }
.hm-feat__tab b { font-size: 14px; line-height: 1.3; }
.hm-feat__tab[aria-selected="true"] { background: var(--g-tile-hover); border-color: var(--c); box-shadow: 0 6px 14px rgba(60, 40, 160, .12); }
.hm-feat__tab:hover { background: var(--g-tile-hover); }
.hm-feat__stage { display: grid; margin: 14px -12px 0; }
.hm-prev { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 14px 0;
  background: color-mix(in srgb, var(--c) 10%, transparent); border-top: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
/* Every preview keeps its place in the grid cell, so the panel is always as tall as the tallest one. */
.hm-prev[hidden] { display: flex; visibility: hidden; }
.hm-prev__text h3 { margin: 0; font-size: 19px; color: var(--c-text); }
.hm-prev__text p { margin: 2px 0 0; font-size: 15px; color: var(--g-muted); }
.hm-phone { width: 236px; margin: auto auto 0; }
.hm-phone__screen { height: 320px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 16px 14px 14px; border: 8px solid #1b1640; border-bottom: 0; border-radius: 28px 28px 0 0;
  background: #fff; color: #0f172a; font-size: 13px; line-height: 1.4; text-align: left; }

/* The drawn screens (home/mocks/*). Always light, like a real phone screenshot. */
.hm-m-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.hm-m-muted { color: #475569; font-size: 12.5px; }
.hm-m-link { color: #532ceb; font-weight: 700; font-size: 12.5px; }
.hm-m-timer, .hm-m-live, .hm-m-free { padding: 1px 9px; border-radius: 999px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.hm-m-timer { background: #fde8ef; color: #be123c; }
.hm-m-live { background: #dcfce7; color: #047857; }
.hm-m-free { background: #dcfce7; color: #047857; }
.hm-m-seg, .hm-m-days { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #f4f4f8; font-size: 12.5px; }
.hm-m-seg span, .hm-m-days span { flex: 1; padding: 3px 6px; border-radius: 8px; text-align: center; color: #475569; }
.hm-m-seg .on, .hm-m-days .on { background: #fff; color: #0f172a; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.hm-m-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #f4f4f8; }
.hm-m-row span { display: flex; flex-direction: column; min-width: 0; }
.hm-m-row small { color: #475569; font-size: 12px; }
.hm-m-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #6d34e8; }
.hm-m-dot--live { background: #e8185e; box-shadow: 0 0 0 3px rgba(232, 24, 94, .2); }
.hm-m-dot--pdf { background: #1489f0; }
.hm-m-tag { flex: none; padding: 1px 7px; border-radius: 6px; background: #ede9fe; color: #5b21d6; font-size: 11.5px; font-weight: 700; }
.hm-m-tag--exam { background: #fde8ef; color: #be123c; }
.hm-m-tag--pdf { background: #e0f2fe; color: #0369a1; }
.hm-m-btn { margin-top: auto; padding: 8px; border-radius: 10px; background: #5b31e1; color: #fff; font-weight: 700; text-align: center; }
.hm-m-q { font-size: 14px; line-height: 1.4; }
.hm-m-opt { display: block; padding: 6px 10px; border-radius: 10px; background: #f4f4f8; border: 2px solid #f4f4f8; }
.hm-m-opt.on { background: #efeaff; border-color: #5b31e1; }
.hm-m-pop { position: absolute; right: -46px; bottom: 18px; width: 150px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid #ddd8f5; box-shadow: 0 8px 20px rgba(60, 40, 160, .18); color: #0f172a; }
.hm-m-pop span { display: flex; justify-content: space-between; margin: 2px 0; }
.hm-m-good { color: #047857; } .hm-m-bad { color: #be123c; }
.hm-m-pop small { color: #475569; font-size: 11.5px; }
.hm-phone { position: relative; }
.hm-m-sheet { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border: 1.5px dashed #94a3b8; border-radius: 8px; }
.hm-m-bubbles { display: flex; gap: 12px; }
.hm-m-bubbles i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #475569; }
.hm-m-bubbles i.on { background: #0f172a; border-color: #0f172a; }
.hm-m-corner { position: absolute; right: 8px; top: 8px; width: 12px; height: 12px; background: #0f172a; }
.hm-m-page { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; }
.hm-m-page i { display: block; height: 7px; border-radius: 4px; background: #cbd5e1; }
.hm-m-page i.short { width: 60%; }
.hm-m-page i.mark { background: #fde047; box-shadow: 0 0 0 3px rgba(253, 224, 71, .5); }
.hm-m-pin { position: absolute; right: 8px; bottom: 10px; padding: 1px 8px; border-radius: 8px 8px 8px 0; background: #1489f0; color: #fff; font-size: 11.5px; font-weight: 700; }
.hm-m-field { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; border: 1px solid #e2e8f0; }
.hm-m-field small { color: #475569; font-size: 12px; }
.hm-m-clock { padding: 6px 0; font-size: 30px; font-weight: 700; text-align: center; color: #a21caf; letter-spacing: .04em; }
.hm-m-covers { display: flex; gap: 8px; }
.hm-m-covers img, .hm-m-covers i { flex: 1; min-width: 0; aspect-ratio: 60 / 85; border-radius: 6px; object-fit: cover; background: #e4defc; box-shadow: 0 3px 8px rgba(30, 20, 90, .15); }
.hm-m-rank { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #f4f4f8; }
.hm-m-rank > b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; font-size: 12.5px; } .hm-m-rank > b.m2 { background: #e2e8f0; } .hm-m-rank > b.m3 { background: #fed7aa; }
.hm-m-rank > i { width: 26px; height: 26px; border-radius: 50%; background: #ddd6fe; }
.hm-m-rank > span:empty { flex: 1; height: 8px; border-radius: 4px; background: #cbd5e1; }
.hm-m-rank.me { background: #efeaff; border: 2px solid #5b31e1; }

/* ---------- Free course band ---------- */
.hm-free { display: flex; flex-direction: column; gap: 12px; padding: 20px 14px; text-align: center; }
.hm-free__actions { display: flex; flex-direction: column; gap: 8px; }
.hm-free__tests { border-color: rgba(255, 255, 255, .7); background: transparent; }
.hm-free h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.hm-free h2 svg { width: 24px; height: 24px; margin-right: 8px; vertical-align: -4px; color: var(--g-gold); }

/* ---------- Free services in four groups ---------- */
.hm-svc__groups { display: flex; flex-direction: column; gap: 18px; }
.hm-svc__name { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 17px; color: var(--c-text); }
.hm-svc__name svg { flex: none; }
.hm-svc__name small { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--g-muted); }
.hm-svc__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-tool { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 10px; border-radius: 14px; background: var(--g-tile); border: 2px solid var(--c); color: var(--g-text); }
a.hm-tool:hover { background: var(--g-tile-hover); box-shadow: 0 6px 14px rgba(60, 40, 160, .12); }
.hm-tool .g-ico-sq { align-self: center; }
.hm-tool__text { display: flex; flex-direction: column; min-width: 0; }
.hm-tool__text b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.hm-tool__text small { display: none; }
/* A lone last tile takes the whole row, so no group ends with a hole. */
.hm-tool:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Video lectures ---------- */
.hm-video { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.hm-video__thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #2a2550; }
.hm-video__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-video__thumb i { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(15, 23, 42, .55); }
.hm-video__thumb i::before { content: ""; margin-left: 4px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.hm-video b { font-size: 15px; line-height: 1.4; }

/* ---------- Proof: proud students and their reviews ---------- */
.hm-years { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; text-align: center; }
.hm-year { padding: 10px 4px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.hm-year span { display: block; font-size: 14px; color: var(--g-muted); }
.hm-year b { display: block; font-size: 20px; line-height: 1.3; color: var(--g-pink); }
.hm-year--now { background: var(--g-year); border-color: #7a5cf0; }
.hm-year--now span { color: #e3dcff; }
.hm-year--now b { color: var(--g-gold); }
.hm-posters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hm-poster { display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: center; }
.hm-poster img { width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: var(--g-icon-bg); }
.hm-poster b { font-size: 14px; color: var(--g-accent); }
.hm-years__note { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--g-muted); }
.hm-proof-sec__sub { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 19px; }
.hm-proof-sec__sub svg { color: var(--g-orange); }
.hm-proof-sec__sub a { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--g-accent); }

/* ---------- Success stories ---------- */
.hm-stories__list { display: grid; gap: 10px; }
.hm-story { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px; }
.hm-story__stars { display: flex; gap: 3px; }
.hm-story__stars i { width: 15px; height: 15px; background: #d6d3e8; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.hm-story__stars i.on { background: #f59e0b; }
.hm-story blockquote { margin: 0; font-size: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.hm-story figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.hm-story figcaption img, .hm-story__face { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.hm-story__face { display: grid; place-items: center; background: var(--g-icon-bg); color: var(--g-accent); font-weight: 700; }
.hm-story figcaption span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.hm-story figcaption small { font-size: 14px; color: var(--g-muted); }

/* ---------- Call ---------- */
.hm-call { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px; }
.hm-call h2 { margin: 0; font-size: 22px; }
.hm-call h2 svg { width: 24px; height: 24px; margin-right: 8px; vertical-align: -4px; color: var(--g-accent); }
.hm-call p { margin: 4px 0 0; font-size: 16px; color: var(--g-muted); }
.hm-call__actions { display: flex; flex-direction: column; gap: 8px; }
.hm-call__actions .g-btn:first-child { font-size: 18px; letter-spacing: .02em; }

/* ---------- Community ---------- */
.hm-comm__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.hm-comm__stat { text-align: center; padding: 10px 6px; }
.hm-comm__stat:only-child { grid-column: 1 / -1; }
.hm-comm__stat b { display: block; font-size: 22px; line-height: 1.3; color: var(--g-accent); }
.hm-comm__stat span { font-size: 14px; color: var(--g-muted); }
.hm-comm__links { display: flex; flex-direction: column; gap: 8px; }
.hm-comm__link { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 16px; background: #4a27d6; color: #fff; }
.hm-comm__link:hover { color: #fff; filter: brightness(1.08); }
.hm-comm__link svg { flex: none; }
.hm-comm__link span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hm-comm__link small { font-size: 14px; opacity: .9; }
.hm-comm__link em { flex: none; margin-left: auto; padding: 2px 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .45); font-style: normal; font-size: 14px; font-weight: 700; }
.hm-comm__link--blue { background: #1d5fc4; }
.hm-comm__link--green { background: #0e7a4b; }
.hm-comm__link--red { background: #be123c; }
.hm-comm__link--amber { background: #a45200; }

/* ---------- FAQ ---------- */
.hm-faq .g-faq p { margin: 0; overflow-wrap: anywhere; }
.hm-faq .g-faq p + p { margin-top: 8px; }
.hm-faq .g-faq a { color: var(--g-accent); text-decoration: underline; }
.hm-faq__all { display: flex; width: 100%; margin-top: 12px; }

/* ---------- Wider phones and tablets ---------- */
@media (min-width: 600px) {
  .hm-fan { height: 240px; }
  .hm-fan__book { width: 22%; }
  .hm-fan__book--1 { left: 6%; } .hm-fan__book--2 { left: 22%; } .hm-fan__book--3 { left: 56%; } .hm-fan__book--4 { left: 72%; }
  .hm-fan__poster { width: 56%; }
  .hm-call__actions { flex-direction: row; }
  .hm-call__actions .g-btn { flex: 1; }
  .hm-stories__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-svc__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Computers ---------- */
@media (min-width: 1024px) {
  .hm-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; align-items: center; padding: 28px; text-align: left; }
  .hm-hero__text { gap: 18px; }
  .hm-hero h1 { font-size: 42px; line-height: 1.3; }
  .hm-hero p { font-size: 17px; }
  .hm-hero__actions { display: flex; gap: 14px; }
  .hm-hero__actions .g-btn { min-width: 190px; padding: 0 24px; }
  .hm-fan { height: 340px; margin: 0; }
  .hm-fan--books { height: 260px; }
  .hm-fan__book { width: 24%; }
  .hm-fan__book--1 { left: 2%; } .hm-fan__book--2 { left: 20%; } .hm-fan__book--3 { left: 56%; } .hm-fan__book--4 { left: 74%; }
  .hm-fan__poster { width: 62%; }

  .hm-hero .hm-proof { align-self: flex-start; font-size: 15px; }
  .hm-quick { flex-direction: row; align-items: center; gap: 14px; }
  .hm-quick ul { margin: 0; padding: 0; flex-wrap: wrap; }

  .hm-chips { margin: 0 0 16px; padding: 0; flex-wrap: wrap; }
  .hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; overflow: visible; margin: 0; padding: 0; }
  .hm-grid > * { width: auto; }
  .hm-steps__all { width: auto; margin: 18px auto 0; min-width: 260px; }
  .hm-free__actions { flex-direction: row; }

  .hm-feat__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: stretch; padding-bottom: 28px; }
  .hm-feat__list { grid-template-columns: 1fr; gap: 10px; }
  .hm-feat__tab { min-height: 70px; padding: 10px 18px; gap: 14px; }
  .hm-feat__tab b { font-size: 17px; }
  .hm-feat__tab .g-ico-sq { width: 30px; height: 30px; border-radius: 9px; }
  .hm-feat__tab .g-ico-sq svg { width: 18px; height: 18px; }
  .hm-feat__stage { margin: 0; }
  .hm-prev { padding: 26px 26px 0; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 24px; overflow: hidden; }
  .hm-prev__text h3 { font-size: 22px; }
  .hm-prev__text p { font-size: 16px; }
  .hm-phone { width: 300px; }
  .hm-phone__screen { height: 470px; gap: 10px; padding: 20px 18px 18px; font-size: 14px; }

  .hm-free { flex-direction: row; align-items: center; justify-content: space-between; padding: 26px 32px; text-align: left; }
  .hm-free .g-btn { width: auto; min-width: 220px; }

  .hm-svc__groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .hm-svc__name { padding-bottom: 8px; border-bottom: 2px solid var(--c); }
  .hm-svc__name small { display: none; }
  .hm-svc__tiles { grid-template-columns: 1fr; gap: 12px; }
  .hm-tool { min-height: 84px; padding: 10px 14px; gap: 12px; }
  .hm-tool .g-ico-sq { width: 30px; height: 30px; border-radius: 9px; }
  .hm-tool .g-ico-sq svg { width: 18px; height: 18px; }
  .hm-tool__text b { font-size: 16px; }
  .hm-tool__text small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; color: var(--g-muted); }

  .hm-years { gap: 18px; }
  .hm-year { padding: 26px 8px; }
  .hm-year span { font-size: 16px; }
  .hm-year b { font-size: 36px; }
  .hm-posters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }

  .hm-stories__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .hm-story { padding: 20px; }

  .hm-call { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; }
  .hm-call__actions { flex: none; width: 520px; }

  .hm-comm__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
  .hm-comm__stat:only-child { grid-column: 2 / span 2; }
  .hm-comm__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .hm-comm__link { flex-direction: column; align-items: flex-start; min-height: 130px; padding: 22px 24px; border-radius: 20px; }
  .hm-comm__link em { margin: auto 0 0; }
  .hm-faq { max-width: 1216px; }
  .hm-faq__all { width: auto; margin: 16px auto 0; min-width: 260px; }
}

@media (prefers-reduced-motion: reduce) { .hm-fan__book, .hm-fan__poster { transition: none; } }

/* ===== Moving rows: success posters, student reviews, video lectures =====
   The cards are drawn twice inside .g-marquee__track, and the track slides left by one copy, so the loop has no seam.
   It stops under a mouse or finger and while a card has keyboard focus. Phones asking for less motion get a swipe row. */
.g-marquee { --g-marq-gap: 12px; overflow: hidden; margin: 10px -12px 0; padding: 4px 0 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.g-marquee.hm-posters, .g-marquee.hm-stories__list { display: block; }
.g-marquee__track { display: flex; gap: var(--g-marq-gap); width: max-content;
    animation: g-marq var(--g-marq-dur, 40s) linear infinite; will-change: transform; }
.g-marquee--back .g-marquee__track { animation-direction: reverse; }
.g-marquee:hover .g-marquee__track, .g-marquee:focus-within .g-marquee__track, .g-marquee.is-held .g-marquee__track,
.g-marquee.is-away .g-marquee__track { animation-play-state: paused; }
@keyframes g-marq { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--g-marq-gap) / 2)); } }
.g-marquee .hm-poster { flex: 0 0 150px; width: 150px; }
.g-marquee .hm-story { flex: 0 0 min(290px, calc(100vw - 72px)); width: min(290px, calc(100vw - 72px)); }
.g-marquee .hm-video { flex: 0 0 230px; width: 230px; }
.hm-videos .g-marquee { margin-left: 0; margin-right: 0; }
/* A short row (under four cards) does not move: its track steps aside and the old grid takes the cards. */
.hm-posters:not(.g-marquee) > .g-marquee__track, .hm-stories__list:not(.g-marquee) > .g-marquee__track { display: contents; }
.hm-story__face { overflow: hidden; background: transparent; }
.hm-story__face svg { display: block; width: 100%; height: 100%; }
@media (min-width: 768px) {
    .g-marquee { --g-marq-gap: 18px; margin: 18px -28px 0; }
    .hm-videos .g-marquee { margin-left: 0; margin-right: 0; }
    .g-marquee .hm-poster { flex-basis: 220px; width: 220px; }
    .g-marquee .hm-story { flex-basis: 360px; width: 360px; }
    .g-marquee .hm-video { flex-basis: 300px; width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
    .g-marquee { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
    .g-marquee__track { animation: none; }
    .g-marquee__track > [aria-hidden="true"] { display: none; }
    .g-marquee__track > * { scroll-snap-align: start; }
}

/* ---------- Features: motion ----------
   Transform and opacity only, so no box changes size and the page never jumps. The entrance waits for the
   section to scroll into view (script under home/features.blade.php adds and then removes .hmf-wait);
   switching a tab replays the text, phone and screen-row entrance because only the shown preview animates. */
@keyframes hmf-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hmf-phone { from { opacity: 0; transform: translateY(36px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hmf-row { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes hmf-pop { 0% { transform: scale(.55) rotate(-14deg); } 60% { transform: scale(1.14) rotate(5deg); } 100% { transform: none; } }
@keyframes hmf-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes hmf-dot { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .55); } 100% { box-shadow: 0 0 0 7px rgba(225, 29, 72, 0); } }
@keyframes hmf-scan { from { background-position: 0 -40%; } to { background-position: 0 140%; } }
@keyframes hmf-glow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 55%, transparent)); } }

.hm-feat__tab { transition: translate .2s ease, background-color .25s, border-color .25s, box-shadow .25s; }
.hm-feat__tab:active { translate: 0 1px; }
@media (hover: hover) { .hm-feat__tab:hover { translate: 4px 0; } }
.hm-feat__tab[aria-selected="true"] .g-ico-sq { animation: hmf-pop .5s cubic-bezier(.3, 1.4, .5, 1) both, hmf-ring 2s .5s ease-out infinite; }

.hm-feat__list > .hm-feat__tab { animation: hmf-up .45s cubic-bezier(.2, .8, .2, 1) both; }
.hm-feat__list > .hm-feat__tab:nth-child(2) { animation-delay: .05s; }
.hm-feat__list > .hm-feat__tab:nth-child(3) { animation-delay: .1s; }
.hm-feat__list > .hm-feat__tab:nth-child(4) { animation-delay: .15s; }
.hm-feat__list > .hm-feat__tab:nth-child(5) { animation-delay: .2s; }
.hm-feat__list > .hm-feat__tab:nth-child(6) { animation-delay: .25s; }
.hm-feat__list > .hm-feat__tab:nth-child(7) { animation-delay: .3s; }
.hm-feat__list > .hm-feat__tab:nth-child(8) { animation-delay: .35s; }

.hm-prev:not([hidden]) .hm-prev__text h3 { animation: hmf-up .45s cubic-bezier(.2, .8, .2, 1) both; }
.hm-prev:not([hidden]) .hm-prev__text p { animation: hmf-up .45s .08s cubic-bezier(.2, .8, .2, 1) both; }
.hm-prev:not([hidden]) .hm-phone { animation: hmf-phone .6s .12s cubic-bezier(.2, .8, .2, 1) both; }
.hm-prev:not([hidden]) .hm-phone__screen > * { animation: hmf-row .42s cubic-bezier(.2, .8, .2, 1) both; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(1) { animation-delay: .3s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(2) { animation-delay: .36s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(3) { animation-delay: .42s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(4) { animation-delay: .48s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(5) { animation-delay: .54s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(6) { animation-delay: .6s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(7) { animation-delay: .66s; }
.hm-prev:not([hidden]) .hm-phone__screen > :nth-child(n+8) { animation-delay: .72s; }

/* Small live touches inside the drawn screens */
.hm-prev:not([hidden]) .hm-m-row:nth-child(3) .hm-m-dot { animation: hmf-dot 1.6s 1s ease-out infinite; }
.hm-prev:not([hidden]) .hm-phone__screen > .hm-m-opt.on { animation: hmf-row .42s .54s both, hmf-glow 2.4s 1.2s ease-in-out infinite; }
.hm-prev:not([hidden]) .hm-phone__screen > .hm-m-rank.me { animation: hmf-row .42s .72s both, hmf-glow 2.4s 1.4s ease-in-out infinite; }
.hm-m-sheet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent 44%, color-mix(in srgb, var(--c, #ea8a1a) 55%, transparent) 50%, transparent 56%) no-repeat;
  background-size: 100% 60%; }
.hm-prev:not([hidden]) .hm-m-sheet::after { opacity: 1; animation: hmf-scan 2.2s .9s ease-in-out infinite alternate; }

/* Before the section is on screen: hold everything still and invisible, so the entrance plays when it is seen. */
.hmf-wait .hm-feat__tab, .hmf-wait .hm-prev__text > *, .hmf-wait .hm-phone, .hmf-wait .hm-phone__screen > * { animation: none !important; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .hm-feat *, .hm-feat *::after { animation: none !important; transition: none !important; }
}
