@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* ═══════════════════════════════════════════
   Design Tokens
   ═══════════════════════════════════════════ */
:root {
  --green-dark:   #064e3b;
  --green-mid:    #065f46;
  --green-btn:    #0a5c44;
  --green-light:  #10b981;
  --green-pale:   #d1fae5;
  --green-bg:     #f0fdf4;
  --gold:         #b8972a;
  --gold-light:   #d4af37;
  --gold-pale:    #fef9e7;
  --cream:        #fdfbf7;
  --cream-dark:   #ede8da;
  --white:        #ffffff;
  --text-dark:    #1a2332;
  --text-medium:  #4a5568;
  --text-light:   #718096;
  --whatsapp:     #25D366;
  --border:       #e8e3d8;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.1);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.12);
  --radius:       0.5rem;
  --radius-sm:    0.375rem;
  --radius-lg:    0.75rem;
  --radius-xl:    1rem;
  --transition:   all 0.2s ease-in-out;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { direction:rtl; scroll-behavior:smooth; }

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration:none; color:inherit; }
ul { list-style:none; }

::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--cream); }
::-webkit-scrollbar-thumb { background:var(--green-light); border-radius:3px; }
::selection { background:rgba(212,175,55,0.25); color:var(--green-dark); }

/* ─────────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────────── */
.navbar {
  position: sticky; top:0; z-index:1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: none;
  padding: 0 2rem;
  height: 80px;
  display: flex; align-items:center; justify-content:space-between;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}

.navbar-brand {
  display:flex; align-items:center; gap:12px;
  text-decoration:none;
}

.navbar-logo-wrap { position:relative; width:44px; height:44px; flex-shrink:0; }
.navbar-logo {
  width:44px; height:44px;
  border-radius:10px;
  object-fit:contain;
  background:#fff;
  display:block;
  box-shadow: var(--shadow-sm);
}

.brand-text { display:flex; flex-direction:column; gap:1px; }
.brand-name {
  font-size:1.15rem; font-weight:900;
  color:var(--green-dark); line-height:1.1;
  letter-spacing:-0.3px;
}
.brand-tagline { font-size:0.65rem; color:var(--gold); font-weight:700; }

.navbar-actions { display:flex; gap:9px; align-items:center; }

.btn-nav {
  padding:9px 18px; border-radius:var(--radius-sm);
  font-family:'Tajawal',sans-serif; font-size:0.88rem; font-weight:700;
  cursor:pointer; border:none; transition:var(--transition);
  text-decoration:none; display:flex; align-items:center; gap:6px;
}
.btn-ghost {
  background:transparent;
  border:1.5px solid var(--border);
  color:var(--text-medium);
}
.btn-ghost:hover { border-color:var(--green-dark); color:var(--green-dark); }

.btn-gold {
  background:var(--green-dark);
  color:var(--white);
  box-shadow:0 3px 12px rgba(6,78,59,0.3);
}
.btn-gold:hover { background:var(--green-mid); transform:translateY(-1px); box-shadow:0 5px 18px rgba(6,78,59,0.4); }



}



.hero-deco-1, .hero-deco-2 { display:none; }

/* Removed obsolete hero stats and overlapping cards */

/* ─────────────────────────────────────────────
   DISCLAIMER
   ───────────────────────────────────────────── */
