/**
 * Health Facilities Directory — front-end styles.
 *
 * Everything is scoped under .hfd-* so it can drop into any theme.
 */

/*
 * Colours default to the PPHI Balochistan palette and are overridden at runtime
 * from Settings. Typography is deliberately not set: headings and body text
 * inherit the theme's fonts (Playfair Display / Inter on pphib.org).
 */
/*
 * Declared on :root, not on .hfd-wrap, so that the colours chosen in Settings
 * (injected as a later :root rule) actually win, and so plugin markup rendered
 * outside a .hfd-wrap container still resolves them.
 */
:root {
	--hfd-primary: #066233;
	--hfd-accent: #044d28;
	--hfd-primary-soft: rgba(6, 98, 51, 0.07);
	--hfd-primary-line: rgba(6, 98, 51, 0.2);
	--hfd-ink: #0f172a;
	--hfd-muted: #64748b;
	--hfd-body: #334155;
	--hfd-line: #e3e8ec;
	--hfd-surface: #fff;
	--hfd-bg: #f4f4f4;
	--hfd-danger: #ce2216;
	--hfd-radius: 14px;
	--hfd-shadow: 0 1px 2px rgba(16, 32, 44, 0.05), 0 8px 24px -14px rgba(16, 32, 44, 0.22);
	--hfd-shadow-hover: 0 2px 4px rgba(16, 32, 44, 0.06), 0 18px 38px -18px rgba(16, 32, 44, 0.32);
}

.hfd-wrap,
.hfd-directory,
.hfd-single {
	box-sizing: border-box;
	color: var(--hfd-body);
}

/* Headings keep the theme's darker ink; only the colour is set, so the
   theme's own heading font is inherited. */
.hfd-archive-title,
.hfd-directory-title,
.hfd-hero-title,
.hfd-panel-title,
.hfd-card-title,
.hfd-empty-state h4 {
	color: var(--hfd-ink);
}

.hfd-wrap *,
.hfd-directory *,
.hfd-wrap *::before,
.hfd-directory *::before,
.hfd-wrap *::after,
.hfd-directory *::after {
	box-sizing: border-box;
}

.hfd-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 20px 64px;
}

.hfd-icon {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------- Archive head */

.hfd-archive-header {
	margin-bottom: 28px;
}

.hfd-archive-title {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.hfd-archive-intro {
	max-width: 70ch;
	color: var(--hfd-muted);
	font-size: 1.02rem;
}

.hfd-archive-intro p {
	margin: 0 0 8px;
}

.hfd-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.hfd-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 116px;
	padding: 12px 18px;
	border: 1px solid var(--hfd-line);
	border-radius: 12px;
	background: var(--hfd-surface);
}

.hfd-stat-value {
	color: var(--hfd-primary);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
}

.hfd-stat-label {
	color: var(--hfd-muted);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ------------------------------------------------ Browse actions and tiles */

.hfd-archive-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 20px;
}

.hfd-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 12px;
}

.hfd-tile {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 15px 16px;
	border: 1px solid var(--hfd-line);
	border-radius: 12px;
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
	color: inherit;
	text-decoration: none;
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

a.hfd-tile:hover {
	transform: translateY(-2px);
	border-color: var(--hfd-primary-line);
	box-shadow: var(--hfd-shadow-hover);
}

.hfd-tile-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
}

