/* =============================================================
   rt-housing.css — Housing pages (/housing and school pages)
   Loaded after rt-locations.css, which supplies the shared look
   (hero, map, cards, platforms, FAQ, owner banner, etc.).
   ============================================================= */

/* ── Hub hero ── */
main.rtl .rth-hero { background: #FDF4DC; border-bottom-color: #EFE3C2; }
main.rtl .rth-lead { color: var(--muted); max-width: 540px; }

/* Search with suggestions */
main.rtl .rth-search { position: relative; background: #fff; border: 1px solid #EFE3C2; border-radius: 10px; padding: 18px; box-shadow: 0 10px 28px rgba(30,42,71,.08); }
main.rtl .rth-search__field { height: 54px; border: 1.5px solid var(--line2); border-radius: 6px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; }
main.rtl .rth-search__field:focus-within { border-color: var(--navy); }
main.rtl .rth-search__field .ms { font-size: 22px; }
main.rtl .rth-search__field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; font-size: 17px; font-weight: 700; color: var(--navy); background: none; box-shadow: none; -webkit-appearance: none; appearance: none; }
main.rtl .rth-search__field input::-webkit-search-cancel-button { display: none; }
main.rtl .rth-search__field input::placeholder { color: #9AA2B4; font-weight: 600; }
main.rtl .rth-search__clear { flex: none; width: 30px; height: 30px; border: 0; border-radius: 999px; background: #F1F3F7; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
main.rtl .rth-search__clear .ms { font-size: 18px; }
main.rtl .rth-suggest { position: absolute; left: 18px; right: 18px; top: calc(100% - 14px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 36px rgba(30,42,71,.16); padding: 6px; display: flex; flex-direction: column; }
main.rtl .rth-suggest__item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; color: var(--navy); }
main.rtl .rth-suggest__item:hover, main.rtl .rth-suggest__item.is-active { background: #FDF4DC; color: var(--navy); }
main.rtl .rth-suggest__ab { flex: none; width: 34px; height: 34px; border-radius: 7px; font-family: 'Jost', sans-serif; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
main.rtl .rth-suggest__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main.rtl .rth-suggest__name { font-weight: 800; font-size: 15px; line-height: 1.3; }
main.rtl .rth-suggest__sub { font-size: 13px; color: var(--muted2); }
main.rtl .rth-suggest__none { padding: 12px; font-size: 14.5px; color: var(--muted); }
main.rtl .rth-suggest__none a { font-weight: 800; }
main.rtl .rth-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--muted2); }

/* Map: tiles show a count under the abbreviation */
main.rtl .rth-mapcard { border-color: #EFE3C2; }
main.rtl .rth-tile { flex-direction: column; gap: 1px; font-size: clamp(10px, 2.4vw, 15px); }
main.rtl .rth-tile__ab { line-height: 1; }
main.rtl .rth-tile__n { font-family: 'Nunito Sans', sans-serif; font-size: clamp(8px, 1.3vw, 11px); font-weight: 800; line-height: 1; opacity: .8; }
main.rtl .rth-tile.is-pick { background: var(--s); color: #fff; }
main.rtl .rth-maphint { margin-top: 12px; font-size: 13px; font-weight: 700; color: #8B93A7; }
main.rtl .rth-spot { background: #FAF6EA; }
main.rtl .rth-spot .rtl-spot__city span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main.rtl .rth-spot button.rtl-spot__btn { border: 0; cursor: pointer; width: 100%; font-family: inherit; }

/* Popular schools: names are longer than city names */
main.rtl .rth-pop__name { font-size: 19px; line-height: 1.2; }

/* ── All schools list ── */
main.rtl .rth-all { padding-top: 48px; padding-bottom: 56px; }
main.rtl .rth-showing { margin-top: 6px; font-size: 15.5px; color: var(--muted); }
main.rtl .rth-showing strong { color: var(--navy); }
main.rtl .rth-filter { flex: 0 1 360px; min-width: 240px; height: 46px; margin: 0; border: 1.5px solid var(--line2); border-radius: 6px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; cursor: text; }
main.rtl .rth-filter:focus-within { border-color: var(--navy); }
main.rtl .rth-filter .ms { color: #8B93A7; }
main.rtl .rth-filter input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; font-size: 15.5px; font-weight: 700; color: var(--navy); background: none; -webkit-appearance: none; appearance: none; }
main.rtl .rth-filter input::placeholder { color: #9AA2B4; font-weight: 600; }
main.rtl .rth-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
main.rtl .rth-type { height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; color: var(--navy); font-weight: 800; font-size: 14px; cursor: pointer; line-height: 1; }
main.rtl .rth-type span { opacity: .7; }
main.rtl .rth-type:hover { border-color: var(--navy); }
main.rtl .rth-type.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
main.rtl .rth-pickchip { height: 38px; padding: 0 10px 0 14px; border-radius: 999px; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
main.rtl .rth-pickchip .ms { font-size: 18px; }

main.rtl .rth-cols { columns: 300px 3; column-gap: 28px; margin-top: 32px; }
main.rtl .rth-group { break-inside: avoid; display: inline-block; width: 100%; margin-bottom: 32px; border-top: 3px solid var(--s); padding-top: 14px; }
main.rtl .rth-group.is-out { display: none; }
main.rtl .rth-group__head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; color: var(--navy); cursor: default; font-family: inherit; }
main.rtl .rth-group__ab { flex: none; width: 36px; height: 36px; border-radius: 7px; background: var(--t); color: var(--i); font-family: 'Jost', sans-serif; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; }
main.rtl .rth-group__name { flex: 1; min-width: 0; font-family: 'Jost', sans-serif; font-weight: 600; font-size: 20px; line-height: 1.2; }
main.rtl .rth-group__n { font-size: 13.5px; font-weight: 700; color: #8B93A7; }
main.rtl .rth-group__chev { display: none !important; }
main.rtl .rth-group__list { display: flex; flex-direction: column; margin-top: 8px; }
main.rtl .rth-school { display: block; padding: 8px 0; border-bottom: 1px solid #F1F3F7; color: var(--navy); }
main.rtl .rth-school:hover, main.rtl .rth-school:focus { color: var(--link); }
main.rtl .rth-school.is-extra { display: none; }
main.rtl .rth-group.is-open .rth-school.is-extra { display: block; }
main.rtl .rth-school.is-hidden, main.rtl .rth-group.is-open .rth-school.is-hidden { display: none; }
main.rtl .rth-school__name { display: block; font-weight: 800; font-size: 15px; line-height: 1.35; }
main.rtl .rth-school__sub { display: block; font-size: 13px; color: var(--muted2); margin-top: 1px; }
main.rtl .rth-group__more { margin-top: 10px; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 800; font-size: 14.5px; color: var(--i); display: flex; align-items: center; gap: 4px; font-family: inherit; }
main.rtl .rth-group__more .ms { font-size: 18px; }
main.rtl .rth-group.is-open .rth-group__more, main.rtl .rth-cols.is-filtering .rth-group__more { display: none; }
main.rtl .rth-noresults { flex-wrap: wrap; }
main.rtl .rth-noresults > span:nth-child(2) { flex: 1; min-width: 220px; }
main.rtl .rth-guides { padding-top: 40px; padding-bottom: 80px; }

/* Phones: each state is a one-line row that opens on tap */
@media (max-width: 639px) {
  main.rtl .rth-cols { columns: 1; margin-top: 20px; }
  main.rtl .rth-group { margin-bottom: 0; border-top: 0; padding-top: 0; border-bottom: 1px solid #EEF0F4; }
  main.rtl .rth-group__head { padding: 10px 0; cursor: pointer; }
  main.rtl .rth-group__name { font-size: 19px; }
  main.rtl .rth-group__chev { display: inline-block !important; font-size: 22px; color: #8B93A7; max-width: none; transition: transform .2s; }
  main.rtl .rth-group__list, main.rtl .rth-group__more { display: none; }
  main.rtl .rth-group.is-open .rth-group__list, main.rtl .rth-cols.is-filtering .rth-group__list { display: flex; padding-bottom: 12px; }
  main.rtl .rth-group.is-open .rth-group__chev { transform: rotate(180deg); }
  main.rtl .rth-cols.is-filtering .rth-school.is-extra { display: block; }
  main.rtl .rth-cols.is-filtering .rth-school.is-hidden { display: none; }
  main.rtl .rth-filter { flex-basis: 100%; min-width: 0; }
}

/* ── School page ── */
main.rtl .rth-campus { font-family: 'Nunito Sans', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0; opacity: .85; margin-left: 6px; }
main.rtl .rth-citycard { box-shadow: 0 2px 0 rgba(30,42,71,.08); }
main.rtl .rth-citycard:hover { color: var(--i); }
main.rtl .rth-citycard__go { font-size: 18px; color: #8B93A7; }
main.rtl .rth-stamp__icon { font-size: 22px; max-width: none; }

main.rtl .rth-living { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px 40px; align-items: start; }
main.rtl .rth-living > * { min-width: 0; }
main.rtl .rth-facts { border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
main.rtl .rth-facts__k { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8B93A7; }
main.rtl .rth-facts__v { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.2; margin-top: 4px; }
main.rtl .rth-facts__v--sm { font-size: 20px; }

main.rtl .rth-around { margin-top: 20px; align-items: stretch; }
main.rtl .rth-score { border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
main.rtl .rth-score--walk { background: #E6F6EF; }
main.rtl .rth-score--bike { background: #E8F0FC; }
main.rtl .rth-score .rtl-h3 { font-size: 20px; }
main.rtl .rth-score__badge { height: 46px; width: auto; align-self: flex-start; }
main.rtl .rth-score__text { font-size: 15px; line-height: 1.5; color: var(--body); flex: 1; }
main.rtl .rth-score__link { font-weight: 800; font-size: 14.5px; }
main.rtl .rth-sponsor { border-radius: 14px; border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--navy); background: #fff; }
main.rtl .rth-sponsor:hover, main.rtl .rth-sponsor:focus { color: var(--navy); box-shadow: 0 8px 22px rgba(30,42,71,.10); }
main.rtl .rth-sponsor img { width: 100%; height: auto; border-radius: 8px; display: block; }
main.rtl .rth-sponsor__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A0A7B8; }
main.rtl .rth-sponsor__text { font-weight: 800; font-size: 15px; line-height: 1.4; }
main.rtl .rth-attrib { margin-top: 14px; font-size: 13px; color: #8B93A7; }

main.rtl .rth-faqwrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
main.rtl .rth-faqwrap__main { flex: 1 1 520px; min-width: 0; max-width: 780px; }
main.rtl .rth-sponsor--side { flex: 0 1 300px; min-width: 240px; margin: 0 auto; position: sticky; top: 90px; }

main.rtl .rth-cities__icon { width: 48px; height: 48px; }
main.rtl .rth-cities__name { font-weight: 800; font-size: 15px; line-height: 1.35; }

main.rtl .rth-404 { text-align: center; max-width: 640px; }
main.rtl .rth-404__icon { font-size: 48px; color: #C9961F; max-width: none; margin-bottom: 12px; }
main.rtl .rth-404 .rtl-sub { margin-top: 10px; }
main.rtl .rth-404__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