.disclaimer {
  background:var(--gold-pale);
  border:1px solid rgba(212,175,55,0.3);
  border-radius:var(--radius);
  padding:18px 22px;
  display:flex; gap:12px; align-items:flex-start;
  max-width:860px; margin:0 auto 40px;
}
.disclaimer-icon { font-size:1.3rem; flex-shrink:0; margin-top:2px; }
.disclaimer-text { font-size:0.85rem; color:#78350f; line-height:1.6; }
.disclaimer-title { font-weight:800; margin-bottom:4px; color:#92400e; }

/* ─────────────────────────────────────────────
   FILTER BAR
   ───────────────────────────────────────────── */
.filter-bar {
  background:var(--white);
  border-bottom:1px solid var(--border);
  padding:14px 1.5rem;
  position:relative; z-index:900;
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
}
.filter-inner {
  max-width:1280px; margin:0 auto;
  display:flex; gap:16px; align-items:center; flex-wrap:wrap;
}
.filter-label { font-size:0.82rem; font-weight:800; color:var(--green-dark); white-space:nowrap; }

.filter-select {
  padding:9px 14px;
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-family:'Tajawal',sans-serif; font-size:0.88rem;
  color:var(--text-dark); background:var(--cream);
  cursor:pointer; transition:var(--transition); outline:none; flex:1; min-width:140px;
}
.filter-select:focus { border-color:var(--green-dark); background:var(--white); }

.filter-chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip {
  padding:7px 15px; border-radius:50px;
  font-family:'Tajawal',sans-serif; font-size:0.82rem; font-weight:700;
  cursor:pointer; border:1.5px solid var(--border);
  background:var(--white); color:var(--text-medium);
  transition:var(--transition);
}
.chip:hover { border-color:var(--green-dark); color:var(--green-dark); }
.chip.active { background:var(--green-dark); color:var(--white); border-color:var(--green-dark); }
.chip-featured.active {
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--green-dark); border-color:var(--gold);
}

.result-count { margin-right:auto; font-size:0.82rem; color:var(--text-light); white-space:nowrap; }
.result-count strong { color:var(--green-dark); }

/* ─────────────────────────────────────────────
   BACK LINK & HEADING
   ───────────────────────────────────────────── */
.back-link {
  display:inline-flex; align-items:center; gap:8px;
  color:var(--green-mid); font-weight:700; font-size:0.9rem;
  margin-bottom:20px; transition:var(--transition);
}
.back-link:hover { color:var(--green-dark); }

.main { max-width:1280px; margin:0 auto; padding:48px 1.5rem 80px; }

.page-heading {
  font-size:1.7rem; font-weight:900; color:var(--green-dark);
  margin-bottom:28px;
}

/* ─────────────────────────────────────────────
   TEACHER GRID & CARD
   ───────────────────────────────────────────── */
.teachers-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:32px;
}

/* ── Teacher Card (circular avatar, centered) ── */
.teacher-card {
  background:var(--white);
  border-radius:18px;
  overflow:visible;
  border:1px solid #e2e8f0;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  transition:var(--transition);
  position:relative;
  display:flex; flex-direction:column;
}
.teacher-card:hover {
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(0,0,0,0.12);
  border-color:#cbd5e1;
}
.teacher-card.featured {
  border-color:rgba(212,175,55,0.45);
  box-shadow:0 4px 20px rgba(184,151,42,0.14);
}
.teacher-card.featured:hover {
  border-color:var(--gold-light);
  box-shadow:0 12px 40px rgba(184,151,42,0.22);
}

/* Featured ribbon — static (not absolute) to match buildCard layout */
.featured-badge {
  position:static;
  width:fit-content;
  margin:14px auto 0;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--green-dark); padding:4px 14px; border-radius:50px;
  font-size:0.72rem; font-weight:800;
  display:flex; align-items:center; gap:4px;
  box-shadow:0 2px 8px rgba(184,151,42,0.4);
}