.hfd-tile-body {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.hfd-tile-name {
	color: var(--hfd-ink);
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.3;
}

a.hfd-tile:hover .hfd-tile-name {
	color: var(--hfd-primary);
}

.hfd-tile-count {
	color: var(--hfd-muted);
	font-size: 0.83rem;
}

.hfd-tile-desc {
	margin-top: 3px;
	color: var(--hfd-muted);
	font-size: 0.8rem;
	line-height: 1.4;
}

.hfd-tile-arrow {
	display: flex;
	margin-left: auto;
	color: var(--hfd-primary-line);
	transition: transform 0.16s ease, color 0.16s ease;
}

a.hfd-tile:hover .hfd-tile-arrow {
	transform: translateX(3px);
	color: var(--hfd-primary);
}

.hfd-group-title .hfd-group-name a {
	color: inherit;
	text-decoration: none;
}

.hfd-group-title .hfd-group-name a:hover {
	text-decoration: underline;
}

.hfd-directory-title {
	margin: 0 0 18px;
	font-size: 1.5rem;
}

/* -------------------------------------------------------------------- Toolbar */

.hfd-toolbar {
	margin-bottom: 26px;
	padding: 16px;
	border: 1px solid var(--hfd-line);
	border-radius: var(--hfd-radius);
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
}

.hfd-regions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--hfd-line);
}

.hfd-region-tab {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--hfd-muted);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.hfd-region-tab:hover {
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
}

.hfd-region-tab.is-active {
	border-color: var(--hfd-primary-line);
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-pill {
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.07);
	font-size: 0.74rem;
	font-weight: 700;
}

.hfd-region-tab.is-active .hfd-pill {
	background: rgba(255, 255, 255, 0.24);
}

.hfd-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.hfd-control {
	position: relative;
	display: flex;
	align-items: center;
}

.hfd-control--search {
	flex: 1 1 260px;
	min-width: 220px;
}

.hfd-search-icon {
	position: absolute;
	left: 12px;
	display: flex;
	color: var(--hfd-muted);
	pointer-events: none;
}

.hfd-search-input,
.hfd-select {
	width: 100%;
	max-width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--hfd-line);
	border-radius: 10px;
	background: var(--hfd-surface);
	color: var(--hfd-ink);
	font: inherit;
	font-size: 0.92rem;
	line-height: 1.35;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.hfd-search-input {
	padding-left: 38px;
}

.hfd-search-input:focus,
.hfd-select:focus {
	border-color: var(--hfd-primary);
	box-shadow: 0 0 0 3px var(--hfd-primary-soft);
	outline: none;
}

.hfd-select {
	min-width: 160px;
	padding-right: 34px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6b76' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.hfd-view-switch {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--hfd-line);
	border-radius: 10px;
	background: var(--hfd-bg);
}

.hfd-view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 32px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--hfd-muted);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.hfd-view-btn:hover {
	color: var(--hfd-primary);
}

.hfd-view-btn.is-active {
	background: var(--hfd-surface);
	box-shadow: 0 1px 3px rgba(16, 32, 44, 0.14);
	color: var(--hfd-primary);
}

.hfd-reset {
	padding: 9px 14px;
	border: 1px dashed var(--hfd-line);
	border-radius: 10px;
	background: transparent;
	color: var(--hfd-muted);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}

.hfd-reset:hover {
	border-color: #d68b8b;
	color: var(--hfd-danger);
}

.hfd-reset.is-hidden {
	display: none;
}

.hfd-letters {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	margin-top: 14px;
	padding-top: 13px;
	border-top: 1px solid var(--hfd-line);
}

.hfd-letter {
	min-width: 27px;
	padding: 4px 6px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--hfd-muted);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
}

.hfd-letter:hover {
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
}

.hfd-letter.is-active {
	background: var(--hfd-primary);
	color: #fff;
}

/* -------------------------------------------------------------------- Results */

.hfd-results {
	position: relative;
	transition: opacity 0.15s;
}

.hfd-results[aria-busy="true"] {
	opacity: 0.45;
}

.hfd-summary-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	align-items: baseline;
	margin-bottom: 16px;
}

.hfd-count,
.hfd-active-search {
	margin: 0;
	color: var(--hfd-muted);
	font-size: 0.92rem;
}

.hfd-count strong {
	color: var(--hfd-ink);
	font-size: 1.05rem;
}

.hfd-active-search {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
	font-weight: 600;
}

