.directory-page.page-wrapper { padding-top: 0; }
.directory-page > .row { margin: 0; }
.directory-page > .row > .col-md-12 { padding: 0; }
.directory-hero {
  padding: 27px 22px 30px;
  text-align: center;
  color: #172e5e;
  background: linear-gradient(90deg, #eaf4ff40, #eaf4ffdf 32%, #eaf4ffe6 67%, #eaf4ff40), url('/images/hero-spring.jpg') center 43% / cover;
}
.directory-eyebrow { display: inline-flex; gap: 7px; align-items: center; padding: 7px 14px; border: 1px solid white; border-radius: 30px; background: #ffffffdc; font-size: 11px; font-weight: 800; }
.directory-eyebrow i { color: #ef4683; }
.directory-hero h1 { font-family: 'Caveat', cursive; font-weight: 700; font-size: clamp(38px, 4.5vw, 65px); line-height: 1.12; margin: 12px auto 17px; overflow-wrap: anywhere; }
.directory-hero p { font-size: 14px; margin: 0 0 20px; }
.directory-search { display: flex; align-items: center; gap: 15px; background: white; padding: 8px 9px 8px 22px; border-radius: 40px; max-width: 580px; margin: auto; box-shadow: 0 4px 20px #2445750c; }
.directory-search > i { font-size: 21px; color: #172e5e; }
.directory-search input { flex: 1; width: 100%; min-width: 0; border: 0; background: white; color: #172e5e; font-size: 15px; }
.directory-search input::placeholder { color: #7b8ca9; }
.directory-search button { border: 0; border-radius: 30px; background: #fa4487; color: white; font-size: 13px; font-weight: 800; padding: 11px 26px; }
.directory-search button:hover { background: #df3376; }
.directory-layout { max-width: 1260px; margin: auto; padding: 26px 24px 36px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 25px; }
.directory-results { min-width: 0; scroll-margin-top: 80px; }
.directory-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin: 0 0 18px; }
.directory-heading h2 { font-size: 17px; font-weight: 800; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.directory-heading > span { white-space: nowrap; color: var(--muted); font-size: 11px; }
.directory-count { display: inline-block; color: var(--muted); font-size: 11px; padding: 4px 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-left: 5px; }
.directory-add { font-size: 12px; font-weight: 800; white-space: nowrap; }
.directory-kicker { color: var(--muted); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; display: block; margin-bottom: 5px; }
.directory-card-action { display: block; color: var(--blue); font-size: 11px; font-weight: 800; margin-top: 12px; }
.directory-card-action i { margin-left: 5px; }
.directory-tabs { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 24px; }
.directory-tabs a { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 10px 24px; font-size: 12px; font-weight: 800; border-radius: 8px; color: var(--muted); }
.directory-tabs a > span { padding: 2px 6px; border-radius: 5px; background: var(--page); font-size: 10px; }
.directory-tabs a[aria-current] { background: #fff0f6; color: #d73875; }
.search-result { background: var(--surface); padding: 23px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: flex-start; gap: 17px; color: var(--ink); margin-bottom: 13px; }
.search-result > div { min-width: 0; flex: 1; }
.search-result h2 { font-size: 17px; font-weight: 800; line-height: 1.5; margin: 0 0 5px; overflow-wrap: anywhere; }
.search-result p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.search-result > i { color: var(--muted); align-self: center; }
.search-result-icon { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; font-size: 22px; color: #5a7ece; background: #edf2ff; }
.school-result { color: #e05a8b; background: #ffedf4; }
.teacher-directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.directory-teacher { display: flex; gap: 15px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 18px; color: var(--ink); }
.directory-teacher img { width: 65px; height: 65px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--page); }
.directory-teacher > div { min-width: 0; }
.directory-teacher h2 { font-size: 14px; font-weight: 800; margin: 0 0 9px; line-height: 1.5; overflow-wrap: anywhere; }
.directory-teacher p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.directory-teacher small { font-size: 10px; color: var(--muted); }
.school-directory .row { --bs-gutter-x: 14px; --bs-gutter-y: 14px; }
.school-directory .row > .col { width: 50%; }
.school-directory section > h2 { font-size: 14px; color: var(--muted); font-weight: 700; }
.directory-school { display: block; height: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--ink); }
.directory-school > img { width: 100%; height: 150px; object-fit: cover; }
.directory-school > div { padding: 17px 18px; }
.directory-school h3 { font-size: 15px; font-weight: 800; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; }
.directory-school p { color: var(--muted); font-size: 11px; margin: 0; }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.subject-tile { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.subject-tile > div { flex: 1; min-width: 0; }
.subject-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #ecf2ff; color: #6484d9; font-size: 21px; }
.subject-tone-1 .subject-icon { background: #fff0f6; color: #e0699a; }
.subject-tone-2 .subject-icon { background: #edf8f5; color: #559e89; }
.subject-tone-3 .subject-icon { background: #fff5e8; color: #d4a05a; }
.subject-tile h2 { font-size: 15px; font-weight: 800; margin: 0 0 5px; overflow-wrap: anywhere; }
.subject-tile p { margin: 0; color: var(--muted); font-size: 11px; }
.subject-tile > i { color: var(--muted); font-size: 12px; }
.subject-tile > small { flex-basis: 100%; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.directory-teacher:hover, .directory-school:hover, .subject-tile:hover, .search-result:hover { border-color: #c4d6ef; color: var(--ink); box-shadow: 0 5px 16px #23476908; }
.directory-sidebar { display: grid; gap: 17px; }
.directory-discover, .district-filter { padding: 20px 19px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.directory-discover h2, .district-filter h2 { font-size: 14px; font-weight: 800; margin: 0 0 8px; }
.directory-discover h2 i, .district-filter h2 i { color: var(--blue); margin-right: 7px; }
.directory-discover > a { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 15px 0; border-bottom: 1px solid var(--line); }
.directory-discover > a:last-child { border: 0; }
.directory-link-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; background: var(--page); color: var(--blue); border-radius: 9px; }
.directory-discover strong { display: block; font-size: 12px; font-weight: 800; }
.directory-discover small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.directory-discover > a > i { margin-left: auto; color: var(--muted); font-size: 10px; }
.directory-invitation { text-align: center; padding: 24px 22px; border: 1px solid #f3e1ec; border-radius: 12px; background: linear-gradient(135deg, #fff0f6, #f7faff); }
.directory-invitation > i { color: #ed548e; font-size: 30px; }
.directory-invitation h2 { font-family: 'Caveat', cursive; font-size: 30px; font-weight: 700; margin: 12px 0; }
.directory-invitation p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.directory-invitation .btn, .directory-empty .btn { font-size: 12px; font-weight: 800; padding: 11px 18px; border-radius: 9px; }
.directory-invitation .btn i { margin-left: 5px; }
.district-filter nav { max-height: 320px; overflow-y: auto; padding: 3px 0 8px; scrollbar-width: thin; }
.district-filter nav a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.district-filter nav a[aria-current] { background: #fff0f6; color: #d73875; font-weight: 800; }
.district-filter nav a:hover { background: var(--page); color: var(--ink); }
.directory-empty { text-align: center; padding: 52px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.directory-empty > span { display: inline-grid; place-items: center; width: 75px; height: 75px; border-radius: 24px; color: #e76899; background: #fff0f6; font-size: 33px; margin-bottom: 22px; }
.directory-empty h2 { font-size: 21px; font-weight: 800; line-height: 1.5; }
.directory-empty p { font-size: 13px; line-height: 1.8; color: var(--muted); max-width: 370px; margin: 12px auto 24px; }
.directory-empty .btn i { margin-left: 6px; }
.directory-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; justify-content: space-between; margin-top: 20px; font-size: 11px; color: var(--muted); }
.directory-pagination nav { display: flex; align-items: center; gap: 15px; }
.directory-pagination a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.directory-alert { border: 1px solid #f7c4d6; border-radius: 12px; background: #fff0f6; color: #b93162; padding: 20px; }
:root[data-theme=dark] .directory-invitation { background: linear-gradient(135deg, #34273f, #1c2a42); border-color: var(--line); }
:root[data-theme=dark] .directory-empty > span,
:root[data-theme=dark] .directory-tabs a[aria-current],
:root[data-theme=dark] .district-filter nav a[aria-current] { background: #432c43; color: #ffadd0; }
:root[data-theme=dark] .directory-alert { background: #432c43; color: #ffadd0; border-color: #744462; }
@media (max-width: 1100px) {
  .directory-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 18px; padding: 22px 18px; }
  .directory-teacher { padding: 18px 14px; gap: 12px; }
  .directory-teacher img { width: 49px; height: 49px; }
  .teacher-directory-grid, .subject-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .directory-hero { padding: 23px 16px 26px; }
  .directory-hero h1 { font-size: 44px; max-width: 460px; }
  .directory-hero p { font-size: 12px; max-width: 320px; margin: 0 auto 18px; line-height: 1.7; }
  .directory-search { gap: 10px; padding-left: 16px; }
  .directory-search input { font-size: 13px; }
  .directory-search button { padding: 11px 20px; font-size: 12px; }
  .directory-layout { grid-template-columns: minmax(0, 1fr); padding: 20px 14px; gap: 24px; }
  .directory-heading h2 { font-size: 15px; }
  .directory-heading > span { font-size: 10px; }
  .directory-heading { flex-wrap: wrap; }
  .directory-tabs a { flex: 1; padding: 10px; }
  .directory-school > img { height: 130px; }
  .directory-school > div { padding: 15px; }
  .directory-teacher img { width: 62px; height: 62px; }
  .search-result { padding: 18px 15px; gap: 12px; }
  .search-result h2 { font-size: 15px; }
  .search-result-icon { width: 40px; height: 40px; font-size: 19px; }
  .search-result > i { display: none; }
  .directory-empty { padding: 40px 20px; }
  .directory-empty h2 { font-size: 19px; }
}
@media (max-width: 480px) {
  .school-directory .row > .col { width: 100%; }
  .directory-school > img { height: 165px; }
  .directory-hero h1 { font-size: 40px; }
}
