/* Jaipur Doctors — mobile-first medical directory */
:root {
  --teal-50: #eefbf8;
  --teal-100: #d5f3ec;
  --teal-200: #a9e6d9;
  --teal-500: #20a88d;
  --teal-600: #12836f;
  --teal-700: #0b6b5d;
  --teal-800: #07564c;
  --emerald-600: #059669;
  --wa: #25d366;
  --wa-dark: #1da851;
  --bg: #f6f8f8;
  --card: #ffffff;
  --text: #14212b;
  --muted: #66737d;
  --border: #dde5e3;
  --star: #f59e0b;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .045);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, .1);
  --max: 1120px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select { font: inherit; }
textarea { font: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: rgba(255,255,255,.96);
  color: var(--text);
  padding: 13px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #14212b; text-decoration: none; font-weight: 780; font-size: 1.08rem;
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; opacity: .95; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: block;
  flex-shrink: 0;
  box-shadow: 0 5px 12px rgba(11,107,93,.2);
}
.header-actions { margin-left: auto; display: flex; gap: 8px; }
.header-link {
  color: var(--teal-800); font-size: .85rem; font-weight: 650; padding: 7px 12px;
  border-radius: 9px; background: var(--teal-50); border: 1px solid var(--teal-100);
  text-decoration: none;
}
.header-link:hover { background: var(--teal-100); text-decoration: none; }

/* Hero */
.hero {
  background: transparent;
  color: var(--text);
  padding: 24px 0 0;
  border: 0;
}
.hero .wrap {
  position: relative; overflow: hidden;
  padding: 42px 44px 44px;
  border-radius: 24px;
  background: linear-gradient(130deg, #dff6f0 0%, #edf9f6 58%, #f7fcfb 100%);
  border: 1px solid #d7ede7;
}
.hero .wrap::after {
  content: ""; position: absolute; width: 290px; height: 290px;
  right: -105px; top: -150px; border-radius: 50%;
  border: 46px solid rgba(18,131,111,.065); pointer-events: none;
}
.hero-eyebrow {
  position: relative; z-index: 1; margin-bottom: 8px;
  color: var(--teal-700); font-size: .75rem; font-weight: 800;
  letter-spacing: .11em; text-transform: uppercase;
}
.hero-topline {
  position: relative; z-index: 2; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.hero-topline .hero-eyebrow { margin-bottom: 8px; }
.hero-city-link {
  color: var(--teal-800); font-size: .8rem; font-weight: 700;
  padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.72);
  border: 1px solid rgba(18,131,111,.12);
}
.hero-city-link:hover { text-decoration: none; background: #fff; }
.hero h1 {
  position: relative; z-index: 1; margin: 0 0 8px;
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  font-weight: 780;
  letter-spacing: -.035em;
}
.hero p { position: relative; z-index: 1; margin: 0 0 24px; color: #52616d; font-size: 1rem; }
.search-box {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 15px;
  padding: 6px 6px 6px 16px; box-shadow: 0 16px 38px rgba(23,69,60,.13);
  border: 1px solid rgba(18,131,111,.13); max-width: 760px;
}
.city-search {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 8px;
  width: min(100%, 620px); padding: 0 16px; background: #fff;
  border: 1px solid rgba(18,131,111,.13); border-radius: 15px;
  box-shadow: 0 16px 38px rgba(23,69,60,.12);
}
.city-search input {
  width: 100%; border: 0; outline: 0; padding: 16px 0;
  background: transparent; color: var(--text);
}
.search-icon, .filter-icon {
  width: 20px; height: 20px; flex: 0 0 auto; fill: none;
  stroke: #718079; stroke-width: 2; stroke-linecap: round;
}
.search-box input {
  flex: 1; border: 0; outline: 0; padding: 13px 8px;
  border-radius: 10px; color: var(--text); min-width: 0;
}
.search-box button {
  border: 0; background: var(--teal-600); color: #fff;
  padding: 10px 22px; border-radius: 10px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.search-box button:hover { background: var(--teal-700); }

/* Cards & sections */
main { flex: 1; padding: 32px 0 56px; }
.section-title {
  font-size: 1.08rem; font-weight: 750; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.section-title span.muted { font-weight: 500; font-size: .85rem; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Specialty grid */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
}
.spec-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 11px; row-gap: 3px;
  align-items: center; padding: 16px;
  background: var(--card);
  border: 1px solid #e1e8e6;
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  min-height: 88px;
}
.spec-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-200);
  text-decoration: none;
}
.spec-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center; font-size: 1.1rem;
  grid-row: 1 / span 2;
}
.spec-name { font-weight: 700; font-size: .92rem; line-height: 1.25; align-self: end; }
.spec-count { font-size: .78rem; color: var(--muted); }
.city-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
.city-arrow {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--teal-50); color: var(--teal-700);
  font-size: 1rem; transition: transform .12s, background .12s;
}
.city-card:hover .city-arrow { transform: translateX(2px); background: var(--teal-100); }

/* Doctor list cards */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
  align-items: center;
  padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(15,23,42,.025);
}
.filters input[type="search"], .filters select {
  border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 13px; background: #fff; min-width: 0;
}
.filter-search-control {
  flex: 1 1 280px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 11px; padding: 0 12px; background: #fff;
}
.filters .filter-search-control input[type="search"] {
  flex: 1; width: 100%; padding: 11px 0; border: 0; outline: 0;
}
.filters select { flex: 0 0 auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  font-size: .82rem; cursor: pointer; user-select: none;
}
.chip input { accent-color: var(--teal-600); }
.chip.on { background: var(--teal-50); border-color: var(--teal-200); color: var(--teal-800); }