.hfd-group {
	margin-bottom: 34px;
}

.hfd-group-title {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	margin: 0 0 14px;
	padding-bottom: 9px;
	border-bottom: 2px solid var(--hfd-primary-line);
	font-size: 1.12rem;
	letter-spacing: -0.01em;
}

.hfd-group-name {
	color: var(--hfd-primary);
	font-weight: 700;
}

.hfd-group-count {
	color: var(--hfd-muted);
	font-size: 0.82rem;
	font-weight: 600;
}

/* ---------------------------------------------------------------------- Cards */

.hfd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px;
}

.hfd-columns-1 .hfd-grid { grid-template-columns: minmax(0, 1fr); }
.hfd-columns-2 .hfd-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.hfd-columns-4 .hfd-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.hfd-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hfd-line);
	border-radius: var(--hfd-radius);
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hfd-card:hover {
	transform: translateY(-3px);
	border-color: var(--hfd-primary-line);
	box-shadow: var(--hfd-shadow-hover);
}

.hfd-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, #eef2f4, #e2e9ec);
}

.hfd-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.hfd-card:hover .hfd-card-media img {
	transform: scale(1.04);
}

.hfd-card-media .hfd-placeholder-img {
	object-fit: contain;
	padding: 22px;
	opacity: 0.55;
}

.hfd-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(20, 33, 43, 0.82);
	color: #fff;
	font-size: 0.71rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.hfd-card-media .hfd-badge {
	position: absolute;
	top: 10px;
	left: 10px;
}

.hfd-card-media .hfd-badge--status {
	top: auto;
	bottom: 10px;
	left: 10px;
	background: var(--hfd-danger);
}

.hfd-badge--type {
	background: var(--hfd-primary);
}

