/* Teachers of Lebanon, public surfaces.
   The dashboard stays deliberately plain for teachers who are not
   comfortable with software. These pages are different: a student
   choosing who will teach them is making a judgement about a person,
   so the design has to feel considered and trustworthy. */

:root {
  --hero-1: #12325a;
  --hero-2: #1a5c9e;
  --hero-3: #2b7cc9;
  --gold: #b8860b;
  --star: #e8a33d;
  --card-lift: 0 10px 30px rgba(18, 38, 63, .10), 0 2px 6px rgba(18, 38, 63, .06);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 15% -10%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(140deg, var(--hero-1) 0%, var(--hero-2) 55%, var(--hero-3) 100%);
  color: #fff;
  padding: 68px 0 76px;
  overflow: hidden;
}
.hero:after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 420px at 20% 0%, #000, transparent 72%);
}
.hero-in { position: relative; z-index: 2; }
.hero h1 {
  font-size: 42px; line-height: 1.12; letter-spacing: -.02em;
  max-width: 17ch; margin-bottom: 16px; color: #fff;
}
.hero p.lede {
  font-size: 18px; line-height: 1.6; color: #d7e5f5;
  max-width: 62ch; margin-bottom: 30px;
}

/* ---------- search bar ---------- */
.searchbar {
  background: #fff; border-radius: 16px; padding: 10px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch;
  box-shadow: 0 18px 44px rgba(8, 26, 48, .28);
  max-width: 840px;
}
.searchbar .sb-field { flex: 1 1 210px; min-width: 0; position: relative; }
.searchbar select, .searchbar input {
  width: 100%; height: 52px; border: 1px solid transparent; background: #f3f6fa;
  border-radius: 11px; padding: 0 14px; font: 500 15.5px/1 var(--font); color: var(--ink);
  appearance: none;
}
.searchbar select:focus, .searchbar input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 92, 158, .16);
}
.searchbar .btn { height: 52px; flex: 0 0 auto; padding: 0 26px; border-radius: 11px; font-size: 16px; }
.hero-alt { margin-top: 16px; font-size: 15px; }
.hero-alt a { color: #cfe1f5; text-decoration: underline; }
.hero-alt a:hover { color: #fff; }

/* ---------- explainer ---------- */
.explain { padding: 54px 0 10px; }
.explain h2 { font-size: 25px; margin-bottom: 12px; }
.explain p { font-size: 17px; color: var(--ink-2); line-height: 1.65; max-width: 74ch; }
.steps3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin: 34px 0 8px;
}
.step3 { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.step3 .n {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step3 h3 { font-size: 17px; margin-bottom: 6px; }
.step3 p { font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* ---------- teacher band ---------- */
.teachband {
  margin: 52px 0 8px; padding: 30px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #f2f7fc, #eaf1f9);
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.teachband div { flex: 1 1 320px; min-width: 0; }
.teachband h3 { font-size: 21px; margin-bottom: 8px; }
.teachband p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

/* ---------- filters ---------- */
.filters-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 20px;
}
.filter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.filter-grid label {
  display: block; font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-3); margin-bottom: 5px;
}
.filter-grid select, .filter-grid input {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 11px; font: 400 15px/1 var(--font); background: #fff; color: var(--ink);
}
.filter-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2);
}
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }

