/* =============================================================
   Dr. Alvi Clinic — additions: languages, RTL, duty board,
   introductions, leadership, FAQ, accessibility.
   Loads after style.css. Nothing here changes the old pages' layout.
   ============================================================= */

:root { --st-available:#0a8a5b; --st-consulting:#b36b00; --st-break:#5b6b7c; --st-off:#8a94a0; --st-scheduled:#2b6cb0; }

/* ---------- accessibility ---------- */
.skip-link { position:absolute; inset-inline-start:12px; top:-60px; z-index:1000; background:var(--navy); color:#fff; padding:.7rem 1rem; border-radius:var(--r-sm); font-weight:600; }
.skip-link:focus { top:10px; }
:focus-visible { outline:3px solid var(--cyan); outline-offset:2px; }
button, .btn { -webkit-tap-highlight-color:transparent; }
bdi { unicode-bidi:isolate; }

/* ---------- logo / hero ---------- */
.hero-logo { display:grid; place-items:center; }
.hero-logo img { width:min(300px,70%); height:auto; filter:drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.hero__extra { display:flex; align-items:center; gap:.5rem; margin-top:.9rem; color:#cfe0f1; font-size:.95rem; }
.hero__extra .icon { width:18px; height:18px; color:var(--cyan); }
.icon-lg { display:inline-grid; place-items:center; width:54px; height:54px; border-radius:16px; background:var(--teal-tint); color:var(--teal-700); }
.icon-lg .icon { width:28px; height:28px; }

/* ---------- language switcher ---------- */
.langsw { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--line-strong); border-radius:var(--pill); background:#fff; }
.langsw a { white-space:nowrap; padding:.32rem .7rem; border-radius:var(--pill); font-size:.82rem; font-weight:600; color:var(--body); line-height:1.2; min-height:32px; display:inline-flex; align-items:center; }
.langsw a:hover { background:var(--tint); color:var(--navy); }
.langsw a[aria-current="true"] { background:var(--navy); color:#fff; }
.langsw--drawer { margin:.2rem 1.2rem 1rem; align-self:flex-start; }
.langsw--footer { margin-top:1rem; background:transparent; border-color:rgba(255,255,255,.25); }
.langsw--footer a { color:#cfe0f1; }
.langsw--footer a:hover { background:rgba(255,255,255,.1); color:#fff; }
.langsw--footer a[aria-current="true"] { background:var(--gold); color:var(--navy-900); }
.nav__cta { gap:.6rem; }
@media (max-width:1180px) { .nav__call span { display:none; } .nav__call { padding-inline:.8rem; } }
@media (max-width:900px) { .nav__cta .langsw { display:none; } }
@media (min-width:901px) { .langsw--drawer { display:none; } }
@media (max-width:1100px) and (min-width:901px) { .nav__links a { padding-inline:.55rem; font-size:.9rem; } }

/* ---------- direction helpers ---------- */
[dir="rtl"] .icon--dir { transform:scaleX(-1); }
.breadcrumb .icon { width:14px; height:14px; vertical-align:-2px; opacity:.7; }

/* ---------- Urdu / Chinese typography ---------- */
body.lang-ur { font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",var(--font-sans); line-height:1.95; }
body.lang-ur h1, body.lang-ur h2, body.lang-ur h3, body.lang-ur h4, body.lang-ur .brand__name,
body.lang-ur .hero__sub, body.lang-ur .big, body.lang-ur .duty__name { font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif; line-height:1.7; letter-spacing:0; }
body.lang-ur h1 { line-height:1.55; }
body.lang-ur .eyebrow, body.lang-ur .badge, body.lang-ur .btn { letter-spacing:0; text-transform:none; }
body.lang-ur .btn { line-height:1.9; }
body.lang-ur .eyebrow { font-size:1rem; }
body.lang-ur .badge { font-size:.9rem; }
body.lang-ur .nav__links a { font-size:.95rem; }
body.lang-ur .brand__name { font-family:var(--font-sans); } /* clinic name stays Latin */
body.lang-zh { font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",var(--font-sans); line-height:1.8; }
body.lang-zh h1, body.lang-zh h2, body.lang-zh h3, body.lang-zh h4, body.lang-zh .hero__sub, body.lang-zh .big { font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; letter-spacing:0; font-weight:700; }
body.lang-zh .brand__name { font-family:var(--font-display); }
body.lang-zh .eyebrow, body.lang-zh .badge { letter-spacing:.04em; text-transform:none; }
[dir="rtl"] .eyebrow, [dir="rtl"] .eyebrow--center { letter-spacing:0; }
[dir="rtl"] body, body[dir="rtl"], html[dir="rtl"] body { text-align:start; }
html[dir="rtl"] .hero__inner, html[dir="rtl"] .about-grid { direction:rtl; }
html[dir="rtl"] .nav__links, html[dir="rtl"] .nav, html[dir="rtl"] .btn-row, html[dir="rtl"] .hero__facts { direction:rtl; }
html[dir="rtl"] .drawer__panel { inset-inline-end:auto; inset-inline-start:0; }
html[dir="rtl"] .svc__list li, html[dir="rtl"] .info-list li { text-align:start; }
html[dir="rtl"] .page-hero .urdu-sub, html[dir="rtl"] .hero .urdu-sub { text-align:right; }

/* ---------- duty board ---------- */
.board-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:1.1rem; align-items:start; }
.board-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:1.2rem; box-shadow:var(--sh-sm); border-inline-start:5px solid var(--st-off); display:flex; flex-direction:column; gap:.8rem; }
.board-card--available { border-inline-start-color:var(--st-available); }
.board-card--consulting { border-inline-start-color:var(--st-consulting); }
.board-card--break { border-inline-start-color:var(--st-break); }
.board-card--scheduled { border-inline-start-color:var(--st-scheduled); }
.board-card__top { display:flex; align-items:center; gap:.9rem; }
.board-card__who h3 { font-size:1.12rem; line-height:1.25; margin:0; }
.board-card__who h3 a { color:var(--navy); }
.board-card__who .spec { color:var(--teal-700); font-weight:600; font-size:.9rem; }
.board-card__status { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.board-card__note { font-size:.86rem; color:var(--muted); }
.board-card__hours { display:flex; gap:.45rem; align-items:center; font-size:.9rem; color:var(--body); }
.board-card__hours .icon { width:16px; height:16px; color:var(--teal-700); flex:none; }
.badge { display:inline-flex; align-items:center; gap:.45rem; padding:.3rem .75rem; border-radius:var(--pill); font-size:.82rem; font-weight:700; background:#eef2f6; color:var(--st-off); border:1px solid currentColor; }
.badge__dot { width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
.badge--available { color:var(--st-available); background:#e5f6ee; }
.badge--consulting { color:var(--st-consulting); background:#fff3dd; }
.badge--break { color:var(--st-break); background:#eaeff4; }
.badge--off { color:#6a7480; background:#eef0f3; }
.badge--scheduled { color:var(--st-scheduled); background:#e8f1fb; }
.queue { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; margin:0; padding:.7rem; background:var(--tint); border-radius:var(--r-md); text-align:center; }
.queue dt { font-size:.72rem; color:var(--muted); font-weight:600; }
.queue dd { margin:0; font-weight:800; font-size:1.15rem; color:var(--navy); font-variant-numeric:tabular-nums; }
.queue__est { margin:0; font-size:.86rem; color:var(--body); }
.board-empty { text-align:center; background:#fff; border:1px dashed var(--line-strong); border-radius:var(--r-lg); padding:2rem 1.2rem; display:grid; gap:1rem; justify-items:center; }
.board-foot { display:flex; gap:.5rem; align-items:flex-start; margin-top:1.1rem; color:var(--muted); font-size:.85rem; }
.board-foot .icon { width:16px; height:16px; flex:none; margin-top:.2rem; }
.board-updated { text-align:center; color:var(--muted); font-size:.82rem; margin-top:.8rem; }
.avatar--md { width:60px; height:60px; }
.avatar-man { width:100%; height:100%; display:block; }

/* ---------- introduction strip + player ---------- */
.intro-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr)); gap:1rem; }
.intro-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:1.2rem 1rem; text-align:center; display:flex; flex-direction:column; align-items:center; gap:.4rem; box-shadow:var(--sh-sm); }
.intro-card__photo { width:84px; height:84px; border-radius:50%; overflow:hidden; background:var(--navy); display:grid; place-items:center; box-shadow:0 0 0 3px #fff,0 0 0 5px rgba(215,163,58,.6); margin-bottom:.4rem; }
.intro-card__name { font-weight:700; color:var(--navy); line-height:1.3; }
.intro-card__spec { font-size:.85rem; color:var(--teal-700); font-weight:600; margin-bottom:.5rem; }
.intro-card .btn { margin-top:auto; }
.btn .icon { flex:none; }

.intro-dialog { border:0; padding:0; background:transparent; max-width:min(560px,94vw); width:100%; margin:auto; }
.intro-dialog::backdrop { background:rgba(6,27,52,.72); }
.intro-box { position:relative; background:var(--navy-900); color:#eaf2fb; border-radius:var(--r-xl); overflow:hidden; box-shadow:var(--sh-lg); }
.intro-close { position:absolute; top:10px; inset-inline-end:10px; z-index:3; width:40px; height:40px; border-radius:50%; border:0; background:rgba(255,255,255,.14); color:#fff; display:grid; place-items:center; cursor:pointer; }
.intro-close:hover { background:rgba(255,255,255,.25); }
.intro-body { display:grid; grid-template-columns:1fr; min-height:340px; }
.intro-photo { height:190px; background:linear-gradient(135deg,#0d3560,#061B34); display:grid; place-items:center; overflow:hidden; }
.intro-photo:empty { display:none; }
.intro-photo img { height:100%; width:auto; max-width:100%; object-fit:cover; object-position:center top; }
.intro-stage { padding:1.6rem 1.5rem 1rem; display:grid; align-content:center; }
.intro-slide { animation:introIn .6s ease both; }
@keyframes introIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.intro-slide__kicker { color:var(--gold); font-size:.8rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; margin-bottom:.5rem; }
.intro-slide__title { color:#fff; font-size:clamp(1.4rem,4.5vw,1.9rem); line-height:1.25; margin:0 0 .4rem; }
.intro-slide__text { color:#cfe0f1; font-size:1.02rem; margin:0; }
.intro-slide__list { list-style:none; padding:0; margin:.4rem 0 0; display:grid; gap:.5rem; }
.intro-slide__list li { padding-inline-start:1.4rem; position:relative; color:#e3eefb; }
.intro-slide__list li::before { content:""; position:absolute; inset-inline-start:0; top:.62em; width:8px; height:8px; border-radius:50%; background:var(--cyan); }
.intro-progress { height:4px; background:rgba(255,255,255,.12); }
.intro-progress span { display:block; height:100%; width:100%; background:var(--gold); transform-origin:left; transform:scaleX(0); }
[dir="rtl"] .intro-progress span { transform-origin:right; }
.intro-controls { display:flex; align-items:center; gap:.6rem; padding:.8rem 1rem; }
.intro-controls button { width:44px; height:44px; border-radius:50%; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.08); color:#fff; display:grid; place-items:center; cursor:pointer; }
.intro-controls button:disabled { opacity:.35; cursor:default; }
.intro-controls button:hover:not(:disabled) { background:rgba(255,255,255,.18); }
.intro-play { background:var(--gold)!important; color:var(--navy-900)!important; border-color:var(--gold)!important; }
.intro-play .icon:nth-child(2) { display:none; }
.intro-play.is-playing .icon:nth-child(1) { display:none; }
.intro-play.is-playing .icon:nth-child(2) { display:block; }
.intro-count { margin-inline-start:auto; font-size:.85rem; color:#9fb6cf; font-variant-numeric:tabular-nums; }
.intro-note { margin:0; padding:0 1.2rem 1rem; font-size:.78rem; color:#8aa3be; }
@media (min-width:640px) { .intro-body { grid-template-columns:200px 1fr; } .intro-photo { height:auto; } }
@media (prefers-reduced-motion:reduce) { .intro-slide { animation:none; } }

/* ---------- leadership ---------- */
.lead-grid { max-width:980px; margin-inline:auto; }
.lead-card { text-align:center; padding:1.6rem 1.2rem; }
.lead-card__photo { width:120px; height:120px; margin:0 auto 1rem; border-radius:50%; overflow:hidden; background:var(--navy); display:grid; place-items:center; box-shadow:0 0 0 4px #fff,0 0 0 6px rgba(215,163,58,.65); }
.lead-card__photo .doctor-photo__img { object-position:center top; }
.lead-card h3 { margin:0; color:var(--navy); }
.lead-card .spec { color:var(--teal-700); font-weight:700; margin:.2rem 0 .6rem; }
.lead-card p { color:var(--body); font-size:.95rem; margin:0; }
.stat-line { display:grid; gap:.6rem; margin-top:1rem; }
.stat-line > div { display:flex; gap:.6rem; align-items:center; }
.stat-line .icon { width:18px; height:18px; color:var(--teal-700); flex:none; }
.about-visual .icon-lg { margin-bottom:.8rem; }

/* ---------- portals with logos ---------- */
.portal__top { display:flex; align-items:center; gap:.9rem; position:relative; }
.portal__top h3 { margin:0; }
.portal__logo { width:56px; height:56px; border-radius:14px; object-fit:cover; background:#fff; flex:none; }
.muted-line { display:flex; gap:.4rem; align-items:center; margin-top:.6rem; font-size:.9rem; color:var(--body); }
.muted-line .icon { width:16px; height:16px; color:var(--teal-700); }

/* ---------- FAQ ---------- */
.faq { display:grid; gap:.7rem; }
.faq__item { background:#fff; border:1px solid var(--line); border-radius:var(--r-md); padding:0 1.1rem; }
.faq__item summary { cursor:pointer; padding:1rem 0; font-weight:700; color:var(--navy); list-style:none; display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.faq__item summary::-webkit-details-marker { display:none; }
.faq__item summary::after { content:"+"; font-size:1.4rem; color:var(--teal-700); line-height:1; }
.faq__item[open] summary::after { content:"–"; }
.faq__item p { margin:0 0 1rem; color:var(--body); }

/* ---------- profile / doctor page tweaks ---------- */
.profile__block--dark { background:var(--navy); color:#eaf2fb; border-radius:var(--r-lg); padding:1.5rem; }
.profile__block--dark h2 { color:#fff; }
.page-hero__title { font-family:var(--font-display); font-size:clamp(1.6rem,4vw,2.4rem); color:#fff; margin:.5rem 0 0; font-weight:600; }
body.lang-ur .page-hero__title, body.lang-zh .page-hero__title { font-family:inherit; }

/* ---------- staff area ---------- */
body.staff { background:var(--bg); font-family:var(--font-sans); color:var(--ink); }
.staff-wrap { max-width:1100px; margin:0 auto; padding:1rem; }
.staff-top { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; padding:.8rem 0 1rem; }
.staff-top nav { display:flex; gap:.5rem; flex-wrap:wrap; }
.staff-top nav a, .staff-top nav button { padding:.5rem .9rem; border-radius:var(--pill); border:1px solid var(--line-strong); background:#fff; color:var(--navy); font-weight:600; font-size:.9rem; cursor:pointer; }
.staff-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:1.1rem; margin-bottom:1rem; box-shadow:var(--sh-sm); }
.staff-card h2 { font-size:1.1rem; margin:0 0 .2rem; }
.staff-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.7rem; }
.staff-actions button, .staff-actions .btn { min-height:44px; padding:.5rem 1rem; border-radius:var(--r-sm); border:1px solid var(--line-strong); background:#fff; font-weight:700; cursor:pointer; color:var(--navy); font-size:.92rem; }
.staff-actions button.on { background:var(--navy); color:#fff; border-color:var(--navy); }
.staff-actions button.go { background:var(--teal); color:#fff; border-color:var(--teal); }
.staff-actions button.warn { background:#fff3dd; border-color:#e5b45a; }
.staff-msg { background:#e5f6ee; border:1px solid #9bd5b9; padding:.7rem 1rem; border-radius:var(--r-sm); margin-bottom:1rem; }
.staff-msg.err { background:#fdeaea; border-color:#e6a1a1; }
.staff-form { display:grid; gap:.8rem; max-width:420px; }
.staff-form label { display:grid; gap:.3rem; font-weight:600; font-size:.92rem; }
.staff-form input, .staff-form select { padding:.7rem .8rem; border:1px solid var(--line-strong); border-radius:var(--r-sm); font:inherit; min-height:44px; }
.staff-table { width:100%; border-collapse:collapse; font-size:.92rem; }
.staff-table th, .staff-table td { padding:.5rem; border-bottom:1px solid var(--line); text-align:start; vertical-align:middle; }
.token-box { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin-top:.6rem; font-variant-numeric:tabular-nums; }
.token-box b { font-size:1.4rem; color:var(--navy); }

/* ---------- small screens ---------- */
@media (max-width:560px) {
  .board-grid { grid-template-columns:1fr; }
  .hero-logo img { width:min(190px,55%); }
  .intro-strip { grid-template-columns:minmax(0,1fr); }
  .queue { gap:.3rem; padding:.55rem; }
}
@media print { .site-header, .drawer, .langsw, .intro-dialog { display:none!important; } }

.intro-dialog.no-photo .intro-body { grid-template-columns:1fr; }
.intro-count { direction:ltr; unicode-bidi:isolate; }
