/* =============================================================================
 * Facilities page
 * Design copied from the prototype (facilities-and-fire-stations.html).
 * ============================================================================= */

.sccfd-facilities {
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 32px 64px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Hidden by the search or a filter. Needed because the cards use display: flex. */
.sccfd-facilities [hidden] {
	display: none !important;
}


/* ----- Filter buttons and search box ----- */

.sccfd-facilities__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid #e1e5ea;
}

.sccfd-facilities__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sccfd-facilities__filter {
	padding: 9px 18px;
	border: 1.5px solid #e1e5ea;
	border-radius: 999px;
	background: #fff;
	color: #5b6472;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.sccfd-facilities__filter:hover {
	border-color: #063a78;
	color: #063a78;
}

/* The chosen filter. */
.sccfd-facilities__filter[aria-pressed="true"] {
	border-color: #063a78;
	background: #063a78;
	color: #fff;
}

.sccfd-facilities__filter:focus-visible {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}

.sccfd-facilities__search {
	position: relative;
	flex: 1;
	min-width: 240px;
	max-width: 340px;
}

.sccfd-facilities__search svg {
	position: absolute;
	top: 50%;
	left: 13px;
	width: 17px;
	height: 17px;
	color: #5b6472;
	transform: translateY(-50%);
	pointer-events: none;
}

.sccfd-facilities__search input {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 14px 10px 38px;
	border: 1.5px solid #e1e5ea;
	border-radius: 999px;
	background: #fff;
	color: #16191f;
	font-family: inherit;
	font-size: 14.5px;
}

.sccfd-facilities__search input:focus {
	border-color: #063a78;
	outline: none;
	box-shadow: 0 0 0 3px rgba(6, 58, 120, 0.12);
}

/* "25 locations" */
.sccfd-facilities__total {
	margin: 0 0 20px;
	color: #5b6472;
	font-size: 13.5px;
}

.sccfd-facilities__total strong {
	color: #16191f;
}


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

.sccfd-facilities__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.sccfd-facilities__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e1e5ea;
	border-radius: 8px;
	background: #fff;
	transition: box-shadow 0.15s, transform 0.15s;
}

.sccfd-facilities__card:hover {
	box-shadow: 0 8px 24px rgba(6, 58, 120, 0.1);
	transform: translateY(-2px);
}

.sccfd-facilities__photo {
	position: relative;
	height: 150px;
	overflow: hidden;
	background: #f7f8fa;
}

.sccfd-facilities__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No photo: a light blue-grey icon in the middle. */
.sccfd-facilities__icon {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 36px;
	color: #b9c6d8;
}

/* "FIRE STATION" (red) or "FACILITY" (navy) on the top left of the photo. */
.sccfd-facilities__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sccfd-facilities__badge.is-station {
	background: #b32b25;
}

.sccfd-facilities__badge.is-facility {
	background: #063a78;
}

.sccfd-facilities__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px;
}

.sccfd-facilities__body h3 {
	margin: 0 0 8px;
	color: #16191f;
	font-size: 16.5px;
	font-weight: 800;
}

.sccfd-facilities__address {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-bottom: 12px;
	color: #5b6472;
	font-size: 13.5px;
	line-height: 1.4;
	text-decoration: none;
}

.sccfd-facilities__address svg {
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	margin-top: 1px;
	color: #063a78;
}

.sccfd-facilities__address:hover {
	color: #063a78;
}

.sccfd-facilities__address:hover span {
	text-decoration: underline;
}

/* Owner, "Built …" and size in small grey boxes. */
.sccfd-facilities__details {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.sccfd-facilities__details span {
	padding: 4px 9px;
	border-radius: 5px;
	background: #f7f8fa;
	color: #5b6472;
	font-size: 11px;
	font-weight: 600;
}

.sccfd-facilities__apparatus {
	margin: 0 0 14px;
	color: #5b6472;
	font-size: 12.5px;
	line-height: 1.5;
}

.sccfd-facilities__apparatus strong {
	color: #16191f;
	font-weight: 700;
}

/* "Get Directions" always sits at the bottom of the card. */
.sccfd-facilities__directions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: #b32b25;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
}

.sccfd-facilities__directions:hover {
	text-decoration: underline;
}

.sccfd-facilities__directions svg {
	width: 15px;
	height: 15px;
}

.sccfd-facilities__address:focus-visible,
.sccfd-facilities__directions:focus-visible {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}


/* ----- "No locations match your search" ----- */

.sccfd-facilities__no-results {
	padding: 60px 20px;
	border: 1.5px dashed #e1e5ea;
	border-radius: 8px;
	color: #5b6472;
	font-size: 15px;
	text-align: center;
}


/* ----- Smaller screens ----- */

@media (max-width: 900px) {
	.sccfd-facilities__grid {
		grid-template-columns: 1fr 1fr;
	}

	.sccfd-facilities__toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.sccfd-facilities__search {
		max-width: none;
	}
}

@media (max-width: 600px) {
	.sccfd-facilities {
		padding: 32px 20px 48px;
	}

	.sccfd-facilities__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sccfd-facilities__card,
	.sccfd-facilities__card:hover {
		transform: none;
		transition: none;
	}
}