/* Circular avatar — matches buildCard() inline div (100px circle) */
.card-avatar-wrap {
  width:100px; height:100px;
  border-radius:50%;
  overflow:hidden;
  margin:22px auto 12px;
  border:3px solid #064e3b;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
  background:linear-gradient(135deg,#064e3b,#0f766e);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.card-image {
  width:100%; height:100%;
  object-fit:cover; object-position:top center;
  display:block; border-radius:0;
}
.card-image-placeholder {
  width:100%; height:100%;
  background:transparent;
  display:flex; align-items:center; justify-content:center;
  font-size:2.2rem; color:rgba(255,255,255,0.5);
}

.card-body { padding:0 15px 14px; flex:1; text-align:center; }

.teacher-name { font-size:1.05rem; font-weight:900; color:var(--text-dark); margin-bottom:7px; }

.teacher-meta-row {
  display:flex; gap:14px; align-items:center;
  margin-bottom:10px; flex-wrap:wrap;
}
.meta-badge {
  display:inline-flex; align-items:center; gap:5px;
  font-size:0.78rem; font-weight:600; color:var(--text-medium);
}
.meta-badge .icon { font-size:0.85rem; }

/* Stars */
.stars-row { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.stars { display:flex; gap:1px; }
.star { font-size:0.88rem; color:#d1d5db; }
.star.on { color:#f59e0b; }
.rating-num { font-size:0.82rem; font-weight:800; color:var(--text-dark); }
.rating-cnt { font-size:0.75rem; color:var(--text-light); }

.teacher-bio {
  font-size: 0.84rem;
  color: var(--text-medium);
  line-height: 1.65;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: max-height 0.3s ease;
  text-align: right;
}

.teacher-bio.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--green-mid);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.read-more-btn:hover {
  color: var(--gold);
}

/* Nationality badge */
.nationality-badge {
  display:inline-flex; align-items:center; gap:5px;
  font-size:0.76rem; color:var(--text-light); margin-bottom:12px;
  font-weight:600;
}

.tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:4px; }
.tag {
  padding:4px 11px; border-radius:50px;
  font-size:0.72rem; font-weight:700;
  background:var(--green-bg); color:var(--green-mid);
  border:1px solid rgba(16,185,129,0.2);
}
.tag-gold { background:var(--gold-pale); color:var(--gold); border-color:rgba(212,175,55,0.25); }

/* Card Footer */
.card-footer {
  display:flex; gap:8px;
  padding:14px 18px;
  border-top:1px solid var(--border);
  margin-top:auto;
}

.btn-wa {
  flex:1; padding:12px;
  background:var(--whatsapp); color:var(--white);
  border:none; border-radius:var(--radius-sm);
  font-family:'Tajawal',sans-serif; font-size:0.9rem; font-weight:800;
  cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px;
  transition:var(--transition); text-decoration:none;
}
.btn-wa:hover { background:#1ebe58; transform:translateY(-2px); box-shadow:0 4px 14px rgba(37,211,102,0.4); }

.btn-rate {
  padding:12px 14px;
  background:var(--cream); color:var(--text-medium);
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  font-family:'Tajawal',sans-serif; font-size:0.82rem; font-weight:700;
  cursor:pointer; display:flex; align-items:center; gap:5px;
  transition:var(--transition);
}
.btn-rate:hover { border-color:var(--gold-light); color:var(--gold); background:var(--gold-pale); }

/* ─────────────────────────────────────────────
   EMPTY / LOADING
   ───────────────────────────────────────────── */
.empty-state { text-align:center; padding:70px 20px; color:var(--text-light); grid-column:1/-1; }
.empty-state .big-icon { font-size:3.5rem; margin-bottom:14px; }
.empty-state h3 { font-size:1.2rem; color:var(--text-medium); margin-bottom:6px; }

.skeleton {
  background:linear-gradient(90deg,#f0ede6 25%,#faf8f2 50%,#f0ede6 75%);
  background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:8px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.skel-card { background:var(--white); border-radius:var(--radius-xl); overflow:hidden; border:1.5px solid var(--border); }
.skel-img { height:200px; border-radius:0; }
.skel-body { padding:20px; display:flex; flex-direction:column; gap:10px; }
.skel-line { height:13px; }
.skel-line.w70 { width:70%; }
.skel-line.w50 { width:50%; }
.skel-line.w85 { width:85%; }

/* ─────────────────────────────────────────────
   RATING MODAL
   ───────────────────────────────────────────── */
.overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.5); backdrop-filter:blur(6px);
  z-index:2000; display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; visibility:hidden; transition:var(--transition);
}
.overlay.open { opacity:1; visibility:visible; }

.modal {
  background:var(--white); border-radius:24px; padding:40px 36px;
  max-width:460px; width:100%; position:relative;
  transform:scale(0.93) translateY(16px); transition:var(--transition);
  box-shadow:0 24px 60px rgba(0,0,0,0.1);
  border:1px solid rgba(0,0,0,0.03);
}
.overlay.open .modal { transform:scale(1) translateY(0); }

.modal-close {
  position:absolute; top:14px; left:14px;
  width:34px; height:34px; border-radius:50%;
  border:none; background:var(--cream); color:var(--text-medium);
  font-size:1.1rem; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:var(--transition);
}
.modal-close:hover { background:#fee2e2; color:#dc2626; }

.modal h3 { font-size:1.3rem; font-weight:900; color:var(--green-dark); margin-bottom:5px; text-align:center; }
.modal-sub { font-size:0.85rem; color:var(--text-light); text-align:center; margin-bottom:24px; }

.star-picker { display:flex; gap:8px; justify-content:center; margin-bottom:22px; direction:ltr; }
.star-pick { font-size:2rem; cursor:pointer; color:#d1d5db; transition:var(--transition); }
.star-pick:hover, .star-pick.sel { color:#f59e0b; transform:scale(1.15); }

.modal textarea {
  width:100%; padding:14px 16px;
  border:1px solid rgba(0,0,0,0.06); border-radius:12px;
  font-family:'Tajawal',sans-serif; font-size:0.95rem; color:var(--text-dark);
  resize:vertical; min-height:90px; outline:none; transition:var(--transition); margin-bottom:18px;
  background:#f8fafc;
}
.modal textarea:focus { border-color:var(--green-dark); background:var(--white); }
.modal textarea::placeholder { color:var(--text-light); }

.btn-submit {
  width:100%; padding:14px;
  background:var(--green-dark);
  color:var(--white); border:none; border-radius:var(--radius-sm);
  font-family:'Tajawal',sans-serif; font-size:1rem; font-weight:800;
  cursor:pointer; transition:var(--transition);
}
.btn-submit:hover { background:var(--green-mid); transform:translateY(-1px); box-shadow:0 5px 18px rgba(6,78,59,0.3); }

/* ─────────────────────────────────────────────
   CONTACT MODAL
   ───────────────────────────────────────────── */
.contact-steps { list-style:none; margin:20px 0; display:flex; flex-direction:column; gap:14px; }
.contact-step { display:flex; gap:12px; align-items:flex-start; }
.step-num {
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  background:var(--green-dark); color:var(--white);
  font-size:0.8rem; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.step-text { font-size:0.88rem; color:var(--text-medium); line-height:1.5; }

/* ─────────────────────────────────────────────
   REGISTER PAGE
   ───────────────────────────────────────────── */
.reg-hero {
  background:linear-gradient(135deg, var(--green-dark) 0%, #022c22 100%);
  padding:80px 1.5rem 120px; text-align:center;
}
.reg-hero h1 { font-size:clamp(1.6rem,3.5vw,2.4rem); font-weight:900; color:var(--white); margin-bottom:8px; }
.reg-hero p { color:rgba(255,255,255,0.75); font-size:0.95rem; }

.reg-body { max-width:720px; margin:-80px auto 80px; padding:0 1.2rem; position:relative; z-index:10; }

.reg-card {
  background:var(--white); border-radius:24px;
  padding:50px 48px; box-shadow:0 24px 60px rgba(0,0,0,0.08); border:1px solid rgba(0,0,0,0.03);
}

.steps-indicator {
  display:flex; margin-bottom:36px;
  background:var(--cream); border-radius:50px; overflow:hidden; padding:5px;
}
.step-indicator {
  flex:1; text-align:center; padding:9px 8px;
  border-radius:50px; font-size:0.8rem; font-weight:700; color:var(--text-light);
  transition:var(--transition);
}
.step-indicator.active { background:var(--green-dark); color:var(--white); }
.step-indicator.done { color:var(--green-mid); }

.step-panel { display:none; }
.step-panel.active { display:block; }

.section-title {
  font-size:0.95rem; font-weight:800; color:var(--green-dark);
  padding-bottom:10px; margin-bottom:22px;
  border-bottom:2px solid var(--border);
  display:flex; align-items:center; gap:8px;
}

.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.form-grid.one { grid-template-columns:1fr; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-group.full { grid-column:1/-1; }

label { font-size:0.85rem; font-weight:700; color:var(--green-dark); }
label .req { color:var(--gold); }

.f-input {
  padding:14px 16px;
  border:1px solid rgba(0,0,0,0.06); border-radius:12px;
  font-family:'Cairo',sans-serif; font-size:0.95rem; color:var(--text-dark);
  background:#f8fafc; outline:none; transition:var(--transition);
}
.f-input:focus { border-color:var(--green-dark); background:var(--white); box-shadow:0 0 0 3px rgba(6,78,59,0.08); }
.f-input::placeholder { color:var(--text-light); }
textarea.f-input { resize:vertical; min-height:100px; line-height:1.6; }

.gender-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.gender-opt {
  display:flex; align-items:center; gap:12px;
  padding:15px 16px; border:1px solid rgba(0,0,0,0.06); border-radius:16px;
  cursor:pointer; transition:var(--transition); background:#f8fafc;
}
.gender-opt:hover { border-color:var(--green-dark); box-shadow:0 4px 12px rgba(6,78,59,0.05); }
.gender-opt.sel { border-color:var(--green-dark); background:rgba(6,78,59,0.04); box-shadow:0 4px 12px rgba(6,78,59,0.08); }
.gender-opt input { display:none; }
.gender-opt-icon { font-size:1.5rem; }
.gender-opt-lbl { font-weight:800; font-size:0.88rem; color:var(--green-dark); }
.gender-opt-sub { font-size:0.74rem; color:var(--text-light); }

.hint { font-size:0.76rem; color:var(--text-light); margin-top:2px; }

.form-nav { display:flex; gap:12px; margin-top:30px; }

.btn-next {
  flex:1; padding:14px;
  background:var(--green-dark);
  color:var(--white); border:none; border-radius:var(--radius-sm);
  font-family:'Cairo',sans-serif; font-size:1rem; font-weight:800;
  cursor:pointer; transition:var(--transition);
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.btn-next:hover { background:var(--green-mid); transform:translateY(-1px); box-shadow:0 5px 18px rgba(6,78,59,0.3); }
.btn-next:disabled { opacity:0.6; cursor:not-allowed; transform:none; }

.btn-back-step {
  padding:14px 20px;
  background:var(--cream); color:var(--text-medium);
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  font-family:'Cairo',sans-serif; font-size:0.9rem; font-weight:700;
  cursor:pointer; transition:var(--transition);
}
.btn-back-step:hover { border-color:var(--green-dark); color:var(--green-dark); }

/* ─────────────────────────────────────────────
   SUCCESS STATE
   ───────────────────────────────────────────── */
.success-box { text-align:center; padding:50px 20px; }
.success-icon { font-size:4rem; margin-bottom:16px; }
.success-title { font-size:1.5rem; font-weight:900; color:var(--green-dark); margin-bottom:8px; }
.success-text { font-size:0.95rem; color:var(--text-medium); max-width:380px; margin:0 auto; }

/* ─────────────────────────────────────────────
   TOAST
   ───────────────────────────────────────────── */
.toast {
  position:fixed; bottom:22px; left:50%;
  transform:translateX(-50%) translateY(80px);
  background:var(--green-dark); color:var(--white);
  padding:13px 22px; border-radius:var(--radius-sm);
  font-weight:700; font-size:0.88rem; z-index:9999;
  display:flex; align-items:center; gap:9px;
  box-shadow:var(--shadow-lg); transition:transform 0.38s cubic-bezier(0.175,0.885,0.32,1.275);
  max-width:90vw;
}
.toast.show { transform:translateX(-50%) translateY(0); }
.toast.success { border-right:4px solid var(--green-light); }
.toast.error { border-right:4px solid #dc2626; }

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.footer {
  background:var(--green-dark);
  padding:44px 1.5rem 32px;
}

.footer-inner {
  max-width:1100px; margin:0 auto;
  display:grid; grid-template-columns:auto 1fr auto; gap:28px; align-items:center;
}

.footer-brand { display:flex; align-items:center; gap:12px; }
.footer-logo {
  width:44px; height:44px; border-radius:10px; object-fit:cover;
  box-shadow:0 2px 10px rgba(0,0,0,0.3);
}
.footer-name { font-size:1.05rem; font-weight:900; color:var(--white); }
.footer-sub { font-size:0.7rem; color:var(--gold-light); }

.footer-links { display:flex; gap:20px; justify-content:center; flex-wrap:wrap; }
.footer-links a { font-size:0.82rem; color:rgba(255,255,255,0.65); transition:var(--transition); }
.footer-links a:hover { color:var(--gold-light); }

.footer-copy { font-size:0.78rem; color:rgba(255,255,255,0.4); text-align:left; }



@media print {
  .no-print,.navbar,.footer,.btn-print,.modal-close,.filter-bar,.hero { display:none !important; }
  body { background:#fff !important; }
  .overlay { position:static !important; background:none !important; padding:0 !important; visibility:visible !important; opacity:1 !important; }
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width:768px) {
  .navbar { padding:0 1rem; height:64px; }
  .hero { padding:48px 1rem 60px; }
  .hero-logo { width:76px; height:76px; }
  .hero-stats { flex-wrap:wrap; max-width:320px; }
  .section-choice { grid-template-columns:1fr; max-width:320px; }

  .filter-inner { gap:8px; }
  .main { padding:24px 1rem 60px; }
  .teachers-grid { grid-template-columns:1fr 1fr; gap:12px; }
  .reg-card { padding:28px 20px; }
  .form-grid { grid-template-columns:1fr; }
  .gender-grid { grid-template-columns:1fr; }
  .footer-inner { grid-template-columns:1fr; text-align:center; }
  .footer-brand { justify-content:center; }
  .footer-links { justify-content:center; }
  .footer-copy { text-align:center; }
}

@media (max-width:480px) {
  .brand-name { font-size:1rem; }
  .btn-ghost { display:none; }
  .reg-card { border-radius:var(--radius); }
  .hero-stat-num { font-size:1.2rem; }
}

/* Luxury Saudi refresh */
:root {
  --navy: #0a192f;
  --navy-soft: #1a365d;
  --gold-luxury: #c5a059;
  --gold-soft: #f6efe0;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --surface-muted: #f5f6f8;
  --text-main: #1f2937;
  --text-subtle: #6b7280;
  --border-soft: rgba(10, 25, 47, 0.08);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 18px 40px rgba(10, 25, 47, 0.06);
  --radius-lg: 16px;
  --radius-xl: 20px;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 55%, #f6f7f9 100%);
  color: var(--text-main);
}

.navbar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  padding: 0 2rem;
}

.navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--border-soft);
  box-shadow: 0 10px 30px rgba(10, 25, 47, 0.06);
}

.navbar-logo {
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(10, 25, 47, 0.08);
  object-fit: contain;
  background: #fff;
}

.brand-name {
  color: var(--navy);
}

.brand-tagline {
  color: var(--gold-luxury);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-inline-start: auto;
  margin-inline-end: 1.25rem;
}

.navbar-links a {
  color: var(--text-subtle);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.navbar-links a:hover {
  color: var(--navy);
}

.btn-nav {
  border-radius: 14px;
  padding: 11px 18px;
}

.btn-ghost {
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-subtle);
}

.btn-ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--surface);
}

.btn-gold {
  background: var(--navy);
  box-shadow: 0 12px 28px rgba(10, 25, 47, 0.12);
}

.btn-gold:hover {
  background: var(--navy-soft);
}



.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.btn-hero {
  min-height: 52px;
  padding: 0.95rem 1.4rem;
  border-radius: 15px;
  font-weight: 800;
  font-size: 0.95rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn-hero-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 16px 34px rgba(10, 25, 47, 0.14);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(10, 25, 47, 0.16);
}

.btn-hero-secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border-soft);
}

.btn-hero-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-soft);
  color: var(--text-subtle);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-panel {
  position: relative;
  padding: 1rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 246, 248, 0.94));
  border: 1px solid rgba(10, 25, 47, 0.06);
  box-shadow: var(--shadow-card);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.08), rgba(10, 25, 47, 0.02));
  pointer-events: none;
}

