/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.hf-header {
  position: sticky; top: 0; z-index: 100;
  background: #0d1b2e;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hf-header__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex; align-items: center; gap: 32px;
}
.hf-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: #fff;
  flex-shrink: 0;
}
.hf-logo span { color: #fff; }
.hf-logo--white span { color: #fff; }
.hf-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
}
.hf-nav a {
  padding: 6px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.8);
  transition: all .15s;
}
.hf-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.hf-header__cta { margin-left: auto; }
.hf-nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.8); padding: 6px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.hf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
  white-space: nowrap;
}
.hf-btn--primary {
  background: #2563eb; color: #fff; border-color: #2563eb;
}
.hf-btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.hf-btn--outline {
  background: transparent; color: #2563eb; border-color: #2563eb;
}
.hf-btn--outline:hover { background: #eff6ff; }
.hf-btn--ghost {
  background: transparent; color: #64748b; border-color: #e2e8f0;
}
.hf-btn--ghost:hover { background: #f8fafc; color: #1e293b; }
.hf-btn--full { width: 100%; justify-content: center; }
.hf-btn--sm { padding: 7px 14px; font-size: 13px; }

/* ── Form fields ──────────────────────────────────────────────────────────── */
.hf-field { display: flex; flex-direction: column; gap: 6px; }
.hf-field label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: #64748b; text-transform: uppercase;
}
.hf-field input,
.hf-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.hf-field input:focus,
.hf-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.hf-field input::placeholder { color: #94a3b8; }
.hf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

//* ── Hero ───────────────────────────────────────────────────────────────── */
.hf-hero {
  position: relative;
  /* Height = exactly the photo height so states start right below */
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: #0d1b2e;
}
.hf-hero__bg {
  position: absolute; inset: 0;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663436549717/CMHds4SXnAkdAJMmnQF98e/hero-hospital-bg-kEwS2rPAPJMdbFkbEyQEdq.webp');
  background-size: cover;
  /* Show top of photo so doctors' faces are visible */
  background-position: center top;
  background-repeat: no-repeat;
  filter: brightness(0.55);
}
.hf-hero__content {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  /* Padding controls hero height — top/bottom balanced */
  padding: 60px 24px 60px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  /* Align both columns to the top so specialties card stays near top */
  align-items: start;
}
.hf-hero__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(255,255,255,.2);
  margin-bottom: 20px;
}
.hf-hero__text h1 {
  font-size: clamp(36px, 5vw, 56px); font-weight: 800;
  color: #fff; line-height: 1.1; margin-bottom: 12px;
}
.hf-hero__text > p { color: rgba(255,255,255,.8); font-size: 18px; margin-bottom: 8px; }
.hf-hero__sub { font-size: 15px !important; color: rgba(255,255,255,.7) !important; max-width: 440px; }
.hf-hero__stats {
  display: flex; gap: 32px; margin-top: 32px;
}
.hf-hero__stats div { display: flex; flex-direction: column; }
.hf-hero__stats strong { font-size: 28px; font-weight: 800; color: #fff; }
.hf-hero__stats span { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: rgba(255,255,255,.6); text-transform: uppercase; }

/* Search card */
.hf-search-card {
  background: #fff; border-radius: 20px;
  padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.hf-search-card h2 { font-size: 20px; font-weight: 700; color: #1e293b; margin-bottom: 24px; }
.hf-search-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Features ─────────────────────────────────────────────────────────────── */
.hf-features { padding: 80px 24px; background: #fff; }
.hf-features__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.hf-feature-card {
  padding: 32px; border-radius: 16px; border: 1.5px solid #e2e8f0;
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .2s, transform .2s;
}
.hf-feature-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); transform: translateY(-2px); }
.hf-feature-card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.hf-feature-card__icon--blue { background: #eff6ff; color: #2563eb; }
.hf-feature-card__icon--green { background: #f0fdf4; color: #16a34a; }
.hf-feature-card__icon--purple { background: #faf5ff; color: #7c3aed; }
.hf-feature-card h3 { font-size: 18px; font-weight: 700; }
.hf-feature-card p { font-size: 14px; color: #64748b; flex: 1; }

/* ── Popular specialties ───────────────────────────────────────────────── */
.hf-popular { padding: 80px 24px; background: #f8fafc; }
.hf-popular__inner { max-width: 1280px; margin: 0 auto; }
.hf-popular__header { margin-bottom: 40px; }
.hf-popular__header h2 { font-size: 32px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.hf-popular__header p { font-size: 16px; color: #64748b; }

/* Specialty card grid */
.hf-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.hf-spec-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  text-decoration: none;
  color: #1e293b;
  transition: all .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.hf-spec-card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37,99,235,.12);
}
.hf-spec-card__icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.hf-spec-card__emoji {
  font-size: 32px;
  line-height: 1;
  display: block;
  text-align: center;
}
.hf-spec-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.hf-spec-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.hf-spec-card__sub {
  font-size: 12px;
  font-weight: 500;
}
.hf-spec-card__arrow {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  transform: translateX(-4px);
}
.hf-spec-card:hover .hf-spec-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Search Page ──────────────────────────────────────────────────────────── */
.hf-search-page { padding: 32px 24px; }
.hf-search-layout {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start;
}

/* Sidebar */
.hf-sidebar { position: sticky; top: 80px; }
.hf-sidebar__inner {
  background: #fff; border-radius: 16px; border: 1.5px solid #e2e8f0;
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.hf-sidebar__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: #1e293b;
  padding-bottom: 16px; border-bottom: 1.5px solid #f1f5f9;
}
.hf-filter-form { display: flex; flex-direction: column; gap: 14px; }

/* Advanced search */
.hf-advanced summary {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: #2563eb;
  cursor: pointer; padding: 4px 0; list-style: none;
}
.hf-advanced summary::-webkit-details-marker { display: none; }
.hf-advanced__fields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* Tabs */
.hf-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.hf-tab {
  padding: 8px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: #64748b;
  border: 1.5px solid transparent; transition: all .15s;
}
.hf-tab:hover { background: #f1f5f9; color: #1e293b; }
.hf-tab--active { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.hf-results__count { margin-left: auto; font-size: 13px; color: #64748b; font-weight: 500; }

/* Cards grid */
.hf-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.hf-card {
  background: #fff; border-radius: 14px; border: 1.5px solid #e2e8f0;
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.hf-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.hf-card__header { display: flex; gap: 14px; padding: 18px 18px 12px; }
.hf-card__avatar {
  width: 48px; height: 48px; border-radius: 12px;
  background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hf-card__avatar--org { background: #f0fdf4; color: #16a34a; }
.hf-card__info { flex: 1; min-width: 0; }
.hf-card__name { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 6px; line-height: 1.3; }
.hf-card__badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.hf-card__spec { font-size: 12px; color: #64748b; font-weight: 500; }
.hf-card__body { padding: 0 18px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hf-card__addr { font-size: 13px; color: #64748b; display: flex; align-items: flex-start; gap: 5px; }
.hf-card__phone { font-size: 13px; color: #2563eb; display: flex; align-items: center; gap: 5px; }
.hf-card__phone:hover { text-decoration: underline; }
.hf-card__npi { font-size: 12px; color: #94a3b8; font-family: monospace; margin-top: auto; }
.hf-card__footer { padding: 12px 18px; border-top: 1px solid #f1f5f9; }

/* Badges */
.hf-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.hf-badge--ind { background: #eff6ff; color: #2563eb; }
.hf-badge--org { background: #f0fdf4; color: #16a34a; }
.hf-badge--active { background: #dcfce7; color: #15803d; }

/* Empty & alerts */
.hf-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px; text-align: center; gap: 12px;
}
.hf-empty__icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: #f1f5f9; color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.hf-empty h3 { font-size: 20px; font-weight: 700; color: #1e293b; }
.hf-empty p { font-size: 14px; color: #64748b; max-width: 360px; }
.hf-alert {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px; border-radius: 12px; margin-bottom: 20px;
}
.hf-alert--error { background: #fef2f2; color: #991b1b; border: 1.5px solid #fecaca; }
.hf-alert strong { display: block; font-weight: 700; margin-bottom: 4px; }
.hf-alert p { font-size: 14px; margin: 0; }

/* Pagination */
.hf-pagination {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 32px; padding-top: 24px; border-top: 1.5px solid #e2e8f0;
}
.hf-pagination__info { font-size: 14px; color: #64748b; font-weight: 500; }

/* ── Detail Page ──────────────────────────────────────────────────────────── */
.hf-detail-page { padding: 32px 24px; }
.hf-detail-layout { max-width: 960px; margin: 0 auto; }
.hf-detail-back { margin-bottom: 20px; }
.hf-detail-card {
  background: #fff; border-radius: 20px; border: 1.5px solid #e2e8f0;
  overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.hf-detail-header {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 32px; background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}
.hf-detail-avatar {
  width: 80px; height: 80px; border-radius: 20px;
  background: rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hf-detail-avatar--org { background: rgba(255,255,255,.15); }
.hf-detail-title h1 { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.hf-detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hf-detail-specialty { font-size: 15px; color: rgba(255,255,255,.8); }
.hf-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.hf-detail-section {
  padding: 28px 32px; border-bottom: 1.5px solid #f1f5f9;
}
.hf-detail-section:nth-child(odd) { border-right: 1.5px solid #f1f5f9; }
.hf-detail-section--full { grid-column: 1 / -1; }
.hf-detail-section h2 { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 16px; }
.hf-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.hf-dl dt { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; align-self: start; padding-top: 2px; }
.hf-dl dd { font-size: 14px; color: #1e293b; }
.hf-dl dd a { color: #2563eb; }
.hf-dl dd a:hover { text-decoration: underline; }
.hf-dl code { background: #f1f5f9; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-family: monospace; }
.hf-tax-list { display: flex; flex-direction: column; gap: 10px; }
.hf-tax-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: #f8fafc; border-radius: 10px;
  border: 1.5px solid #e2e8f0;
}
.hf-tax-item--primary { border-color: #bfdbfe; background: #eff6ff; }
.hf-tax-item strong { font-size: 14px; color: #1e293b; }
.hf-addr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.hf-addr-item {
  padding: 16px; background: #f8fafc; border-radius: 10px;
  border: 1.5px solid #e2e8f0; display: flex; flex-direction: column; gap: 4px;
}
.hf-addr-item strong { font-size: 12px; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: .05em; }
.hf-addr-item p { font-size: 13px; color: #475569; }

/* ── Generic page ─────────────────────────────────────────────────────────── */
.hf-page { padding: 60px 24px; }
.hf-page__inner { max-width: 800px; margin: 0 auto; }
.hf-page__inner h1 { font-size: 32px; font-weight: 800; margin-bottom: 24px; }
.hf-page__content { font-size: 16px; line-height: 1.8; color: #475569; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.hf-footer {
  background: #0f172a; color: rgba(255,255,255,.7);
  padding: 60px 24px 0;
  margin-top: 80px;
}
.hf-footer__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 64px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.hf-footer__brand { max-width: 340px; }
.hf-footer__brand .hf-logo { margin-bottom: 16px; }
.hf-footer__brand .hf-logo span { color: #fff; }
.hf-footer__brand p { font-size: 14px; line-height: 1.7; }
.hf-footer__links { display: flex; gap: 48px; }
.hf-footer__links div { display: flex; flex-direction: column; gap: 10px; }
.hf-footer__links h4 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.hf-footer__links a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .15s; }
.hf-footer__links a:hover { color: #fff; }
.hf-footer__bottom {
  max-width: 1280px; margin: 0 auto;
  padding: 20px 0; font-size: 13px;
}
.hf-footer__bottom a { color: #60a5fa; }
.hf-footer__bottom a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Tablet: stack hero columns, specialties card below text */
  .hf-hero__content { grid-template-columns: 1fr; gap: 32px; padding: 48px 24px; }
  .hf-hero__form-wrap { max-width: 600px; }
  .hf-features__inner { grid-template-columns: 1fr 1fr; }
  .hf-search-layout { grid-template-columns: 260px 1fr; gap: 20px; }
  .hf-spec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hf-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #0d1b2e; flex-direction: column; padding: 16px; border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: 0 4px 16px rgba(0,0,0,.4); }
  .hf-nav.hf-nav--open { display: flex; }
  .hf-nav-toggle { display: flex; }
  .hf-header__cta { display: none; }
  /* Mobile: compact hero, full-width specialties */
  .hf-hero__content { padding: 36px 16px; gap: 28px; }
  .hf-hero__text h1 { font-size: clamp(28px, 7vw, 40px); }
  .hf-hero__text > p { font-size: 15px; }
  .hf-hero__form-wrap { max-width: 100%; }
  .hf-hero__stats { gap: 20px; }
  .hf-features__inner { grid-template-columns: 1fr; }
  .hf-spec-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hf-spec-card { padding: 16px 14px; gap: 12px; }
  .hf-spec-card__icon { width: 52px; height: 52px; min-width: 52px; }
  .hf-spec-card__emoji { font-size: 26px; }
  .hf-spec-card__name { font-size: 13px; }
  .hf-search-layout { grid-template-columns: 1fr; }
  .hf-sidebar { position: static; }
  .hf-cards { grid-template-columns: 1fr; }
  .hf-detail-grid { grid-template-columns: 1fr; }
  .hf-detail-section:nth-child(odd) { border-right: none; }
  .hf-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .hf-footer__links { flex-wrap: wrap; gap: 32px; }
}
