/* Find a Doctor page */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
main section[id] { scroll-margin-top: 96px; }

/* ---------- Hero ---------- */
.fd-hero { position: relative; overflow: hidden; background: linear-gradient(90deg, #e6f0fb 0%, #eff6fd 45%, #f4f8fd 100%); min-height: 200px; display: flex; align-items: center; }
.fd-hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; }
.fd-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.fd-hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #ecf4fc 0%, rgba(236, 244, 252, .6) 22%, rgba(236, 244, 252, 0) 45%); z-index: 1; }
.fd-hero .container { position: relative; z-index: 2; padding-top: 34px; padding-bottom: 40px; }
.fd-kicker { display: flex; align-items: center; gap: 20px; margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; color: var(--navy); }
.fd-kicker::after { content: ""; width: 46px; height: 2px; background: var(--navy); }
.fd-hero h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 48px); font-weight: 800; color: var(--navy); line-height: 1.15; letter-spacing: -.5px; }
.fd-hero-sub { margin: 0; font-size: 20px; color: #3a4459; }

/* ---------- Search ---------- */
.fd-search-wrap { padding: 22px 0 0; }
.fd-search { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 26px; padding: 12px 14px; background: #eef5fc; border: 1px solid var(--blue-line); border-radius: 16px; }
.fd-field { min-width: 0; position: relative; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #c9d9ea; border-radius: 8px; padding: 0 16px; height: 58px; color: var(--navy); }
.fd-field > .ic { font-size: 24px; color: #2b3b5c; }
.fd-field input, .fd-field select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: inherit; font-size: 18px; color: var(--text); outline: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.fd-field input { cursor: text; }
.fd-field input::placeholder { color: #6b7385; }
.fd-field .fd-chev { position: absolute; right: 16px; pointer-events: none; font-size: 20px; }
.fd-field select { padding-right: 28px; }
.fd-field:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(10, 102, 194, .12); }
.fd-search-btn { height: 58px; padding: 0 38px; font-size: 19px; background: linear-gradient(180deg, #0b4fa3, #0a3f8a); }
.fd-search-btn .ic { font-size: 24px; }

/* ---------- Doctor list ---------- */
.fd-list { padding: 26px 0 60px; }
.fd-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.fd-list-head h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; color: var(--navy); }
.fd-count { margin: 0; font-size: 18px; color: #3a4459; }
.fd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dr-card { display: flex; flex-direction: column; justify-content: space-between; background: #fff; border: 1px solid var(--blue-line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; transition: box-shadow .2s, transform .2s; }
.dr-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11, 79, 163, .14); }
.dr-card.flash { box-shadow: 0 0 0 3px var(--blue-2); }
.dr-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--blue-line); }
.dr-top img { width: 96px; height: 150px; object-fit: cover; border-radius: 10px; background: #eef2f6; }
.dr-card h3 { margin: 4px 0 4px; font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.dr-role { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--blue-2); line-height: 1.25; }
.dr-qual { margin: 0 0 12px; font-size: 13px; color: #3a4459; line-height: 1.4; }
.dr-exp { display: flex; align-items: center; gap: 8px; }
.dr-exp .ic { font-size: 26px; color: var(--blue-2); }
.dr-exp strong { display: block; font-size: 17px; color: var(--navy); line-height: 1.2; }
.dr-exp span { font-size: 13px; color: #3a4459; white-space: nowrap; }
.dr-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding-top: 12px; }
.dr-actions .btn { padding: 9px 9px; font-size: 13.5px; gap: 6px; line-height: 1.2; text-align: center; white-space: nowrap; }
@media (max-width: 1400px) and (min-width: 1181px) { .dr-actions .btn-primary .ic { display: none; } }
.dr-actions .btn-primary { background: linear-gradient(180deg, #0b4fa3, #0a3f8a); }
.fd-empty { text-align: center; padding: 30px; color: var(--muted); font-size: 18px; background: var(--blue-soft); border-radius: 12px; }
.fd-more { margin-top: 30px; min-width: 300px; font-size: 18px; border-color: var(--navy); }
.fd-more[disabled] { opacity: .55; cursor: default; }

/* ---------- Profile ---------- */
.fd-profile { padding: 30px 0 60px; background: linear-gradient(180deg, #f6f9fd, #fff); border-top: 1px solid var(--blue-line); }
.fd-crumb { font-size: 16px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fd-crumb a { color: var(--navy); font-weight: 600; }
.fd-crumb a:hover { color: var(--blue-2); }
.fd-crumb span { color: var(--navy); }
.fd-crumb strong { color: var(--blue-2); }
.pf-banner { position: relative; display: grid; grid-template-columns: 296px minmax(0, 540px) 1fr; gap: 42px; align-items: center; padding: 18px; border: 1px solid var(--blue-line); border-radius: 22px; background: linear-gradient(90deg, #f3f8fd 0%, #f6f9fd 55%, #eef4fa 100%); overflow: hidden; box-shadow: var(--shadow); }
.pf-photo { width: 296px; height: 348px; object-fit: cover; border-radius: 14px; background: #eef2f6; position: relative; z-index: 2; }
.pf-info { position: relative; z-index: 2; }
.pf-art { position: absolute; top: 0; right: 0; bottom: 0; width: 34%; background: url(../img/doctors/profile-bg.jpg) center / cover no-repeat; }
.pf-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #f6f9fd 0%, rgba(246, 249, 253, .7) 18%, rgba(246, 249, 253, 0) 42%); }
.pf-info h2 { margin: 0; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; color: var(--navy); line-height: 1.15; }
.pf-role { margin: 2px 0 6px; font-size: clamp(20px, 2vw, 27px); font-weight: 800; color: var(--blue-2); line-height: 1.25; }
.pf-qual { margin: 0 0 16px; font-size: 20px; color: #26304a; padding-bottom: 16px; border-bottom: 1px solid #d6e2ef; }
.pf-stats { display: flex; gap: 0; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid #d6e2ef; }
.pf-stat { display: flex; align-items: center; gap: 16px; }
.pf-stat .ic { font-size: 44px; color: var(--blue-2); stroke-width: 1.5; }
.pf-stat strong { display: block; font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.15; }
.pf-stat span { font-size: 18px; color: #26304a; }
.pf-stats .pf-stat + .pf-stat { margin-left: 48px; padding-left: 48px; border-left: 2px solid #c7d6e8; }
.pf-book { width: 100%; padding: 18px; font-size: 24px; border-radius: 10px; background: linear-gradient(180deg, #0b5bc0, #0a3f8a); }
.pf-book .ic { font-size: 30px; }

.pf-tabs { display: flex; border-bottom: 1px solid var(--blue-line); margin-top: 10px; overflow-x: auto; }
.pf-tab { display: inline-flex; align-items: center; gap: 14px; padding: 16px 40px; background: none; border: 0; border-bottom: 4px solid transparent; font: inherit; font-size: 20px; font-weight: 600; color: #26304a; cursor: pointer; position: relative; white-space: nowrap; }
.pf-tab .ic { font-size: 30px; color: var(--navy); stroke-width: 1.6; }
.pf-tab + .pf-tab::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; background: #b9cbe0; }
.pf-tab.active { color: var(--blue-2); font-weight: 800; border-bottom-color: var(--blue-2); }
.pf-tab.active .ic { color: var(--blue-2); }
.pf-tab:hover { color: var(--blue-2); }
.pf-panel { padding-top: 34px; }
.pf-about { background: linear-gradient(180deg, #f3f8fd, #eef5fc); border: 1px solid var(--blue-line); border-radius: 16px; padding: 18px 48px 28px; }
.pf-about h3, .pf-panel-title { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; color: var(--navy); }
.pf-panel-title { padding-left: 18px; }
.pf-about p { margin: 0; font-size: 21px; color: #26304a; max-width: 1200px; }
.pf-expertise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; }
.pf-chip { display: flex; align-items: center; gap: 40px; padding: 18px 48px; border: 1px solid var(--blue-line); border-radius: 10px; background: linear-gradient(180deg, #f6fafe, #eef5fc); box-shadow: 0 3px 10px rgba(11, 79, 163, .05); font-size: 21px; font-weight: 500; color: #1d2433; }
.pf-chip .ic { font-size: 46px; color: var(--blue); stroke-width: 1.5; }
.pf-quals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pf-qcard { display: flex; align-items: center; gap: 0; padding: 26px 40px; border: 1px solid var(--blue-line); border-radius: 14px; background: linear-gradient(180deg, #f6fafe, #eef5fc); }
.pf-qcard .ic { font-size: 56px; color: var(--blue); stroke-width: 1.5; padding-right: 32px; margin-right: 32px; box-sizing: content-box; border-right: 2px solid #9fb8d6; }
.pf-qcard strong { display: block; font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.pf-qcard span { font-size: 21px; color: #3a4459; line-height: 1.4; }

/* ---------- Booking ---------- */
.fd-book { padding: 30px 0 80px; background: linear-gradient(180deg, #f3f8fd, #fff 60%); border-top: 1px solid var(--blue-line); }
.bk-layout { display: grid; grid-template-columns: 392px 1fr; gap: 20px; align-items: start; }
.bk-doctor, .bk-form { background: #fff; border: 1px solid var(--blue-line); border-radius: 22px; box-shadow: var(--shadow); }
.bk-doctor { padding: 18px 18px 22px; background: linear-gradient(180deg, #f6fafe, #eef5fc); }
.bk-doctor img { width: 100%; height: 352px; object-fit: cover; border-radius: 14px; margin-bottom: 16px; }
.bk-doctor h3 { margin: 0 14px; font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.bk-doctor .pf-role { margin: 4px 14px 8px; font-size: 22px; }
.bk-qual { margin: 0 14px 14px; padding-bottom: 14px; border-bottom: 1px solid #c9d9ea; font-size: 18px; color: #26304a; line-height: 1.4; }
.bk-stats { display: grid; gap: 14px; padding: 0 14px; }
.bk-stats .pf-stat .ic { font-size: 50px; }
.bk-stats .pf-stat strong { font-size: 25px; }
.bk-form { padding: 22px 30px 34px 36px; }
.bk-form h2 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); font-weight: 800; color: var(--navy); line-height: 1.2; }
.bk-sub { margin: 4px 0 22px; font-size: 22px; color: #3a4459; }
.bk-label { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 700; color: var(--navy); margin: 0 0 10px 10px; }
.bk-label .ic { font-size: 28px; color: var(--navy); stroke-width: 1.6; }
.bk-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.bk-field { display: block; }
.bk-field input, .bk-select select { width: 100%; height: 60px; padding: 0 20px; border: 1px solid #b9cbe0; border-radius: 10px; background: #fff; font: inherit; font-size: 19px; color: var(--text); outline: none; }
.bk-select { position: relative; display: block; }
.bk-select select { appearance: none; -webkit-appearance: none; padding-right: 50px; cursor: pointer; }
.bk-select .ic { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; pointer-events: none; color: var(--navy); }
.bk-field input:focus, .bk-select select:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(10, 102, 194, .12); }
.bk-field .invalid, .bk-field input.invalid, .bk-select select.invalid { border-color: #d33; }
.bk-when { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 10px; }
.bk-date { padding-right: 34px; border-right: 2px solid #d6e2ef; }
.bk-time { padding-left: 34px; }
.cal { border: 1px solid #c9d9ea; border-radius: 14px; padding: 12px 18px 16px; background: #fff; }
.cal.invalid { border-color: #d33; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid #e3ebf4; }
.cal-head strong { font-size: 22px; font-weight: 800; color: var(--navy); }
.cal-nav { background: none; border: 0; font-size: 26px; color: var(--navy); cursor: pointer; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; }
.cal-nav:hover:not([disabled]) { background: var(--blue-soft); }
.cal-nav[disabled] { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; }
.cal-dow { padding: 10px 0 4px; font-size: 18px; color: #26304a; }
.cal-dow .we { color: #d11a2a; }
.cal-day { height: 38px; border: 0; background: none; font: inherit; font-size: 19px; color: #1d2433; border-radius: 8px; cursor: pointer; }
.cal-day:hover:not([disabled]) { background: var(--blue-soft); }
.cal-day.sel { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day[disabled] { color: #b5bfcc; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; margin-top: 8px; }
.slot { height: 66px; border: 1px solid #c9d9ea; border-radius: 10px; background: linear-gradient(180deg, #f8fbfe, #eef4fb); font: inherit; font-size: 17px; white-space: nowrap; color: #1d2433; cursor: pointer; transition: .15s; }
.slot:hover { border-color: var(--blue-2); }
.slot.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.bk-submit { width: 100%; margin-top: 40px; padding: 18px; font-size: 24px; border-radius: 10px; background: linear-gradient(180deg, #0b5bc0, #0a3f8a); }
.bk-submit .ic { font-size: 34px; }
.bk-error { margin: 20px 0 0; padding: 12px 16px; border-radius: 8px; background: #fdecec; color: #b42318; font-weight: 600; }
.bk-success { margin-top: 18px; padding: 16px 18px; border-radius: 10px; background: #e8f7ee; border: 1px solid #a6dcb9; color: #146c3a; font-size: 17px; }
.bk-success strong { display: block; font-size: 19px; margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .fd-grid { grid-template-columns: repeat(2, 1fr); }
  .fd-search { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pf-banner { grid-template-columns: 240px 1fr; gap: 28px; }
  .pf-photo { width: 240px; height: 300px; }
  .pf-art { opacity: .25; width: 60%; }
  .pf-expertise, .pf-quals { grid-template-columns: repeat(2, 1fr); }
  .pf-chip { padding: 16px 24px; gap: 22px; }
  .pf-qcard { padding: 22px 24px; }
  .bk-layout { grid-template-columns: 300px 1fr; }
  .bk-doctor img { height: 300px; }
  .bk-doctor h3 { font-size: 26px; }
  .bk-row3 { grid-template-columns: 1fr 1fr; }
  .bk-when { grid-template-columns: 1fr; }
  .bk-date { padding-right: 0; border-right: 0; }
  .bk-time { padding-left: 0; margin-top: 26px; }
  .bk-submit { margin-top: 26px; }
}
@media (max-width: 900px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-doctor { display: grid; grid-template-columns: 160px 1fr; gap: 0 18px; align-items: start; }
  .bk-doctor img { grid-row: span 4; height: 200px; margin: 0; }
  .bk-doctor h3, .bk-doctor .pf-role, .bk-qual, .bk-stats { margin-left: 0; margin-right: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .fd-hero { min-height: 0; }
  .fd-hero-photo { position: relative; width: 100%; height: 190px; }
  .fd-hero-photo::before { display: none; }
  .fd-hero { flex-direction: column-reverse; align-items: stretch; }
  .fd-hero .container { padding-top: 24px; padding-bottom: 24px; }
  .fd-kicker { font-size: 13px; letter-spacing: 3px; }
  .fd-hero-sub { font-size: 17px; }
  .fd-search { grid-template-columns: minmax(0, 1fr); }
  .fd-field, .fd-search-btn { height: 52px; }
  .fd-grid { grid-template-columns: 1fr; }
  .dr-top { grid-template-columns: 110px 1fr; }
  .dr-top img { width: 110px; height: 150px; }
  .fd-more { min-width: 0; width: 100%; }
  .pf-banner { grid-template-columns: 1fr; gap: 18px; padding: 14px; }
  .pf-photo { width: 100%; height: 320px; object-position: center 20%; }
  .pf-art { display: none; }
  .pf-qual { font-size: 17px; }
  .pf-stats { flex-direction: column; gap: 14px; }
  .pf-stats .pf-stat + .pf-stat { margin-left: 0; padding-left: 0; border-left: 0; }
  .pf-stat .ic { font-size: 36px; }
  .pf-stat strong { font-size: 22px; }
  .pf-book { font-size: 19px; padding: 14px; }
  .pf-tab { flex: 1; justify-content: center; padding: 12px 6px; font-size: 14.5px; gap: 6px; }
  .pf-tab .ic { display: none; }
  .pf-tab + .pf-tab::before { top: 14px; bottom: 14px; }
  .pf-about { padding: 16px 20px 22px; }
  .pf-about p { font-size: 17px; }
  .pf-panel-title { padding-left: 0; }
  .pf-expertise, .pf-quals { grid-template-columns: 1fr; }
  .pf-chip { font-size: 18px; padding: 14px 18px; gap: 18px; }
  .pf-chip .ic { font-size: 36px; }
  .pf-qcard .ic { font-size: 42px; padding-right: 18px; margin-right: 18px; }
  .pf-qcard strong { font-size: 24px; }
  .pf-qcard span { font-size: 17px; }
  .bk-doctor { grid-template-columns: 110px 1fr; }
  .bk-doctor img { height: 140px; grid-row: span 3; }
  .bk-stats { grid-column: 1 / -1; margin-top: 10px; }
  .bk-doctor h3 { font-size: 22px; }
  .bk-doctor .pf-role { font-size: 17px; }
  .bk-qual { font-size: 15px; }
  .bk-form { padding: 20px 16px 24px; }
  .bk-sub { font-size: 17px; }
  .bk-row3 { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .bk-label { font-size: 17px; margin-left: 2px; }
  .bk-field input, .bk-select select { height: 52px; font-size: 17px; }
  .cal { padding: 10px 8px 12px; }
  .cal-dow { font-size: 14px; }
  .cal-day { font-size: 16px; height: 36px; }
  .slots { gap: 10px; }
  .slot { height: 52px; font-size: 16px; }
  .bk-submit { font-size: 20px; padding: 15px; }
  .bk-submit .ic { font-size: 26px; }
}
