:root{--cm-green:#14643e;--cm-green-hover:#0f5534} /* TASK 13:30: ONE brand green for /coach, /platform-account, /platform-profile, home, login */
.home-page, .home-footer {
  --home-gutter: clamp(20px, 5.55vw, 76px);
  --home-ink: #102c2b;
  --home-green: var(--cm-green);
  --home-mint: #edf4ef;
  color: var(--home-ink);
}

.home-container, .home-footer-layout {
  width: min(calc(100% - var(--home-gutter) * 2), 1248px);
  margin-inline: auto;
}

.home-page h2 {
  font-size: var(--fs-page);
  line-height: 1.17;
}

.home-page h3 { letter-spacing: -.026em; }

.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(126deg, #fcfdfc, #eef4f0 76%);
}

.home-hero-layout {
  display: grid;
  align-items: center;
  min-height: clamp(356px, 34.8vw, 478px);
  padding-block: 35px;
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  width: 50.5%;
  max-width: 560px;
  padding-left: clamp(0px, .65vw, 7px);
}

.home-hero h1 {
  margin-bottom: 13px;
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -.047em;
  line-height: 1.12;
}

.home-hero h1 span { display: block; }
.home-hero-description { margin-bottom: 24px; font-size: var(--fs-body); line-height: 1.39; }

.home-hero-photo {
  position: absolute;
  inset: 8px 0 0 auto;
  width: 47.5%;
  overflow: hidden;
  background: #105746;
  clip-path: polygon(17% 0, 100% 0, 100% 100%, 24% 100%, 5% 77%, 1% 70%, 0 64%);
}

.home-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 56% 59%; }

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.23fr);
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 540px;
  margin-left: -3px;
  padding: 4px;
  border: 1px solid #d8e5dc;
  border-radius: 12px;
  background: #f9fcfa;
}

.home-search-city {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: #145339;
}

.home-search-city > svg, .home-search-chevron { position: absolute; pointer-events: none; }
.home-search-city > svg { left: 13px; width: 20px; height: 20px; }
.home-search-chevron { display: flex; right: 12px; }
.home-search-chevron svg { width: 17px; height: 17px; }

.home-search select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 42px;
  border: 0;
  border-radius: 8px;
  color: var(--home-ink);
  background: transparent;
  font-size: var(--fs-meta);
  cursor: pointer;
}

.home-search button, .home-coach-banner > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--cm-green);
  font-size: var(--fs-meta);
  font-weight: 800;
  white-space: nowrap;
}

