/* Home page (module/home/index.php), on top of market.css. Loaded via var_custom_css in Main::index. */

/* ---------- Hero & search ---------- */
.hm-hero { padding: 44px 40px 36px; text-align: center; }
.hm-hero h1 { font-size: 36px; margin-bottom: 10px; }
.hm-hero .mk-lead { margin: 0 auto 24px; font-size: 16px; }
.hm-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; background: #fff; border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); text-align: left; }
.hm-search > i { color: var(--mk-muted); font-size: 20px; }
.hm-search input { flex: 1; min-width: 0; border: 0; outline: 0; height: 46px; font-size: 16px; color: var(--mk-ink); background: none; }
.hm-search button { border: 0; border-radius: 10px; background: var(--mk-brand); color: #fff; font-weight: 600; font-size: 15px; padding: 0 22px; height: 46px; cursor: pointer; }
.hm-search button:hover { background: var(--mk-brand-dark); }
.hm-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.hm-results a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--mk-ink) !important; text-decoration: none; }
.hm-results a:hover, .hm-results a.active { background: var(--mk-brand-soft); }
.hm-results a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.hm-results b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-results small { color: var(--mk-muted); font-size: 12px; }
.hm-results .hm-none { padding: 10px; color: var(--mk-muted); font-size: 14px; }
.hm-try { margin: 18px 0 0; font-size: 13px; color: #9cc7c6; }
.hm-try a { color: #e3f2f1 !important; border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 3px 10px; margin: 0 2px; text-decoration: none; white-space: nowrap; display: inline-block; margin-top: 6px; }
.hm-try a:hover { border-color: #fff; }

/* ---------- Section headings ---------- */
.hm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 30px 0 12px; }
.hm-head h2 { font-size: 22px; font-weight: 700; color: var(--mk-ink) !important; margin: 0; }
.hm-head a { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ---------- Markets ---------- */
.hm-markets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hm-market { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 16px; color: var(--mk-ink) !important; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.hm-market:hover { border-color: var(--mk-brand); box-shadow: 0 8px 22px rgba(6,106,109,.1); transform: translateY(-2px); }
.hm-market-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hm-market-head img { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--mk-line); object-fit: cover; }
.hm-market-head > span { display: flex; flex-direction: column; min-width: 0; }
.hm-market-head b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-market:hover .hm-market-head b { color: var(--mk-brand); }
.hm-market-head small { font-size: 12px; color: var(--mk-muted); }
.hm-market-nums { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.hm-market-nums small { display: block; font-size: 11px; font-weight: 600; color: var(--mk-muted); text-transform: uppercase; letter-spacing: .3px; }
.hm-market-nums b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hm-market .mk-breadth { margin: 0; height: 6px; }
.hm-market-foot { font-size: 12px; color: var(--mk-muted); margin-top: -6px; }
.hm-market-foot .up { color: #12805c; }
.hm-market-foot .dn { color: #c8372d; }

/* ---------- Tabs & chips ---------- */
.hm-tabbed { padding: 0; overflow: hidden; }
.hm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--mk-line); padding: 0 12px; }
.hm-tabs::-webkit-scrollbar { display: none; }
.hm-tabs button { flex-shrink: 0; border: 0; background: none; min-height: 48px; padding: 3px 14px 0; font-weight: 600; font-size: 14px; color: var(--mk-muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.hm-tabs button:hover { color: var(--mk-ink); }
.hm-tabs button.active { color: var(--mk-brand); border-bottom-color: var(--mk-brand); }
.hm-movers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; padding: 18px 22px; }
.hm-movers h3 { font-size: 15px; font-weight: 700; color: var(--mk-ink) !important; margin: 0 0 4px; }
.hm-movers .mk-movers .mk-stock small { max-width: 160px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hm-chips button { border: 1px solid var(--mk-line); background: #fff; color: var(--mk-muted); border-radius: 18px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.hm-chips button:hover { border-color: var(--mk-brand); color: var(--mk-brand); }
.hm-chips button.active { background: var(--mk-brand); border-color: var(--mk-brand); color: #fff; }
[role=tabpanel][hidden] { display: none !important; }

/* ---------- How we score & FAQ ---------- */
.hm-method { margin-top: 30px; padding: 28px; }
.hm-method h2, .hm-faq h2 { font-size: 22px; }
.hm-method-lead { color: #3b4650; line-height: 1.7; max-width: 820px; margin-bottom: 20px; }
.hm-method-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.hm-method-grid > div { border: 1px solid var(--mk-line); border-radius: 10px; padding: 16px; }
.hm-method-grid i { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--mk-brand-soft); color: var(--mk-brand); font-size: 19px; margin-bottom: 10px; }
.hm-method-grid h3 { font-size: 15px; font-weight: 700; color: var(--mk-ink) !important; margin: 0 0 6px; }
.hm-method-grid p { font-size: 13px; color: var(--mk-muted); line-height: 1.55; margin: 0; }
.hm-scale { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; font-size: 13px; color: var(--mk-muted); }
.hm-scale > span { display: inline-flex; align-items: center; gap: 6px; }
.hm-faq { padding: 28px; margin-bottom: 30px; }
.hm-faq .mk-faq p { color: #3b4650; line-height: 1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.hm-markets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
	.hm-movers { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 767px) {
	.hm-hero { padding: 30px 18px 26px; }
	.hm-hero h1 { font-size: 26px; }
	.hm-search { padding-left: 12px; }
	.hm-search button { padding: 0 14px; }
	.hm-markets { grid-template-columns: 1fr; }
	.hm-method-grid { grid-template-columns: 1fr; }
	.hm-method, .hm-faq { padding: 20px; }
	.hm-head h2, .hm-method h2, .hm-faq h2 { font-size: 19px; }
}
