/* Tuition homepage (/tuition, Views/Tuition/Index.cshtml). Builds on tuition.css (.tu variables, cards).
   Prefix th-. Light + dark (html[data-theme="dark"]). */
.th { --th-hero1: #064e4a; --th-hero2: #0d9488; --th-hero3: #155e75; overflow-x: clip; }
html[data-theme="dark"] .th { --th-hero1: #041f1e; --th-hero2: #0b4f4a; --th-hero3: #0c2f3d; }
.th h1, .th h2, .th h3 { font-family: 'Montserrat', 'Montserrat Fallback', sans-serif; }
.th-sec { padding-top: 44px; padding-bottom: 6px; }

/* ---------------------------------------------------------------- hero */
.th-hero { position: relative; color: #fff; padding: 86px 0 0; isolation: isolate; }
.th-hero-bg { position: absolute; inset: 0 0 46px; z-index: -1; overflow: hidden;
    background: radial-gradient(900px 420px at 85% 10%, rgba(45, 212, 191, .35), transparent 60%),
                radial-gradient(700px 380px at 5% 100%, rgba(245, 158, 11, .22), transparent 60%),
                linear-gradient(135deg, var(--th-hero1), var(--th-hero2) 55%, var(--th-hero3)); }
.th-hero-bg::after { content: ''; position: absolute; inset: 0; opacity: .14;
    background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1.4px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.th-hero-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 24px; align-items: center; padding-top: 0; padding-bottom: 0; }
.th-toprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
/* phones: the label always gets its own line. Side by side the two only just fitted, and when Open Sans
   replaced its stand-in font (~5% wider) the label wrapped - a 0.14 layout shift on every visit. */
@media (max-width: 575.98px) { .th-toprow { flex-direction: column; align-items: flex-start; } }
.th .tu-crumbs, .th .tu-crumbs a { color: rgba(255, 255, 255, .78) !important; font-size: .8rem; }
.th-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
.th-eyebrow i { color: #5eead4; }
.th-hero h1 { margin: 10px 0 8px; color: #fff; font-size: clamp(1.6rem, 1rem + 1.8vw, 2.3rem); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.th-hero h1 span { background: linear-gradient(90deg, #fde68a, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-lead { margin: 0 0 10px; max-width: 600px; font-size: .95rem; line-height: 1.5; color: rgba(255, 255, 255, .88); }
.th-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: rgba(255, 255, 255, .92); }
.th-trust li { display: flex; align-items: center; gap: 9px; }
.th-trust i { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: .66rem;
    background: rgba(94, 234, 212, .22); color: #5eead4; border: 1px solid rgba(94, 234, 212, .45); }

/* search: one full-width bar - mode tabs on top, then Subject | Class | City | Find tutors */
.th-search-wrap { padding-top: 12px; padding-bottom: 18px; }
.th-search { position: relative; }
.th-modes { display: inline-flex; gap: 4px; margin: 0; padding: 5px 5px 0; border: 0; border-radius: 14px 14px 0 0; background: rgba(255, 255, 255, .14); }
.th-modes label { margin: 0; cursor: pointer; }
.th-modes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.th-modes span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px 10px 0 0; font-size: .84rem; font-weight: 700; color: rgba(255, 255, 255, .88); transition: background .15s, color .15s; }
.th-modes span:hover { color: #fff; }
.th-modes input:checked + span { background: var(--tu-card); color: var(--tu-brand); }
.th-modes input:focus-visible + span { outline: 3px solid #fde68a; outline-offset: -3px; }
.th-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: stretch; padding: 6px; border-radius: 0 18px 18px 18px;
    background: var(--tu-card); color: var(--tu-ink); box-shadow: 0 30px 60px -28px rgba(2, 6, 23, .65); }
.th-go { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 28px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; font-weight: 800; font-size: 1rem; white-space: nowrap; box-shadow: 0 10px 20px -10px rgba(234, 88, 12, .8); }
.th-go:hover { filter: brightness(1.06); }
.th-go:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.th .select2-container { width: 100% !important; }
.th-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: .82rem; }
.th-popular > span { color: rgba(255, 255, 255, .75); font-weight: 700; }
.th-popular a { padding: 4px 11px; border-radius: 999px; color: #fff !important; text-decoration: none; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
.th-popular a:hover { background: rgba(255, 255, 255, .22); }

/* right side: drawn scene + chips (+ two real tutors when there are any); everything stays inside the page edge */
.th-hero-side { position: relative; }
.th-scene { position: relative; max-width: 330px; margin: 0 auto; padding: 6px 0 0; }
.th-illus { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(2, 6, 23, .35)); }
.th-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
    font-size: .72rem; font-weight: 800; color: #0f172a; background: #fff; box-shadow: 0 14px 28px -14px rgba(2, 6, 23, .55); animation: thFloat 6s ease-in-out infinite; }
.th-chip i { width: 19px; height: 19px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; color: #fff; }
.th-chip-1 { top: 2%; left: 0; } .th-chip-1 i { background: #0d9488; }
.th-chip-2 { top: 42%; right: 0; animation-delay: -1.5s; } .th-chip-2 i { background: #f59e0b; }
.th-chip-3 { bottom: 22%; left: -6%; animation-delay: -3s; } .th-chip-3 i { background: #2563eb; }
.th-chip-4 { bottom: 0; right: 6%; animation-delay: -4.5s; } .th-chip-4 i { background: #db2777; }
/* with real tutors: the cards take two of the chip places */
.th-scene.has-cards .th-chip-1, .th-scene.has-cards .th-chip-3, .th-scene.has-cards .th-chip-4 { display: none; }
.th-mini { position: absolute; z-index: 4; display: flex; gap: 9px; align-items: center; width: 220px; padding: 9px; border-radius: 16px; text-decoration: none !important;
    background: var(--tu-card); color: var(--tu-ink) !important; box-shadow: 0 24px 46px -22px rgba(2, 6, 23, .7); animation: thFloat 7s ease-in-out infinite; transition: box-shadow .2s; }
.th-mini:hover { box-shadow: 0 0 0 3px #fde68a, 0 24px 46px -22px rgba(2, 6, 23, .7); }
.th-float-a { top: 4%; left: -14%; }
.th-float-b { bottom: 8%; left: -20%; animation-delay: -3.5s; }
.th-mini img { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; flex: none; background: var(--tu-soft); }
.th-mini-txt { display: flex; flex-direction: column; min-width: 0; }
.th-mini-txt b { font-size: .9rem; display: flex; align-items: center; gap: 5px; }
.th-mini-txt b i { color: #0ea5e9; font-size: .85rem; }
.th-mini-txt small { color: var(--tu-ink2); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-mini-meta { display: flex; gap: 10px; align-items: center; margin-top: 3px; font-size: .8rem; }
.th-mini-meta em { font-style: normal; font-weight: 800; color: #b45309; }
.th-mini-meta em i { color: #f59e0b; }
.th-mini-meta strong { color: var(--tu-brand); }
@keyframes thFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* stats strip overlapping the hero */
.th-stats-wrap { padding-top: 0; padding-bottom: 0; }
.th-stats { list-style: none; margin: 0; padding: 14px 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; border-radius: 18px;
    background: var(--tu-card); color: var(--tu-ink); border: 1px solid var(--tu-line); box-shadow: 0 18px 40px -26px rgba(2, 6, 23, .5); }
.th-stats li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 4px 10px; border-left: 1px solid var(--tu-line); }
.th-stats li:first-child { border-left: 0; }
.th-stats i { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(13, 148, 136, .1); color: var(--tu-brand); }
.th-stats b { font: 800 1.2rem/1.1 'Montserrat', 'Montserrat Fallback', sans-serif; }
.th-stats span { font-size: .76rem; color: var(--tu-ink3); font-weight: 600; }

/* ---------------------------------------------------------------- section heads + tabs */
.th-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.th-head h2 { margin: 2px 0 0; font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); font-weight: 800; line-height: 1.2; }
.th-head-c { justify-content: center; text-align: center; }
.th-kicker { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tu-brand); }
.th-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--tu-soft); border: 1px solid var(--tu-line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.th-tabs::-webkit-scrollbar { display: none; }
.th-tabs button { flex: none; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--tu-ink2); font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.th-tabs button[aria-selected="true"] { background: var(--tu-card); color: var(--tu-ink); box-shadow: 0 2px 8px rgba(15, 23, 42, .1); }
.th-tabs button:focus-visible { outline: 3px solid #2563eb; outline-offset: 1px; }
.th-panel[hidden] { display: none; }

/* browse tiles */
.th-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.th-tiles-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.th-tile, .th-city { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none !important; color: var(--tu-ink) !important;
    background: var(--tu-card); border: 1px solid var(--tu-line); transition: border-color .15s, transform .15s, box-shadow .15s; }
.th-tile:hover, .th-city:hover { border-color: var(--c, var(--tu-brand)); transform: translateY(-2px); box-shadow: 0 14px 26px -22px rgba(15, 23, 42, .6); }
.th-tile > i { flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
    color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.th-tile span, .th-city span { display: flex; flex-direction: column; min-width: 0; }
.th-tile b, .th-city b { font-size: .9rem; line-height: 1.25; }
.th-tile small, .th-city small { color: var(--tu-ink3); font-size: .76rem; }
.th-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.th-city > i { flex: none; width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--tu-brand); background: rgba(13, 148, 136, .1); }
.th-city.is-online { background: linear-gradient(135deg, rgba(13, 148, 136, .12), rgba(37, 99, 235, .1)); border-color: rgba(13, 148, 136, .35); }

/* ---------------------------------------------------------------- tutor showcase */
.th-band { margin-top: 44px; background: linear-gradient(180deg, var(--tu-soft), transparent); border-top: 1px solid var(--tu-line); }
.th-band .th-sec { padding-top: 34px; }
.th-rail-wrap { position: relative; }
.th-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; }
.th-rail > * { scroll-snap-align: start; }
.th-rail:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 12px; }
.th-rail-btn { position: absolute; top: 42%; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--tu-line); background: var(--tu-card); color: var(--tu-ink);
    box-shadow: 0 10px 20px -10px rgba(15, 23, 42, .5); cursor: pointer; font-size: 1.3rem; display: inline-flex; align-items: center; justify-content: center; }
.th-rail-btn[hidden] { display: none; }
.th-rail-btn.is-prev { left: -16px; }
.th-rail-btn.is-next { right: -16px; }
.th-more { margin: 4px 0 0; text-align: right; }
.th-more a { font-weight: 800; color: var(--tu-brand) !important; text-decoration: none; }
@media (max-width: 1199px) { .th-rail { grid-auto-columns: calc((100% - 2 * 14px) / 3); } }
@media (max-width: 767px) { .th-rail { grid-auto-columns: 78%; } .th-rail-btn { display: none !important; } }

/* ---------------------------------------------------------------- steps */
.th-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: st; position: relative; }
.th-steps::before { content: ''; position: absolute; top: 30px; left: 12%; right: 12%; border-top: 2px dashed var(--tu-line); z-index: 0; }
.th-steps li { position: relative; z-index: 1; text-align: center; padding: 0 8px; counter-increment: st; }
.th-step-ico { position: relative; width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
    color: #fff; background: var(--c); box-shadow: 0 14px 26px -14px var(--c); }
.th-step-ico::after { content: counter(st); position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; font-size: .75rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; background: var(--tu-card); color: var(--tu-ink); border: 2px solid var(--c); }
.th-steps h3 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 800; }
.th-steps p { margin: 0; color: var(--tu-ink2); font-size: .88rem; line-height: 1.5; }

/* ---------------------------------------------------------------- two calls to action */
.th-ctas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.th-cta { display: flex; gap: 16px; padding: 24px; border-radius: 22px; color: #fff; position: relative; overflow: hidden; }
.th-cta::after { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -90px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.th-cta.is-learn { background: linear-gradient(135deg, #0f766e, #0d9488 60%, #0891b2); }
.th-cta.is-teach { background: linear-gradient(135deg, #1e1b4b, #4338ca 60%, #7c3aed); }
.th-cta-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; background: rgba(255, 255, 255, .16); }
.th-cta h2 { margin: 0 0 6px; color: #fff; font-size: 1.3rem; font-weight: 800; }
.th-cta p { margin: 0 0 16px; color: rgba(255, 255, 255, .88); font-size: .92rem; line-height: 1.55; }
.th-cta .tu-btn { position: relative; z-index: 1; background: #fff; color: #0f766e !important; }
.th-cta.is-teach .tu-btn { background: #fbbf24; color: #1f1300 !important; }

/* ---------------------------------------------------------------- why + faq */
.th-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.th-why > div { padding: 20px; border-radius: 18px; background: var(--tu-card); border: 1px solid var(--tu-line); }
.th-why > div > span { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: 10px;
    color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.th-why h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.th-why p { margin: 0; color: var(--tu-ink2); font-size: .88rem; line-height: 1.5; }
.th-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.th-faq details { border-radius: 16px; background: var(--tu-card); border: 1px solid var(--tu-line); }
.th-faq summary { padding: 15px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.th-faq summary::-webkit-details-marker { display: none; }
.th-faq summary::after { content: '+'; font-size: 1.2rem; line-height: 1; color: var(--tu-brand); transition: transform .2s; }
.th-faq details[open] summary::after { transform: rotate(45deg); }
.th-faq details p { margin: 0; padding: 0 18px 16px; color: var(--tu-ink2); font-size: .9rem; line-height: 1.55; }
.th-faq summary:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 16px; }
.th > .th-sec:last-child { padding-bottom: 40px; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 991px) {
    .th-hero { padding-top: 84px; }
    .th-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .th-go { grid-column: 1 / -1; min-height: 52px; }
    .th-hero-in { grid-template-columns: 1fr; }
    .th-hero-side { display: none; }
    .th-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
    .th-stats li:nth-child(4) { border-left: 0; }
    .th-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
    .th-steps::before { display: none; }
    .th-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-ctas, .th-faq { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
    .th-fields { grid-template-columns: 1fr; border-radius: 0 16px 16px 16px; }
    .th-modes { display: flex; }
    .th-modes label { flex: 1; } .th-modes span { width: 100%; justify-content: center; padding: 9px 4px; white-space: nowrap; font-size: .8rem; } .th-modes span i { display: none; }
    .th-modes span { padding: 6px 10px; font-size: .8rem; }
    .th-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-stats li { border-left: 0; }
    .th-stats li:last-child { grid-column: 1 / -1; }
    .th-tiles, .th-tiles-sm, .th-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-tile, .th-city { padding: 10px; gap: 9px; }
    .th-tile > i { width: 36px; height: 36px; }
    .th-cta { flex-direction: column; padding: 20px; }
    .th-why { grid-template-columns: 1fr; }
    .th-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .th *, .th *::after { transition: none !important; scroll-behavior: auto !important; } }

/* phones: long lists show 10 first ("Show all"); every link stays in the page */
.th-showall { display: none; margin: 12px auto 0; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--tu-line); background: var(--tu-card); color: var(--tu-brand); font-weight: 800; font-size: .86rem; cursor: pointer; }
@media (max-width: 575px) {
    .th-clip:not(.is-open) > :nth-child(n+11) { display: none; }
    .th-clip:not(.is-open) + .th-showall { display: block; }
}