.home-search button { grid-column: 1 / -1; }
.home-search button:hover { background: var(--cm-green-hover); }
.home-search button svg { width: 19px; height: 19px; }
.home-cities { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 15px 0 0; font-size: var(--fs-label); }
.home-cities strong { margin-right: 2px; }
.home-cities a { display: inline-flex; align-items: center; min-height: 29px; padding: 3px 12px; border: 1px solid #bed3c5; border-radius: 999px; }
.home-cities a:hover { background: #e3eee6; text-decoration: none; }

.home-featured { padding-block: 26px 45px; }
.home-featured-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 26px; }
.home-featured-heading h2 { margin-bottom: 4px; }
.home-featured-heading p { margin: 0; font-size: var(--fs-meta); }
.home-featured-heading > a { display: inline-flex; align-items: center; gap: 6px; color: var(--home-green); font-size: var(--fs-label); font-weight: 800; white-space: nowrap; }
.home-featured-heading > a svg, .home-coach-banner > a svg { width: 16px; height: 16px; }

.home-coach-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.home-featured .home-coach-card { border-color: #e1e8e5; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px #164e3610; }
.home-featured .home-coach-card:hover { box-shadow: 0 12px 30px #123d301c; }
.home-coach-photo { aspect-ratio: 4 / 5; overflow: hidden; }
.home-coach-copy { display: grid; align-content: start; justify-items: start; gap: 5px; min-height: 126px; padding: 12px 15px 16px; }
.home-coach-copy h3 { margin: 0; font-size: var(--fs-section); line-height: 1.22; overflow-wrap: anywhere; }
.home-coach-copy p { margin: 0; font-size: var(--fs-label); line-height: 1.38; overflow-wrap: anywhere; }
.home-coach-location, .home-coach-rating { display: flex; align-items: center; gap: 5px; }
.home-coach-location svg, .home-coach-rating svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--home-green); }
.home-coach-copy .home-coach-level { padding: 4px 10px; border-radius: 999px; background: #e2efe6; font-size: var(--fs-label); font-weight: 800; }
.home-coach-specialties { color: #42594f; }
.home-coach-rating svg { color: #a85c00; fill: #ffb623; }
.home-featured-status { margin: 0; padding: 18px; border-radius: 10px; background: var(--home-mint); }

.home-benefits {
  display: grid;
  grid-template-columns: 1.23fr repeat(2, 1fr); /* 02/12 13:10 E: two items */
  align-items: start;
  gap: clamp(12px, 2.75vw, 36px);
  width: min(calc(100% - 32px), 1330px);
  margin-inline: auto;
  padding: 25px clamp(24px, 4.15vw, 45px);
  border-radius: 15px;
  background: #edf4ee;
}

.home-benefits h2 { align-self: center; margin: 0; padding-right: 16px; }
.home-benefits article:first-of-type { padding-left: clamp(16px, 2.6vw, 29px); border-left: 1px solid #d5e2d9; }
.home-benefits article > svg { width: 34px; height: 34px; margin-bottom: 6px; color: var(--home-green); }
.home-benefits h3, .home-steps h3 { margin-bottom: 5px; font-size: var(--fs-section); line-height: 1.23; }
.home-benefits p, .home-steps p { margin: 0; font-size: var(--fs-meta); line-height: 1.38; }

.home-steps { padding-block: 31px 47px; text-align: center; }
.home-steps h2 { margin-bottom: 19px; }
.home-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.home-steps li { position: relative; }
.home-steps li + li::before { content: "→"; position: absolute; top: 21px; left: -17px; color: var(--home-green); font-size: var(--fs-page); }
.home-steps p { max-width: 195px; margin-inline: auto; }
.home-step-icon { display: grid; place-items: center; width: 76px; aspect-ratio: 1; margin: 0 auto 10px; border-radius: 50%; color: var(--home-green); background: #eaf5e8; }
.home-step-icon svg { width: 39px; height: 39px; }

.home-coach-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - clamp(40px, 7vw, 76px)), 1300px);
  margin: 0 auto 23px;
  padding: 20px clamp(20px, 4vw, 42px);
  border-radius: 13px;
  color: #fff;
  background:
    linear-gradient(145deg, transparent 55%, #b9d6c569 55.2%, #b9d6c569 55.6%, transparent 55.8%),
    linear-gradient(10deg, transparent 55%, #b9d6c54d 55.2%, #b9d6c54d 55.7%, transparent 56%) 100% 100% / 45% 54% no-repeat,
    linear-gradient(106deg, #1d533b, #286a51);
}

.home-coach-banner h2 { margin: 0 0 5px; }
.home-coach-banner p { margin: 0; font-size: var(--fs-meta); }
.home-coach-banner > a { min-height: 45px; flex-shrink: 0; color: var(--home-ink); background: #fff; }
.home-coach-banner > a:hover { background: #e8f1eb; text-decoration: none; }
.home-coach-banner > a[hidden] { display: none !important; }
.home-footer { max-width: none; margin: 0; padding: 16px 0 23px; background: #f3f6f4; }
.home-footer-layout { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-footer-brand { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-body); font-weight: 800; letter-spacing: -.028em; }
.home-footer-brand svg, .home-footer-brand .cm-logo { width: 21px; height: 21px; color: var(--home-green); }
.home-footer-layout p { margin: 2px 0 0 28px; font-size: var(--fs-label); line-height: 1.45; }
.home-footer-layout nav { display: flex; flex-wrap: wrap; column-gap: clamp(14px, 3.4vw, 50px); row-gap: 6px; font-size: var(--fs-label); }

@media (max-width: 1100px) {
  .home-search { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 840px) {
  .home-hero-layout { min-height: 323px; }
  .home-hero-copy { width: 54%; }
  .home-hero-photo { width: 45%; }
  .home-hero h1 { font-size: var(--fs-hero); }
  .home-coach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .home-coach-copy { padding-inline: 10px; }
  .home-coach-copy h3 { font-size: var(--fs-body); }
  .home-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-benefits h2 { grid-column: 1 / -1; padding-right: 0; }
  .home-benefits article:first-of-type { padding-left: 0; border-left: 0; }
}

@media (max-width: 640px) {
  .home-hero-layout { min-height: 0; padding-block: 28px 24px; }
  .home-hero-copy { width: 100%; max-width: none; padding: 0; }
  .home-hero h1 { font-size: var(--fs-hero); }
  .home-hero-description { font-size: var(--fs-body); margin-bottom: 18px; }
  .home-hero-photo { position: relative; inset: auto; width: 100%; height: clamp(164px, 44vw, 246px); clip-path: none; }
  .home-hero-photo img { object-position: 58% 62%; }
  .home-search { max-width: none; margin-left: 0; }
  .home-search select { font-size: var(--fs-body); }
  .home-featured { padding-block: 24px 33px; }
  .home-featured-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 17px; }
  .home-featured-heading > a { min-height: 32px; }
  .home-coach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-coach-copy { min-height: 108px; }
  .home-coach-photo .coach-portrait { font-size: var(--fs-page); }
  .home-benefits { grid-template-columns: 1fr; gap: 15px; padding: 21px 18px; }
  .home-benefits article > svg { float: left; margin: 0 11px 0 0; }
  .home-benefits article h3, .home-benefits article p { margin-left: 45px; }
  .home-steps { padding-block: 28px 34px; }
  .home-steps ol { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  .home-steps li { display: grid; grid-template-columns: 52px 1fr; column-gap: 13px; align-items: center; }
  .home-steps li + li::before { display: none; }
  .home-step-icon { grid-row: span 2; width: 52px; margin: 0; }
  .home-step-icon svg { width: 27px; height: 27px; }
  .home-steps li p { max-width: none; margin: 0; }
  .home-coach-banner { align-items: flex-start; flex-direction: column; padding: 20px 17px; }
  .home-coach-banner > a { min-height: 42px; }
  .home-footer-layout { align-items: flex-start; flex-direction: column; }
  .home-footer-layout nav { row-gap: 12px; }
}

.home-search-ward select { padding-left: 13px; }
.home-search-ward select:disabled { opacity: 1; cursor: default; color: #59635e; }

@media (max-width: 360px) {
  .home-page, .home-footer { --home-gutter: 12px; }
  .home-search-chevron { right: 7px; }
  .home-search-ward select { padding-inline: 8px 25px; }
}

/* UI round 1: featured coaches full width on phones, section titles left-aligned */
.home-steps h2, .home-featured-heading, .home-benefits h2 { text-align: left; }
@media (max-width: 640px) {
  .home-coach-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-featured .home-coach-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .home-coach-photo { aspect-ratio: auto; height: 100%; min-height: 128px; }
  .home-coach-copy { min-height: 0; padding: 12px 14px; }
  .home-coach-copy p { font-size: var(--fs-meta); }
}
/* TASK 17:18 — ward chips under the homepage search */
.home-search .ward-chips { grid-column: 1 / -1; }
/* UI 19:59 A7: hidden coach block / entry stays hidden */
.home-coach-banner[hidden], .home-coach-banner [hidden] { display: none !important; }
/* UI 19:59 B4: chips, "Xem tất cả HLV" and footer links big enough to tap (≥44px) and read (≥13px) */
.home-cities a { min-height: 44px; padding: 6px 14px; font-size: var(--fs-meta); }
.home-section-heading a, a.home-all-link, .home-featured a.home-link { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--fs-body); }
.home-footer-layout nav { font-size: var(--fs-meta); }
.home-footer-layout nav a { min-height: 44px; display: inline-flex; align-items: center; }
.home-footer-layout p { font-size: var(--fs-label); }
.home-featured-heading > a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-body); }

/* 13:25 C — "×" on a chosen ward chip: a small icon in text colour, no fill, inside the rounded chip; the chip keeps its
   height (the 44px tap area comes from a transparent ::after, not from the button box); light grey circle on hover / focus. */
.home-search .ward-chip { min-height: 32px; padding: 2px 6px 2px 12px; gap: 2px; }
.home-search .ward-chip button[data-ward-remove] {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 24px; height: 24px; min-width: 0; min-height: 0; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; color: #17392e;
  font-size: var(--fs-label); font-weight: 600; line-height: 1; grid-column: auto;
}
.home-search .ward-chip button[data-ward-remove]::after { content: ''; position: absolute; inset: -10px; }
.home-search .ward-chip button[data-ward-remove]:hover,
.home-search .ward-chip button[data-ward-remove]:focus-visible { background: #e3e8e5; outline-offset: 0; }
/* TASK 19:30 E — homepage */
/* E5: "Vì sao chọn Coachminton?", the green coach block and "Cách hoạt động" share ONE left edge with the page content */
.home-benefits, .home-coach-banner { width: min(calc(100% - var(--home-gutter) * 2), 1248px); }
/* E3: the decorative lines stay in the right part of the green block (no text there) and are lighter */
.home-coach-banner {
  background:
    linear-gradient(145deg, transparent 55%, #b9d6c540 55.2%, #b9d6c540 55.6%, transparent 55.8%) 100% 0 / 32% 100% no-repeat,
    linear-gradient(10deg, transparent 55%, #b9d6c533 55.2%, #b9d6c533 55.7%, transparent 56%) 100% 100% / 32% 54% no-repeat,
    linear-gradient(106deg, #1d533b, #286a51);
}
.home-coach-banner > div { position: relative; z-index: 1; }
/* E4: "Vào trang HLV" — 48px like the site's buttons */
.home-coach-banner > a { min-height: 48px; border-radius: 8px; font-weight: 600; }
@media (max-width: 640px) {
  /* E3 phone: text runs full width, so only a short line in the bottom-right corner, under the button row */
  .home-coach-banner { background: linear-gradient(10deg, transparent 55%, #b9d6c533 55.2%, #b9d6c533 55.7%, transparent 56%) 100% 100% / 40% 30% no-repeat, linear-gradient(106deg, #1d533b, #286a51); }
  .home-coach-banner > a { min-height: 48px; }
  /* E1 phone footer: description and links on one left edge, even spacing between the link rows */
  .home-footer-layout p { margin-left: 0; }
  .home-footer-layout { gap: 8px; }
  .home-footer-layout nav { row-gap: 0; column-gap: 20px; }
  /* E2 phone: "Phổ biến" chips the same size as the ward chips above (32px chip, 14px text); 44px tap area kept invisibly */
  .home-cities a { position: relative; min-height: 44px; padding: 8px 12px; font-size: var(--fs-meta); }
  .home-cities a::after { content: ''; position: absolute; inset: -6px 0; }
}

/* TASK 06:35 — searchable province / ward pickers (home search + Tìm HLV). The native selects stay in the form (no-JS fallback) but are
   hidden once the picker is drawn; the list opens right under the field, ~6 rows tall, scrolls inside, rows ≥ 44px. */
.pick-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.pick-host { position: relative; }
.pick { position: relative; flex: 1 1 auto; width: 100%; min-width: 0; }
.pick-box { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 44px; width: 100%; box-sizing: border-box; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pick-chips:empty { display: none; }
.pick-trigger { flex: 1 1 8rem; min-width: 0; min-height: 44px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty .pick-value { color: #59635e; }
.pick-disabled .pick-trigger { cursor: not-allowed; color: #7b8780; }
.pick-panel { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 6px; padding: 8px; background: #fff; border: 1px solid #cfdcd4; border-radius: 8px; box-shadow: 0 10px 28px rgba(18, 61, 48, .16); box-sizing: border-box; }
.pick-panel[hidden] { display: none; }
.pick-input { width: 100%; min-height: 44px; box-sizing: border-box; padding: 0 12px; border: 1px solid #cfdcd4; border-radius: 8px; font: inherit; font-size: 16px; color: #123d30; background: #fff; }
.pick-input:focus { outline: 2px solid #14643e; outline-offset: 1px; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; }
.pick-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 6px; color: #123d30; cursor: pointer; overflow-wrap: anywhere; }
.pick-opt.pick-active { background: #eef6f1; box-shadow: inset 0 0 0 2px #9cc9ad; }
.pick-opt.pick-on { background: #e3f3ea; font-weight: 800; }
.pick-check { flex: none; width: 18px; color: #14643e; font-weight: 800; }
.pick-opt.pick-off { opacity: .45; cursor: default; }
.pick-note { min-height: 44px; display: flex; align-items: center; padding: 0 10px; color: #59635e; }
.pick-foot { margin: 0; padding: 0 4px; font-size: 14px; color: #3f5248; }
.pick-foot[hidden] { display: none; }
/* home search: same box as the old select (pin icon at the left, chevron at the right) */
.home-search .pick-trigger { padding: 0 36px 0 42px; font-size: var(--fs-meta); color: var(--home-ink); }
.home-search-ward .pick-trigger { padding-left: 13px; }
.home-search .pick-chips { width: 100%; padding: 6px 30px 0 8px; box-sizing: border-box; }
.home-search .pick-chips .ward-chip { min-height: 32px; padding: 2px 6px 2px 12px; gap: 2px; }
@media (max-width: 640px) { .home-search .pick-trigger { font-size: var(--fs-body); } }
/* SỬA GẤP 09:31: the 06:35 picker trigger is a <button>, so ".home-search button" (the green "Tìm HLV" button) painted it green with
   centred bold text. Undo that here: it is a field — white, 1px grey border like the inputs, dark left text; locked = light grey, readable grey. */
.home-search .pick-box { background: #fff; border: 1px solid #cfdcd4; border-radius: 8px; }
.home-search .pick-trigger, .home-search .pick-trigger:hover { display: block; grid-column: auto; gap: 0; border: 0; border-radius: 8px; background: transparent; color: var(--home-ink); font-weight: 400; text-align: left; justify-content: flex-start; }
.home-search .pick-disabled .pick-box { background: #eef1ef; border-color: #cfd6d2; }
.home-search .pick-disabled .pick-trigger, .home-search .pick-disabled .pick-trigger:hover, .home-search .pick-disabled .pick-value { background: transparent; color: #4f5a55; }
/* Tìm HLV filters: the box looks like the other filter fields */
.filters .pick-box { border: 1px solid #cdd9d0; border-radius: 6px; background: #fff; padding: 0 6px; }
.filters .pick-trigger { padding: 0 6px; }

/* TASK 23:15 · 16 — "Bạn có CLB, trung tâm?" (after HLV nổi bật), the /coach buttons and type sizes */
.home-centre-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:28px auto;padding:22px 24px;border:1px solid #d8e5dc;border-radius:14px;background:#f4f9f5}
.home-centre-banner h2{margin:0 0 6px}.home-centre-banner p{margin:0 0 10px;color:#3f5248}
.home-centre-ticks{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.home-centre-ticks li{position:relative;padding-left:24px;color:#123d30;font-weight:600}
.home-centre-ticks li::before{content:'✓';position:absolute;left:0;color:var(--cm-green);font-weight:800}
.home-centre-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:8px;background:var(--cm-green);color:#fff;font-size:var(--fs-meta);font-weight:800;text-decoration:none;white-space:nowrap;flex:none}
.home-centre-cta:hover{background:var(--cm-green-hover)}.home-centre-cta svg{width:16px;height:16px}
@media (max-width:740px){.home-centre-banner{flex-direction:column;align-items:stretch;padding:18px 16px;margin-inline:var(--home-gutter,16px)}.home-centre-cta{white-space:normal;text-align:center}}
/* SỬA NHỎ 12:36 (Leader 12:38) — two boxes ALWAYS the same height (side by side on a computer, stacked on a phone); the chosen wards are ONE
   row of small chips UNDER both boxes (wraps); "Tìm HLV" last, full width; the province text starts at the same left edge as the ward text. */
.home-search { align-items: stretch; }
.home-search .pick-host { min-height: 46px; }
.home-search .pick-host > svg { display: none; }
.home-search .pick-trigger, .home-search-ward .pick-trigger { padding-left: 13px; }
.home-search .pick-chips { display: none; }
.home-search .pick-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 2px; }
.home-search .pick-chip-row[hidden] { display: none; }
.home-search .pick-chip-row .ward-chip { min-height: 32px; padding: 2px 6px 2px 12px; gap: 2px; white-space: nowrap; max-width: 100%; }
.filters .pick-chips { display: none; }
.filters .pick-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .pick-chip-row[hidden] { display: none; }