.hfd-badge--code {
	background: rgba(20, 33, 43, 0.08);
	color: var(--hfd-ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0;
	text-transform: none;
}

.hfd-badge--non_functional { background: var(--hfd-danger); }
.hfd-badge--under_construction { background: #b07d20; }
.hfd-badge--closed { background: #5c6b76; }
.hfd-badge--functional { background: #039146; }

.hfd-card-body {
	flex: 1 1 auto;
	padding: 15px 16px 6px;
}

.hfd-card-title {
	margin: 0 0 6px;
	font-size: 1.06rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.hfd-card-title a {
	color: var(--hfd-ink);
	text-decoration: none;
}

.hfd-card-title a:hover {
	color: var(--hfd-primary);
}

/* District + code strip above the photo, as on the VU campus cards. */
.hfd-card-label {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 9px 14px;
	border-bottom: 1px solid var(--hfd-line);
	background: var(--hfd-bg);
}

.hfd-code {
	padding: 2px 7px;
	border: 1px solid var(--hfd-line);
	border-radius: 6px;
	background: var(--hfd-bg);
	color: var(--hfd-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78rem;
	font-weight: 600;
}

.hfd-card-district {
	color: var(--hfd-primary);
	font-size: 0.83rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.hfd-meta {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hfd-meta-item {
	display: flex;
	gap: 8px;
	margin-bottom: 7px;
	color: var(--hfd-muted);
	font-size: 0.875rem;
	line-height: 1.45;
}

.hfd-meta-item .hfd-icon {
	margin-top: 2px;
	color: var(--hfd-primary);
	opacity: 0.8;
}

.hfd-meta-item em {
	color: var(--hfd-muted);
	font-size: 0.82rem;
	font-style: normal;
	opacity: 0.85;
}

.hfd-meta-item a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px dotted var(--hfd-primary-line);
}

.hfd-meta-item a:hover {
	color: var(--hfd-primary);
}

.hfd-card-actions {
	display: flex;
	gap: 8px;
	padding: 12px 16px 16px;
	margin-top: auto;
}

/* -------------------------------------------------------------------- Buttons */

.hfd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 15px;
	border: 1px solid transparent;
	border-radius: 9px;
	font-size: 0.87rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.hfd-btn:active {
	transform: translateY(1px);
}

.hfd-btn--primary {
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-btn--primary:hover {
	background: var(--hfd-accent);
	color: #fff;
}

.hfd-btn--ghost {
	border-color: var(--hfd-line);
	background: var(--hfd-surface);
	color: var(--hfd-muted);
}

.hfd-btn--ghost:hover {
	border-color: var(--hfd-primary-line);
	color: var(--hfd-primary);
}

.hfd-btn--small {
	padding: 6px 11px;
	border-color: var(--hfd-line);
	background: var(--hfd-surface);
	color: var(--hfd-muted);
	font-size: 0.8rem;
}

.hfd-btn--small:hover {
	border-color: var(--hfd-primary-line);
	color: var(--hfd-primary);
}

.hfd-btn--block {
	width: 100%;
	margin-top: 14px;
}

.hfd-text-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--hfd-primary);
	font-size: 0.89rem;
	font-weight: 650;
	text-decoration: none;
}

.hfd-text-link:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------------------- Table */

.hfd-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--hfd-line);
	border-radius: var(--hfd-radius);
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
}

.hfd-table {
	width: 100%;
	min-width: 720px;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.hfd-table th,
.hfd-table td {
	padding: 11px 14px;
	text-align: left;
	border-bottom: 1px solid var(--hfd-line);
	vertical-align: middle;
}

.hfd-table thead th {
	position: sticky;
	top: 0;
	background: var(--hfd-bg);
	color: var(--hfd-muted);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.hfd-table tbody tr:hover {
	background: var(--hfd-primary-soft);
}

.hfd-table tbody tr:last-child td {
	border-bottom: 0;
}

.hfd-col-num {
	width: 48px;
	color: var(--hfd-muted);
	font-variant-numeric: tabular-nums;
}

.hfd-col-name a {
	color: var(--hfd-ink);
	font-weight: 650;
	text-decoration: none;
}

.hfd-col-name a:hover {
	color: var(--hfd-primary);
	text-decoration: underline;
}

.hfd-col-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	color: var(--hfd-muted);
}

.hfd-col-contact a {
	display: block;
	color: var(--hfd-primary);
	text-decoration: none;
	white-space: nowrap;
}

.hfd-col-action {
	width: 96px;
	text-align: right;
}

.hfd-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #fbeaea;
	color: var(--hfd-danger);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
}

.hfd-dash {
	color: #b9c3c9;
}

/* ----------------------------------------------------------------- Pagination */

.hfd-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
	margin-top: 30px;
}

.hfd-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	padding: 8px 12px;
	border: 1px solid var(--hfd-line);
	border-radius: 9px;
	background: var(--hfd-surface);
	color: var(--hfd-muted);
	font-size: 0.88rem;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
}

.hfd-page:hover {
	border-color: var(--hfd-primary-line);
	color: var(--hfd-primary);
}

.hfd-page.is-current {
	border-color: var(--hfd-primary);
	background: var(--hfd-primary);
	color: #fff;
}

.hfd-page--gap {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

/* ---------------------------------------------------------------- Empty state */

.hfd-empty-state {
	padding: 54px 22px;
	border: 1px dashed var(--hfd-line);
	border-radius: var(--hfd-radius);
	background: var(--hfd-surface);
	color: var(--hfd-muted);
	text-align: center;
}

.hfd-empty-state .hfd-icon {
	color: var(--hfd-primary-line);
}

.hfd-empty-state h4 {
	margin: 12px 0 6px;
	color: var(--hfd-ink);
	font-size: 1.15rem;
}

.hfd-empty-state p {
	margin: 0 0 16px;
}

/* -------------------------------------------------------------------- Spinner */

.hfd-spinner {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding: 22px 0;
}

.hfd-spinner[hidden] {
	display: none;
}

.hfd-spinner-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hfd-primary);
	animation: hfd-bounce 1.1s infinite ease-in-out both;
}

.hfd-spinner-dot:nth-child(1) { animation-delay: -0.28s; }
.hfd-spinner-dot:nth-child(2) { animation-delay: -0.14s; }

@keyframes hfd-bounce {
	0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
	40% { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------- Single facility */

.hfd-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	align-items: center;
	margin-bottom: 18px;
	color: var(--hfd-muted);
	font-size: 0.85rem;
}

.hfd-breadcrumb a {
	color: var(--hfd-muted);
	text-decoration: none;
}

.hfd-breadcrumb a:hover {
	color: var(--hfd-primary);
	text-decoration: underline;
}

.hfd-breadcrumb-current {
	color: var(--hfd-ink);
	font-weight: 650;
}

.hfd-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 26px;
	align-items: center;
	margin-bottom: 26px;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--hfd-line);
	border-radius: 18px;
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
}

