.page-title-ehs {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.btn-ehs {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 6px 18px rgba(6, 20, 95, .22);
}
.btn-ehs:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.ehs-results-count {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 18px;
  font-size: .9rem;
  color: #4b5563;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}
.ehs-results-count strong {
  color: #111827;
  font-size: 1.12rem;
  font-weight: 800;
}
/* Search-form ads never show on results page (same index.php URL after POST) */
body.ehs-results-page .ehs-search-ads {
  display: none !important;
}
.hospitals-list { display: flex; flex-direction: column; gap: 8px; }
.hospitals-list .ad-wrap { margin: 10px 0 6px; }
.hospital-row {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, border-left-color .2s;
}
.hospital-row:hover {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
  border-left-color: #94a3b8;
}
.hospital-row.is-open {
  border-left-color: var(--primary);
  box-shadow: 0 4px 14px rgba(6, 20, 95, 0.12);
}
.hospital-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.hospital-row-info {
  display: flex;
  gap: 12px;
  flex: 1;
  align-items: flex-start;
  min-width: 0;
}
.hospital-row-info .si-no {
  font-weight: 800;
  color: var(--primary);
  min-width: 1.75rem;
  flex-shrink: 0;
  font-size: .88rem;
  line-height: 1.45;
  padding-top: 1px;
}
.hospital-name-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hospital-row-info .name {
  font-weight: 700;
  color: #111827;
  font-size: .9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hospital-subtitle {
  font-size: .76rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hospital-subtitle i { font-size: .68rem; color: #9ca3af; margin-right: 2px; }
.type-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.type-govt { background: #dbeafe; color: #1e40af; }
.type-corporate { background: #fef3c7; color: #92400e; }
.type-other { background: #f3f4f6; color: #374151; }
.expand-btn {
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}
.expand-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.hospital-details-expanded {
  display: none;
  margin-top: 10px;
  padding: 12px 10px 10px;
  border-top: 1px solid #e0e7ff;
  background: linear-gradient(180deg, #f8faff 0%, #f9fafb 100%);
  border-radius: 0 0 10px 10px;
  animation: expandIn .2s ease-out;
}
@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.hospital-details-expanded.show { display: block; }
.expanded-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.eq-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px 10px;
  max-width: 100%;
  line-height: 1.3;
}
.eq-chip.eq-loc {
  flex: 1 1 100%;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eq-chip.eq-loc i { color: var(--accent); flex-shrink: 0; }
.eq-chip.eq-type { padding: 3px 9px; border: none; }
.expanded-block {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eef2ff;
}
.expanded-block-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary);
  margin-bottom: 6px;
}
.expanded-block-label i { color: var(--accent); margin-right: 3px; }
.expanded-contact-block { margin-bottom: 8px; }
.expanded-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: var(--success);
  font-weight: 700;
  font-size: .78rem;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expanded-phone-pill.is-static {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #374151;
}
.expanded-detail-item {
  margin-bottom: 12px;
  font-size: .86rem;
  line-height: 1.5;
}
.expanded-detail-item strong {
  display: block;
  color: #334155;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: .8rem;
}
.expanded-detail-item strong i { color: var(--primary); margin-right: 4px; }
.spec-compact {
  display: inline-block;
  background: #fff;
  padding: 4px 9px;
  margin: 3px 6px 3px 0;
  border-radius: 6px;
  font-size: .74rem;
  color: #374151;
  border: 1px solid #e5e7eb;
  font-weight: 600;
}
.spec-more-note, .muted-text {
  display: inline-block;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.expanded-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.call-now-btn, .view-full-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .78rem;
  text-align: center;
  text-decoration: none;
  transition: transform .12s;
  min-height: 0;
  line-height: 1.2;
}
.view-full-page-btn.solo { grid-column: 1 / -1; }
.btn-txt-short { display: none; }
.call-now-btn {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: var(--success);
}
.call-now-btn:hover { color: #065f46; background: #d1fae5; }
.view-full-page-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
}
.view-full-page-btn:hover { color: #fff; }
.contact-link { color: var(--success); font-weight: 700; text-decoration: none; }
.contact-link:hover { color: #065f46; text-decoration: underline; }
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-tag {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: .74rem;
  font-weight: 600;
}
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 22px 0 10px;
}
.page-link {
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: #374151;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); background: #f0f4ff; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.alert-info {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: .9rem;
  background: #f9fafb;
  border: 1px solid var(--border);
  color: #374151;
}
.alert-info a { color: var(--primary); font-weight: 700; }
.source-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.55;
}
.source-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--border);
  color: #374151;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
}
.btn-secondary:hover { border-color: #9ca3af; background: #f9fafb; }

/* ── Hospital detail page ── */
body.detail-page {
  background: linear-gradient(165deg, #eef2ff 0%, #f0fdf9 45%, #f4f6f9 100%);
}
.detail-card { padding: 0 0 24px; overflow: hidden; }
.detail-card > .ad-wrap { padding: 0 20px; margin-bottom: 18px; }
.detail-hero {
  background: linear-gradient(135deg, #06145f 0%, #0c2d8a 55%, #1fb5ad 100%);
  color: #fff;
  padding: 28px 22px 24px;
  text-align: center;
  margin: -24px -20px 22px;
  border-radius: 0;
  position: relative;
}
.detail-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24, #1fb5ad, #fbbf24);
}
.detail-hero-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: rgba(255,255,255,.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: blur(4px);
}
.detail-hero-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.detail-hero-location {
  font-size: .84rem;
  opacity: .92;
  margin: 0 0 14px;
  font-weight: 500;
}
.detail-hero-location i { margin-right: 4px; color: #a7f3d0; }
.detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.detail-type-badge { font-size: .72rem; padding: 4px 12px; }
.detail-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
}
.detail-count-contact { background: rgba(16, 185, 129, .25); border-color: rgba(167, 243, 208, .4); }

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 22px;
}
.detail-info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(6, 20, 95, .04);
  transition: transform .15s, box-shadow .15s;
}
.detail-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 20, 95, .08);
}
.dic-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  margin-bottom: 4px;
}
.dic-district { background: #dbeafe; color: #1d4ed8; }
.dic-mandal { background: #fef3c7; color: #b45309; }
.dic-muni { background: #ede9fe; color: #6d28d9; }
.dic-state { background: #d1fae5; color: #047857; }
.dic-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.dic-value {
  font-size: .88rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}

.detail-section {
  padding: 0 20px;
  margin-bottom: 24px;
}
.detail-section-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e7ff;
}
.detail-section-title i { color: var(--accent); }
.detail-spec-count {
  font-size: .75rem;
  background: var(--primary);
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
}
.detail-empty {
  color: var(--muted);
  font-size: .88rem;
  padding: 16px;
  text-align: center;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
  border: 2px solid #a7f3d0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.contact-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(4, 120, 87, .15);
  border-color: #34d399;
}
.contact-card-static {
  background: #f9fafb;
  border-color: var(--border);
}
.contact-card-static:hover { transform: none; box-shadow: none; }
.cc-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--success);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.contact-card-static .cc-icon { background: #94a3b8; }
.cc-text {
  flex: 1;
  font-weight: 700;
  font-size: .9rem;
  color: #065f46;
  line-height: 1.35;
}
.contact-card-static .cc-text { color: #374151; }
.cc-action {
  font-size: .72rem;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}

.detail-spec-tags { gap: 8px; }
.spec-tag-detail {
  padding: 8px 12px;
  font-size: .78rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
}
.spec-tone-0 { background: #dbeafe; color: #1e40af; }
.spec-tone-1 { background: #fef3c7; color: #92400e; }
.spec-tone-2 { background: #d1fae5; color: #065f46; }
.spec-tone-3 { background: #ede9fe; color: #5b21b6; }
.spec-tone-4 { background: #fce7f3; color: #9d174d; }
.spec-tone-5 { background: #ffedd5; color: #c2410c; }

.detail-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px;
  margin-top: 8px;
}
.btn-detail-back, .btn-detail-search {
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn-detail-back {
  background: #fff;
  border: 2px solid var(--border);
  color: #374151;
}
.btn-detail-back:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-detail-search {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 20, 95, .25);
}
.btn-detail-search:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 20, 95, .3);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.detail-item {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.detail-item.wide { grid-column: 1 / -1; }
.detail-item .label {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.detail-item .value {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
@media (max-width: 640px) {
  body { padding: 10px 8px 28px; }
  .card { padding: 18px 12px 16px; }
  .ehs-results-count {
    font-size: .82rem;
    padding: 11px 12px;
    margin-bottom: 14px;
  }
  .ehs-results-count strong { font-size: 1rem; }
  .hospital-row {
    padding: 10px 11px;
    border-radius: 12px;
  }
  .hospital-row-header {
    align-items: flex-start;
    gap: 8px;
  }
  .hospital-row-info .si-no {
    min-width: 1.4rem;
    font-size: .82rem;
  }
  .hospital-row-info .name {
    font-size: .84rem;
    -webkit-line-clamp: 3;
  }
  .type-badge { font-size: .64rem; padding: 2px 7px; }
  .expand-btn {
    font-size: .7rem;
    padding: 5px 9px;
    border-radius: 6px;
    margin-top: 2px;
  }
  .hospital-details-expanded {
    padding: 10px 8px 8px;
    margin-top: 8px;
  }
  .expanded-block { padding: 7px 8px; margin-bottom: 8px; }
  .spec-compact { font-size: .7rem; padding: 3px 7px; margin: 2px 4px 2px 0; }
  .expanded-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 2px;
  }
  .call-now-btn, .view-full-page-btn {
    padding: 8px 6px;
    font-size: .72rem;
    border-radius: 8px;
  }
  .btn-txt-full { display: none; }
  .btn-txt-short { display: inline; }
  .call-now-btn i, .view-full-page-btn i { font-size: .75rem; }
  .detail-info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .detail-hero { margin: -18px -12px 16px; padding: 20px 14px 18px; }
  .detail-hero-title { font-size: .92rem; }
  .detail-section { padding: 0 12px; }
  .detail-info-grid { padding: 0 12px; }
  .detail-card > .ad-wrap { padding: 0 12px; }
  .contact-card { padding: 10px 12px; gap: 10px; }
  .cc-icon { width: 34px; height: 34px; font-size: .9rem; }
  .cc-text { font-size: .82rem; }
  .cc-action { display: none; }
  .detail-footer-actions {
    flex-direction: row;
    padding: 0 12px;
    gap: 8px;
  }
  .btn-detail-back, .btn-detail-search {
    flex: 1;
    width: auto;
    padding: 11px 10px;
    font-size: .8rem;
  }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (min-width: 641px) {
  .btn-txt-short { display: none; }
}