/* ---------- teacher cards ---------- */
.tgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.tcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
  padding: 20px; text-decoration: none; color: inherit; display: flex;
  flex-direction: column; gap: 13px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.tcard:hover { transform: translateY(-3px); box-shadow: var(--card-lift); border-color: #c6d5e6; }
.tcard-top { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  width: 62px; height: 62px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tcard-id { flex: 1 1 auto; min-width: 0; }
.tcard-name {
  font-size: 17.5px; font-weight: 700; line-height: 1.25;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.tcard-head { font-size: 14.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.vbadge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--ok-soft); color: var(--ok);
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap;
}
.stars { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; }
.stars b { color: var(--ink); font-weight: 700; margin-inline-start: 4px; }
.stars .s { color: var(--star); letter-spacing: -1px; }
.stars .muted { color: var(--ink-3); font-weight: 400; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--line-2); color: var(--ink-2); border-radius: 7px;
  padding: 4px 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip.a { background: var(--accent-soft); color: var(--accent); }
.tcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: auto;
  font-size: 14px; color: var(--ink-2); flex-wrap: wrap;
}
.price { font-weight: 700; color: var(--ink); }

/* ---------- public profile ---------- */
.profile-head {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px; margin-bottom: 20px;
  display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap;
}
.profile-head .avatar { width: 108px; height: 108px; font-size: 38px; }
.profile-id { flex: 1 1 300px; min-width: 0; }
.profile-id h1 { font-size: 29px; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id .head { font-size: 17px; color: var(--ink-2); margin-top: 6px; }
.profile-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 14.5px; color: var(--ink-2); }
.pcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.psection { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.psection h2 { font-size: 18px; margin-bottom: 12px; }
.psection p { color: var(--ink-2); line-height: 1.65; white-space: pre-wrap; }
.deflist { display: grid; gap: 14px; }
.deflist .row2 { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.deflist .k { flex: 0 0 130px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding-top: 3px; }
.deflist .val { flex: 1 1 200px; min-width: 0; }
.contact-card { position: sticky; top: 84px; }
.contact-locked { text-align: center; padding: 8px 0 4px; }
.contact-locked p { font-size: 14px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.cbtn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 48px; border-radius: 11px; margin-bottom: 10px;
  font: 600 15.5px/1 var(--font); text-decoration: none; border: 1px solid transparent;
}
.cbtn.wa { background: #128c4a; color: #fff; }
.cbtn.wa:hover { background: #0f7a40; }
.cbtn.tel { background: var(--accent); color: #fff; }
.cbtn.tel:hover { background: var(--accent-dark); }
.cbtn.mail { background: var(--panel); color: var(--ink); border-color: var(--line); }
.cbtn.mail:hover { background: var(--line-2); }

/* ---------- reviews ---------- */
.review { border-top: 1px solid var(--line-2); padding: 18px 0; }
.review:first-of-type { border-top: none; padding-top: 4px; }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.review-name { font-weight: 700; font-size: 15.5px; }
.review-date { font-size: 13px; color: var(--ink-3); }
.review p { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; }
.reply {
  margin-top: 12px; padding: 13px 15px; border-radius: 11px;
  background: var(--accent-soft); border-inline-start: 3px solid var(--accent);
}
.reply .who { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.reply p { font-size: 15px; color: var(--ink-2); }
.ratepick { display: flex; gap: 6px; margin-bottom: 6px; }
.ratepick button {
  background: none; border: none; cursor: pointer; font-size: 30px; line-height: 1;
  color: #d6dde8; padding: 2px; transition: color .1s ease, transform .1s ease;
}
.ratepick button.on { color: var(--star); }
.ratepick button:hover { transform: scale(1.12); }

/* ---------- account type picker ---------- */
.typepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.typecard {
  border: 2px solid var(--line); border-radius: 14px; padding: 20px;
  background: var(--panel); cursor: pointer; text-align: start;
  transition: border-color .12s ease, background .12s ease;
}
.typecard:hover { border-color: #b9cbe0; }
.typecard[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.typecard h3 { font-size: 17px; margin-bottom: 6px; }
.typecard p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

/* ---------- multi-select pills ---------- */
.pillbox {
  border: 1px solid var(--line); border-radius: 11px; padding: 10px;
  max-height: 208px; overflow-y: auto; background: #fff;
  display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start;
}
.pill {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 7px 13px; font: 600 14px/1 var(--font);
  cursor: pointer; white-space: nowrap; min-height: 36px;
}
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill:hover { border-color: var(--accent); }

/* ---------- notices ---------- */
.notice {
  border-radius: 13px; padding: 18px 20px; margin-bottom: 18px;
  border: 1px solid var(--line); background: var(--panel);
}
.notice.good { background: var(--ok-soft); border-color: #c8e6d6; }
.notice.warn { background: var(--warn-soft); border-color: #f0dfb0; }
.notice.info { background: var(--accent-soft); border-color: #c5daf0; }
.notice h3 { font-size: 16.5px; margin-bottom: 6px; }
.notice p { font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.notice .btn { margin-top: 12px; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  /* minmax(0, ...) not 1fr: a bare 1fr keeps an implicit min-content
     floor, so the column refused to shrink below its widest child and
     the page still overflowed by 103px at 320px wide. */
  .pcols { grid-template-columns: minmax(0, 1fr); }
  .contact-card { position: static; top: auto; }
}
@media (max-width: 720px) {
  .hero { padding: 40px 0 44px; }
  .hero h1 { font-size: 29px; }
  .hero p.lede { font-size: 16px; margin-bottom: 22px; }
  .searchbar { padding: 8px; border-radius: 14px; gap: 7px; }
  .searchbar .sb-field { flex: 1 1 100%; }
  .searchbar .btn { width: 100%; }
  .explain { padding: 34px 0 4px; }
  .explain h2 { font-size: 21px; }
  .explain p { font-size: 16px; }
  .teachband { padding: 22px; margin: 34px 0 4px; }
  .tgrid { grid-template-columns: 1fr; gap: 14px; }
  .tcard { padding: 16px; }
  .profile-head { padding: 18px; gap: 16px; }
  .profile-head .avatar { width: 76px; height: 76px; font-size: 28px; }
  .profile-id h1 { font-size: 23px; }
  .psection { padding: 17px; }
  .deflist .k { flex: 1 1 100%; }
  /* Contact first once stacked: it is the reason the visitor opened the
     page, and a long review list would otherwise bury it. */
  .pcols > div:last-child { order: -1; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 25px; }
  .avatar { width: 52px; height: 52px; font-size: 19px; }
  .chip { font-size: 12px; padding: 3px 8px; }
}


/* ---------- subject picker ---------- */
.subjectpicker { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.sp-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sp-search { flex: 1 1 200px; min-width: 0; height: 42px; min-height: 42px; }
.sp-count { font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.sp-none { padding: 14px; font-size: 14px; color: var(--ink-3); margin: 0; }
.sp-chosen { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px; border-bottom: 1px solid var(--line-2); background: #fafbfd; }
.sp-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 6px 12px; font: 600 13.5px/1 var(--font); cursor: pointer;
}
.sp-tag span { font-size: 16px; line-height: 1; opacity: .8; }
.sp-tag:hover { background: var(--accent-dark); }
.sp-group { border-bottom: 1px solid var(--line-2); }
.sp-group:last-child { border-bottom: none; }
.sp-cat {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; padding: 13px 14px; cursor: pointer;
  font: 600 15px/1 var(--font); color: var(--ink); text-align: start; min-height: 48px;
}
.sp-cat:hover { background: #fafbfd; }
.sp-arrow { color: var(--ink-3); font-size: 12px; width: 12px; flex: none; }
.sp-cat-label { flex: 1 1 auto; min-width: 0; }
.sp-badge {
  background: var(--accent); color: #fff; border-radius: 999px;
  min-width: 22px; padding: 2px 7px; font-size: 12px; font-weight: 700; text-align: center;
}
.sp-cat-n { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.sp-items { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 14px; }
[dir="rtl"] .sp-cat { text-align: right; }


/* ---------- guided matching ---------- */
.mt-wrap { max-width: 900px; margin: 0 auto; padding: 12px 0 40px; }
.mt-prog { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.mt-prog-bar { flex: 1 1 auto; height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.mt-prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
.mt-prog-txt { font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.mt-q { font-size: 30px; line-height: 1.2; margin-bottom: 22px; letter-spacing: -.015em; }
.mt-search { margin-bottom: 18px; height: 50px; }
.mt-group { margin-bottom: 22px; }
.mt-group h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 10px; }
.mt-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-opt {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 20px; min-height: 52px; font: 600 15.5px/1.2 var(--font);
  color: var(--ink); cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .1s ease;
}
.mt-opt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.mt-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.mt-why { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 7px; }
.mt-results { padding-bottom: 40px; }
@media (max-width: 720px) {
  .mt-q { font-size: 23px; }
  .mt-opt { padding: 12px 16px; font-size: 15px; min-height: 48px; }
}