.doc-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 860px) {
  .doc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.doc-card {
  display: flex; flex-direction: column; padding: 19px; color: inherit;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.doc-card:hover {
  border-color: var(--teal-200); box-shadow: var(--shadow-lg); transform: translateY(-1px);
}
.doc-card-main {
  display: block; text-decoration: none; color: inherit; flex: 1;
}
.doc-card-main:hover { text-decoration: none; }
.doc-card-top {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.doc-name {
  font-weight: 750; font-size: 1.04rem; line-height: 1.35; margin: 0 0 5px; color: #17212b;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-meta { font-size: .82rem; color: var(--muted); margin: 0; }
.doc-addr, .doc-phone {
  font-size: .82rem; color: var(--muted); margin: 8px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-actions {
  display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px;
  padding-top: 13px; border-top: 1px solid #edf2f0;
}
.doc-actions .btn:only-child { grid-column: 1 / -1; }
.rating {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fffbeb; color: #92400e;
  border: 1px solid #fde68a;
  padding: 3px 8px; border-radius: 8px;
  font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.rating .star { color: var(--star); }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--teal-50); color: var(--teal-800);
  border: 1px solid var(--teal-100);
}
.badge-open { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-closed { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 11px; font-weight: 650;
  border: 0; cursor: pointer; text-decoration: none; font-size: .92rem;
  transition: transform .1s, background .12s, box-shadow .12s;
}
.btn:active { transform: scale(.98); }
.btn:hover { text-decoration: none; }
.btn-wa {
  background: #20b85a; color: #fff;
  box-shadow: 0 4px 12px rgba(32,184,90,.2);
}
.btn-wa:hover { background: var(--wa-dark); color: #fff; }
.btn-ghost {
  background: #fff; color: var(--text); border: 1px solid #d7e0de;
}
.btn-block { width: 100%; }
.btn-lg { padding: 14px 18px; font-size: 1rem; }

/* Doctor profile */
.profile-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 28px rgba(15,23,42,.055);
  margin-bottom: 14px;
}
.profile-hero h1 {
  margin: 0 0 6px; font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.25; letter-spacing: -.025em;
}
.profile-cta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin: 22px 0 0;
}
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.info-row:last-child { border-bottom: 0; }
.info-icon { font-size: 1.1rem; line-height: 1.4; }
.info-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.info-value { font-size: .95rem; word-break: break-word; }
.info-value a { font-weight: 600; }

.breadcrumb {
  font-size: .8rem; color: var(--muted); margin: 0 0 16px;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.breadcrumb a { color: var(--teal-700); }
.breadcrumb .sep { opacity: .5; }

.empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
  background: var(--card); border-radius: var(--radius); border: 1px dashed var(--border);
}
.load-more-wrap { display: flex; justify-content: center; padding-top: 22px; }
.btn-more { background: #fff; color: var(--teal-800); border: 1px solid var(--teal-200); box-shadow: var(--shadow); }
.btn-more:hover { background: var(--teal-50); }
.search-page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.search-page-heading h1 { margin: 0 0 4px; font-size: clamp(1.45rem, 4vw, 1.9rem); letter-spacing: -.025em; }
.search-page-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.change-city-link { flex: 0 0 auto; font-size: .84rem; font-weight: 700; }
.search-status { margin-top: 4px; }

/* Footer */
.site-footer {
  background: #fff; border-top: 1px solid var(--border);
  padding: 16px 0; font-size: .8rem; color: var(--muted);
  margin-top: auto;
}
.site-footer p { margin: 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--teal-700); }
.site-footer strong { color: var(--text); }

/* Search results page */
#search-results .doc-card { cursor: pointer; }
.hidden { display: none !important; }

.page-summary { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.specialty-filter-wrap {
  display: flex; align-items: center; gap: 8px; margin: -2px 0 16px;
  width: min(100%, 520px); padding: 0 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 13px;
  box-shadow: 0 2px 10px rgba(15,23,42,.025);
}
.specialty-filter-wrap input {
  width: 100%; border: 0; outline: 0; padding: 12px 0; background: transparent;
  color: var(--text);
}
.legal-page {
  max-width: 760px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: clamp(22px, 5vw, 42px); box-shadow: var(--shadow);
}
.legal-page h1 { margin: 0 0 22px; font-size: clamp(1.65rem, 5vw, 2.15rem); letter-spacing: -.03em; }
.legal-page h2 { margin: 28px 0 8px; font-size: 1.02rem; }
.legal-page p { margin: 0 0 14px; color: #46545e; }
.legal-page p:last-child { margin-bottom: 0; }
.legal-updated { font-size: .85rem; color: var(--muted) !important; margin-top: -14px !important; }

@media (max-width: 599px) {
  .site-header { padding: 10px 0; }
  .brand { font-size: 1rem; }
  .hero { padding: 12px 0 0; }
  .hero .wrap { width: calc(100% - 20px); padding: 28px 20px 30px; border-radius: 20px; }
  .hero h1 { font-size: 1.75rem; }
  main { padding-top: 22px; }
  .profile-hero { padding: 20px 16px; }
  .profile-cta { grid-template-columns: 1fr; }
  .filter-search-control { flex-basis: 100%; }
  .search-box { padding-left: 13px; }
  .search-box button { padding-inline: 16px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .search-page-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Live search suggestions */
.search-box-live { position: relative; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden;
  max-height: min(70vh, 420px); overflow-y: auto; text-align: left;
}
.search-suggest.hidden { display: none; }
.suggest-group {
  padding: 10px 14px 4px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.suggest-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; text-decoration: none; color: inherit;
  border-top: 1px solid #f1f5f9;
}
.suggest-item:hover, .suggest-item:focus { background: var(--teal-50); outline: none; }
.suggest-main { font-weight: 650; font-size: .95rem; color: #0f172a; }
.search-suggest, .search-suggest a { color: #0f172a; }
.suggest-meta { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-all { font-weight: 700; color: var(--teal-800); background: #f8fffc; }
.suggest-empty { padding: 14px; color: var(--muted); font-size: .9rem; }

.spec-shortcuts { margin: 0 0 14px; }
.spec-shortcuts.hidden { display: none; }
.spec-shortcuts-label { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.spec-shortcuts-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.chip-link:hover { border-color: var(--teal-200); background: var(--teal-50); color: var(--teal-800); }

/* Guided WhatsApp enquiry */
body.modal-open { overflow: hidden; }
.wa-modal.hidden { display: none !important; }
.wa-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 16px;
}
.wa-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.wa-modal-panel {
  position: relative; z-index: 1;
  width: min(480px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 22px 18px 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  isolation: isolate;
}
.wa-modal-panel h2 { margin: 0 36px 6px 0; font-size: 1.2rem; color: #0f172a; }
.wa-doctor { margin: 0 36px 4px 0; color: #475569; font-size: .86rem; }
.wa-doctor strong { color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: 0; border-radius: 999px;
  background: #f1f5f9; color: #0f172a;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
#wa-form label { display: block; margin: 14px 0 6px; font-size: .82rem; font-weight: 650; color: #334155; }
#wa-form input, #wa-form select, #wa-form textarea {
  display: block; width: 100%;
  border: 1px solid #cbd5e1; border-radius: 10px; padding: 11px 12px;
  font: inherit; font-weight: 500; color: #0f172a; background: #fff;
}
#wa-form textarea { resize: vertical; line-height: 1.45; }
#wa-form input:focus, #wa-form select:focus, #wa-form textarea:focus {
  outline: 3px solid #ccfbf1; border-color: #0d9488;
}
.wa-help { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.wa-privacy { font-size: .76rem; color: var(--muted); background: #f8fafc; padding: 10px 12px; border-radius: 9px; margin: 14px 0; }
.wa-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 599px) {
  .wa-modal { place-items: end center; padding: 0; }
  .wa-modal-panel { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 24px 18px max(18px, env(safe-area-inset-bottom)); }
  .wa-actions { display: grid; grid-template-columns: 1fr 1.5fr; }
  .wa-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