.hero-panel-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(10, 25, 47, 0.05);
  border-radius: var(--radius-xl);
  padding: 1.15rem;
  box-shadow: var(--shadow-soft);
}

.hero-panel-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-panel-label {
  color: var(--gold-luxury);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.hero-panel-brand h2 {
  color: var(--navy);
  font-size: 1.3rem;
  line-height: 1.5;
}

.hero-panel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-value {
  display: block;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.metric-label {
  color: var(--text-subtle);
  font-size: 0.76rem;
  line-height: 1.6;
  font-weight: 700;
}

.filter-bar {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(10, 25, 47, 0.04);
  border-bottom: 1px solid rgba(10, 25, 47, 0.06);
  box-shadow: none;
}

.filter-label {
  color: var(--navy);
}

.filter-select,
.chip {
  background: var(--surface);
  border-color: var(--border-soft);
  color: var(--text-subtle);
  border-radius: 14px;
}

.filter-select:focus,
.chip:hover {
  border-color: rgba(10, 25, 47, 0.22);
}

.chip.active {
  background: var(--navy);
  border-color: var(--navy);
}

.chip-featured.active {
  background: linear-gradient(135deg, #d6b36a, var(--gold-luxury));
  color: var(--navy);
}

.main {
  max-width: 1240px;
  padding-top: 40px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading-copy {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.back-link,
.page-heading {
  margin-bottom: 0;
}

.back-link {
  color: var(--text-subtle);
}

.page-heading {
  color: var(--navy);
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.section-subtitle {
  max-width: 420px;
  color: var(--text-subtle);
  font-size: 0.95rem;
  line-height: 1.9;
}

.teachers-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* Teacher card luxury refresh — keeps circular centered layout */
.teacher-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(10, 25, 47, 0.06);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--shadow-soft);
  overflow: visible;
}

.teacher-card:hover {
  transform: translateY(-5px);
  border-color: rgba(10, 25, 47, 0.12);
  box-shadow: var(--shadow-card);
}

.teacher-card.featured {
  border-color: rgba(197, 160, 89, 0.38);
}

/* Avatar wrap — circular 100px, centered */
.card-avatar-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 22px auto 12px;
  border: 3px solid #064e3b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  background: linear-gradient(135deg,#064e3b,#0f766e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.5);
}

.teacher-card-head {
  min-width: 0;
  flex: 1;
}

.teacher-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
}

.teacher-name {
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.teacher-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-luxury);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.teacher-rating-star {
  line-height: 1;
}

.teacher-meta-row {
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.meta-badge {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-subtle);
  font-size: 0.74rem;
}

.stars-row {
  margin-bottom: 0;
}

.star {
  color: #d1d5db;
}

.star.on,
.teacher-rating-star {
  color: var(--gold-luxury);
}

.rating-num,
.rating-cnt {
  color: var(--text-subtle);
}

.card-body {
  padding: 1rem 0 0.4rem;
}

.teacher-bio {
  margin-bottom: 0.9rem;
  color: var(--text-subtle);
  font-size: 0.88rem;
  line-height: 1.9;
}

.tags {
  gap: 0.45rem;
}

.tag {
  background: var(--surface-muted);
  border-color: transparent;
  color: var(--text-subtle);
}

.tag-gold {
  background: var(--gold-soft);
  color: var(--gold-luxury);
}

.card-footer {
  border-top: 1px solid rgba(10, 25, 47, 0.06);
  padding: 1rem 0 0;
  gap: 0.65rem;
}

.btn-wa,
.btn-rate {
  min-height: 48px;
  border-radius: 14px;
}

.btn-wa {
  background: var(--navy);
  box-shadow: none;
}

.btn-wa:hover {
  background: var(--navy-soft);
  box-shadow: 0 14px 26px rgba(10, 25, 47, 0.14);
}

.btn-rate {
  background: var(--surface);
  border-color: var(--border-soft);
  color: var(--navy);
}

.btn-rate:hover {
  background: var(--surface-muted);
  border-color: rgba(10, 25, 47, 0.15);
  color: var(--navy);
}

.btn-outline-gold {
  border-color: rgba(197, 160, 89, 0.35) !important;
  color: var(--gold-luxury) !important;
}

.disclaimer {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(10, 25, 47, 0.06);
  box-shadow: var(--shadow-soft);
}

.disclaimer-title {
  color: var(--navy);
}

.footer {
  background: var(--navy);
}

.footer-sub,
.footer-links a:hover {
  color: var(--gold-luxury);
}

@media (max-width: 980px) {
  .navbar-links {
    display: none;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-sub {
    max-width: 100%;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    height: 72px;
  }

  .hero {
    padding: 88px 1rem 48px;
  }

  .hero-actions,
  .hero-trust {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    top: 72px;
  }

  /* Mobile: single column grid for teacher cards */
  .teachers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Mobile card: centered layout matching desktop buildCard() design */
  .teacher-card {
    padding: 0;
    border-radius: 18px;
  }

  /* Override old row layout — card uses centered column (inline styles in buildCard) */
  .teacher-card-top {
    flex-direction: column;
    align-items: center;
  }

  .teacher-title-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Avatar circle — match the 100px circle used in buildCard() */
  .card-image,
  .card-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
  }

  /* Card body centered on mobile */
  .card-body {
    padding: 0 15px 15px;
    text-align: center;
  }

  .tags {
    justify-content: center;
  }

  /* Card footer: buttons full width stacked */
  .card-footer {
    flex-direction: column;
    padding: 12px 15px;
    gap: 8px;
  }

  .btn-wa,
  .btn-rate {
    width: 100%;
    justify-content: center;
  }

  /* Meta badges centered row */
  .teacher-meta-row {
    justify-content: center;
  }

  /* Stars centered */
  .stars-row {
    justify-content: center;
  }

  /* Choice cards (hero section) stack vertically */
  .choice-cards-container {
    flex-direction: column !important;
    gap: 14px !important;
  }

  .choice-card {
    min-width: unset !important;
    width: 100% !important;
    padding: 28px 16px !important;
  }

  /* Filter bar inner wraps nicely */
  .filter-inner {
    gap: 8px;
  }

  .filter-select {
    min-width: 120px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .btn-ghost {
    display: none;
  }

  .hero-panel {
    padding: 0.8rem;
  }

  .teacher-card-top {
    flex-direction: column;
    align-items: center;
  }

  .teacher-avatar-wrap {
    width: auto;
  }

  /* Keep avatar size same as buildCard() inline (100px circle) */
  .card-image,
  .card-image-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
  }

  /* Hero h2 smaller on tiny screens */
  .hero h2 {
    font-size: 1.2rem !important;
  }

  /* Choice card h3 smaller */
  .choice-card h3 {
    font-size: 1.1rem !important;
  }

  /* Filter bar: stack selects */
  .filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }

  .filter-chips {
    justify-content: flex-start;
  }
}