.hfd-hero-media {
	position: relative;
	aspect-ratio: 16 / 11;
	background: linear-gradient(135deg, #eef2f4, #e2e9ec);
}

.hfd-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hfd-hero-media .hfd-placeholder-img {
	object-fit: contain;
	padding: 40px;
	opacity: 0.5;
}

.hfd-hero-body {
	padding: 26px 30px 26px 4px;
}

.hfd-hero-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 12px;
}

.hfd-hero-title {
	margin: 0 0 10px;
	font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.2rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.hfd-hero-location {
	display: flex;
	gap: 7px;
	align-items: flex-start;
	margin: 0;
	color: var(--hfd-muted);
	font-size: 0.97rem;
}

.hfd-hero-location .hfd-icon {
	margin-top: 3px;
	color: var(--hfd-primary);
}

.hfd-hero-excerpt {
	margin-top: 12px;
	color: var(--hfd-muted);
	font-size: 0.95rem;
}

.hfd-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

.hfd-panel {
	margin-bottom: 22px;
	padding: 20px 22px;
	border: 1px solid var(--hfd-line);
	border-radius: var(--hfd-radius);
	background: var(--hfd-surface);
	box-shadow: var(--hfd-shadow);
}

.hfd-panel-title {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 0 0 14px;
	padding-bottom: 11px;
	border-bottom: 1px solid var(--hfd-line);
	font-size: 1.02rem;
	letter-spacing: -0.01em;
}

.hfd-panel-title .hfd-icon {
	color: var(--hfd-primary);
}

.hfd-specs {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.hfd-specs th,
.hfd-specs td {
	padding: 9px 0;
	text-align: left;
	border-bottom: 1px solid var(--hfd-line);
	vertical-align: top;
}

.hfd-specs tr:last-child th,
.hfd-specs tr:last-child td {
	border-bottom: 0;
}

.hfd-specs th {
	width: 46%;
	padding-right: 14px;
	color: var(--hfd-muted);
	font-weight: 600;
}

.hfd-specs td {
	color: var(--hfd-ink);
	font-weight: 600;
}

.hfd-services {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 7px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.92rem;
}

.hfd-services li {
	position: relative;
	padding-left: 22px;
	color: var(--hfd-muted);
}

.hfd-services li::before {
	content: "";
	position: absolute;
	top: 0.42em;
	left: 4px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hfd-primary);
}

.hfd-contact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hfd-contact-list li {
	display: flex;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--hfd-line);
	color: var(--hfd-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.hfd-contact-list li:last-child {
	border-bottom: 0;
}

.hfd-contact-list .hfd-icon {
	margin-top: 3px;
	color: var(--hfd-primary);
}

.hfd-contact-list strong {
	color: var(--hfd-ink);
}

.hfd-contact-list a {
	color: var(--hfd-primary);
	text-decoration: none;
}

.hfd-contact-list a:hover {
	text-decoration: underline;
}

.hfd-contact-empty {
	margin: 6px 0 0;
	padding: 10px 12px;
	border-radius: 9px;
	background: var(--hfd-bg);
	color: var(--hfd-muted);
	font-size: 0.85rem;
}

.hfd-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
}

.hfd-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	aspect-ratio: 4 / 3;
}

