.page-wide { max-width: 920px; }

/* Results page: no duplicate search-form ads */
body.ehs-results-page .ehs-search-ads { display: none !important; }

/* EHS — balanced palette: maroon brand accent + slate cards + green contacts */
/* Only page title uses full maroon gradient (matches payslip) */
.page-title-ehs {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* Search button — maroon CTA */
.btn-ehs {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 6px 18px rgba(127, 15, 20, .22);
}
.btn-ehs:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* Results summary bar */
.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;
}

/* Compact hospital list */
.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);
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff 0%, #fff9f9 100%);
  box-shadow: 0 6px 20px rgba(127, 15, 20, 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: 3px;
}
.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;
}
.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;
  transition: background .15s;
}
.expand-btn:hover { background: linear-gradient(135deg, #1e293b, #334155); }
.expand-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.hospital-details-expanded {
  display: none;
  margin-top: 12px;
  padding: 0 2px 4px;
  border-top: none;
  background: transparent;
  border-radius: 0 0 8px 8px;
}
.hospital-details-expanded.show { display: block; }
.expanded-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.expanded-detail-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.expanded-detail-location { border-left: 4px solid #3b82f6; }
.expanded-detail-specs { border-left: 4px solid #7c3aed; }
.expanded-detail-phone { border-left: 4px solid #059669; }
.expanded-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
}
.expanded-detail-location .expanded-detail-icon {
  background: #eff6ff;
  color: #2563eb;
}
.expanded-detail-specs .expanded-detail-icon {
  background: #f5f3ff;
  color: #7c3aed;
}
.expanded-detail-phone .expanded-detail-icon {
  background: #ecfdf5;
  color: #059669;
}
.expanded-detail-body {
  flex: 1;
  min-width: 0;
}
.expanded-detail-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  margin-bottom: 4px;
}
.expanded-detail-value {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.45;
}
.expanded-specs, .expanded-contacts { margin-top: 2px; }
.spec-compact {
  display: inline-block;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  padding: 4px 10px;
  margin: 3px 6px 3px 0;
  border-radius: 999px;
  font-size: .72rem;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  font-weight: 700;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  color: #047857;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}
.contact-pill:hover {
  color: #065f46;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}
.spec-more-note, .muted-text {
  display: inline-block;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.expanded-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.call-now-btn,
.view-full-page-btn {
  flex: 1 1 140px;
  padding: 11px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .84rem;
  text-align: center;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.call-now-btn {
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  color: var(--success);
}
.call-now-btn:hover {
  color: #065f46;
  background: #d1fae5;
  transform: translateY(-1px);
}
.view-full-page-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}
.view-full-page-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(127, 15, 20, .2);
}

/* Specialization tags — detail page */
.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Phone links — green (easy to spot, not red) */
.contact-link {
  color: var(--success);
  font-weight: 700;
  text-decoration: none;
}
.contact-link:hover {
  color: #065f46;
  text-decoration: underline;
}

/* Pagination — light style, maroon only on active page */
.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;
  transition: all .15s;
}
.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff5f5;
}
.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-link.disabled { opacity: .4; pointer-events: none; }

/* Alerts & notes — neutral, not pink */
.alert-success, .alert-info, .alert-error {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: .9rem;
  line-height: 1.5;
}
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-info { background: #f9fafb; border: 1px solid var(--border); color: #374151; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.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; }
.source-note a:hover { text-decoration: underline; }

.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;
  transition: all .15s;
}
.btn-secondary:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

/* Details page */
.detail-hero {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 55%, #f0fdf4 100%);
  border: 1px solid #fecaca;
  border-left: 5px solid var(--primary);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 18px;
}
.detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}
.detail-badge-ehs {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid #86efac;
}
.detail-badge-loc {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.detail-hero h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.4;
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.detail-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e5e7eb;
}
.detail-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}
.detail-card-icon.info { background: #eff6ff; color: #2563eb; }
.detail-card-icon.phone { background: #ecfdf5; color: #059669; }
.detail-card-icon.spec { background: #f5f3ff; color: #7c3aed; }
.detail-card-head h3 {
  margin: 0;
  font-size: .92rem;
  font-weight: 800;
  color: #111827;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.detail-meta-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid #eef2f7;
}
.detail-meta-item .label {
  font-size: .65rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.detail-meta-item .value {
  font-size: .88rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.35;
}
.detail-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  text-decoration: none;
  color: #047857;
  font-weight: 700;
  font-size: .88rem;
  transition: transform .15s, box-shadow .15s;
}
.detail-contact-card:hover {
  color: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12);
}
.detail-contact-card i { font-size: 1rem; }
.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;
}
.spec-tag {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  color: #4338ca;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .76rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .detail-meta-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .hospital-row-header { gap: 8px; align-items: flex-start; }
  .hospital-row-info .name { font-size: .84rem; -webkit-line-clamp: 3; }
  .expand-btn { font-size: .72rem; padding: 6px 10px; margin-top: 2px; }
  .expanded-actions { flex-direction: column; }
  .call-now-btn, .view-full-page-btn { flex: 1 1 auto; width: 100%; }
}