.hfd-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.hfd-gallery-item:hover img {
	transform: scale(1.06);
}

.hfd-documents {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hfd-documents li + li {
	margin-top: 7px;
}

.hfd-documents a {
	display: flex;
	gap: 9px;
	align-items: center;
	padding: 11px 13px;
	border: 1px solid var(--hfd-line);
	border-radius: 10px;
	background: var(--hfd-bg);
	color: var(--hfd-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s, background-color 0.15s;
}

.hfd-documents a:hover {
	border-color: var(--hfd-primary-line);
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
}

.hfd-documents .hfd-icon {
	color: var(--hfd-primary);
}

.hfd-documents em {
	margin-left: auto;
	color: var(--hfd-muted);
	font-size: 0.78rem;
	font-style: normal;
	white-space: nowrap;
}

.hfd-map-embed {
	display: block;
	width: 100%;
	height: 220px;
	border: 0;
	border-radius: 10px;
}

.hfd-coords {
	margin: 9px 0 0;
	color: var(--hfd-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78rem;
	text-align: center;
}

.hfd-related-list {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-size: 0.92rem;
}

.hfd-related-list li + li {
	margin-top: 2px;
}

.hfd-related-list a {
	display: block;
	padding: 7px 9px;
	border-radius: 8px;
	color: var(--hfd-muted);
	text-decoration: none;
}

.hfd-related-list a:hover {
	background: var(--hfd-primary-soft);
	color: var(--hfd-primary);
}

.hfd-content {
	font-size: 0.98rem;
	line-height: 1.65;
}

.hfd-content > :first-child {
	margin-top: 0;
}

.hfd-content > :last-child {
	margin-bottom: 0;
}

.hfd-back {
	margin: 8px 0 0;
}

/* ----------------------------------------------------------------- Responsive */

@media (max-width: 900px) {
	.hfd-hero,
	.hfd-single-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hfd-hero-body {
		padding: 4px 24px 26px;
	}
}

@media (max-width: 600px) {
	.hfd-wrap {
		padding: 22px 15px 48px;
	}

	.hfd-controls > .hfd-control,
	.hfd-controls > .hfd-control--search {
		flex: 1 1 100%;
		min-width: 0;
	}

	.hfd-select {
		width: 100%;
	}

	.hfd-toolbar {
		padding: 13px;
	}

	.hfd-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.hfd-panel {
		padding: 16px;
	}

	.hfd-specs th {
		width: 42%;
	}
}

/* ------------------------------------------------------------------------ RTL */

.rtl .hfd-search-input {
	padding-right: 38px;
	padding-left: 14px;
}

.rtl .hfd-search-icon {
	right: 12px;
	left: auto;
}

.rtl .hfd-select {
	padding-right: 14px;
	padding-left: 34px;
	background-position: left 12px center;
}

.rtl .hfd-table th,
.rtl .hfd-table td,
.rtl .hfd-specs th,
.rtl .hfd-specs td {
	text-align: right;
}

.rtl .hfd-col-action {
	text-align: left;
}

.rtl .hfd-services li {
	padding-right: 22px;
	padding-left: 0;
}

.rtl .hfd-services li::before {
	right: 4px;
	left: auto;
}

/* ----------------------------------------------------------------- Utilities */

.hfd-directory .screen-reader-text,
.hfd-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media print {
	.hfd-toolbar,
	.hfd-pagination,
	.hfd-card-actions,
	.hfd-col-action,
	.hfd-back {
		display: none !important;
	}

	.hfd-card,
	.hfd-panel,
	.hfd-table-wrap {
		box-shadow: none;
		break-inside: avoid;
	}
}
