/* ==========================================================================
   Blog Listing Template — Locality
   ========================================================================== */

/* ── Variables ── */
.locality-blog-listing {
	--lbl-navy: #001B54;
	--lbl-lime: #CDFF3F;
	--lbl-cyan: #60E3E8;
	--lbl-light: #DFFDFE;
	--lbl-white: #ffffff;
	--lbl-dark-bg: #000E2B;
	--lbl-card-bg: rgba(255, 255, 255, 0.04);
	--lbl-card-border: rgba(255, 255, 255, 0.08);
	--lbl-text-muted: rgba(223, 253, 254, 0.6);
	--lbl-radius: 30px;
	--lbl-max-width: 1200px;
	--lbl-gutter: 1.5em;
}


/* ── Layout Reset ── */
.locality-blog-listing {
	background-color: var(--lbl-white);
	color: var(--lbl-navy);
	padding-bottom: 4em;
}
.locality-blog-listing *,
.locality-blog-listing *::before,
.locality-blog-listing *::after {
	box-sizing: border-box;
}


/* ── Hero ── */
.lbl-hero {
	padding: 150px var(--lbl-gutter) 2em;
	text-align: left;
	background: #001B54 !important;
}
.lbl-hero__inner {
	max-width: var(--lbl-max-width);
	margin: 0 auto;
}
.lbl-hero__title {
	font-family: 'Midnight Sans ST 24', sans-serif;
	font-size: clamp(36px, 6vw, 60px);
	line-height: 1.05;
	color: #CDFF3F !important;
	margin: 0 0 0.25em;
}
.lbl-hero__subtitle {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: clamp(15px, 2vw, 18px);
	color: var(--lbl-text-muted);
	margin: 0;
	max-width: 560px;
	line-height: 1.5;
}


/* ── Toolbar ── */
.lbl-toolbar {
	padding: 0 var(--lbl-gutter);
	background: var(--lbl-white);
	border-bottom: 1px solid #e2e6ea;
	position: sticky;
	top: 0;
	z-index: 90;
}
.lbl-toolbar__inner {
	max-width: var(--lbl-max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1.5em;
	flex-wrap: wrap;
}


/* ── Topic Bar ── */
.lbl-topics {
	flex: 1 1 auto;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.lbl-topics::-webkit-scrollbar {
	display: none;
}
.lbl-topics__list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
	white-space: nowrap;
}
.lbl-topics__list li {
	padding: 0;
}
.lbl-topics__link {
	display: block;
	padding: 0.9em 1.1em;
	font-family: 'Midnight Sans ST 12', sans-serif;
	font-size: 14px;
	letter-spacing: 0.01em;
	color: #6b7280;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}
.lbl-topics__link:hover {
	color: var(--lbl-navy);
}
.lbl-topics__link.is-active {
	color: var(--lbl-navy);
	border-bottom-color: var(--lbl-navy);
	font-weight: 800;
}

.lbl-topics__more {
	position: relative;
	display: inline-flex;
}
.lbl-topics__more-btn {
	display: block;
	padding: 0.9em 1.1em;
	font-family: 'Midnight Sans ST 12', sans-serif;
	font-size: 14px;
	letter-spacing: 0.01em;
	color: #6b7280;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}
.lbl-topics__more-btn:hover,
.lbl-topics__more-btn[aria-expanded="true"] {
	color: var(--lbl-navy);
}
.lbl-topics__more-btn.is-active {
	color: var(--lbl-navy);
	border-bottom-color: var(--lbl-navy);
	font-weight: 800;
}

.lbl-topics__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	z-index: 95;
	background: var(--lbl-white);
	border: 1px solid #e2e6ea;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 27, 84, 0.14);
	padding: 0.5em;
	min-width: 220px;
	max-height: 21em; /* ~7 items visible, rest scrolls */
	overflow-y: auto;
	flex-direction: column;
	gap: 2px;
}
.lbl-topics__dropdown.is-open {
	display: flex;
}
.lbl-topics__dropdown-link {
	display: block;
	padding: 0.65em 0.8em !important;
	font-size: 14px;
	color: var(--lbl-navy);
	border-bottom: none !important;
	border-radius: 6px;
	white-space: normal;
}
.lbl-topics__dropdown-link:hover {
	background: #f3f4f6;
	color: var(--lbl-navy) !important;
}
.lbl-topics__dropdown-link.is-active {
	background: #eef6ff;
	font-weight: 800;
}


/* ── Search ── */
.lbl-search {
	flex: 0 0 auto;
	padding: 0.5em 0;
}
.lbl-search__form {
	display: flex;
	align-items: center;
	background: var(--lbl-white);
	border: none;
	border-radius: 100px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 27, 84, 0.1);
	transition: box-shadow 0.2s ease;
}
.lbl-search__form:focus-within {
	box-shadow: 0 2px 14px rgba(0, 27, 84, 0.18);
}
/* Form-scoped selector outranks Divi's input[type="text"] defaults (grey border, white box). */
.lbl-search__form .lbl-search__input {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: var(--lbl-navy);
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 15px;
	padding: 0.85em 0 0.85em 1.4em;
	width: 220px;
	outline: none;
}
.lbl-search__input::placeholder {
	color: #6b7280;
}
.lbl-search__btn {
	background: transparent;
	border: none;
	color: var(--lbl-navy);
	padding: 0.6em 1.3em 0.6em 0.8em;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: color 0.2s ease;
}
.lbl-search__btn:hover {
	color: var(--lbl-navy);
	opacity: 0.7;
}


/* ── Results Meta ── */
.lbl-results-meta {
	padding: 0 var(--lbl-gutter);
}
.lbl-results-meta__inner {
	max-width: var(--lbl-max-width);
	margin: 0 auto;
}
.lbl-results-meta__text {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	color: #6b7280;
	padding: 1.2em 0 0;
	margin: 0;
}
.lbl-results-meta__text strong {
	color: var(--lbl-navy);
}
.lbl-results-meta__clear {
	color: var(--lbl-cyan);
	text-decoration: underline;
	margin-left: 0.75em;
	font-size: 13px;
}


/* ── Grid ── */
.lbl-grid-wrap {
	padding: 2em var(--lbl-gutter) 0;
}
.lbl-grid {
	max-width: var(--lbl-max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2em;
}

/* Loading state */
.lbl-grid.is-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s ease;
}


/* ── Article Card ── */
.lbl-card {
	display: flex;
	flex-direction: column;
	background: var(--lbl-white);
	border: 1px solid #e2e6ea;
	border-radius: var(--lbl-radius);
	overflow: hidden;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.lbl-card:hover {
	border-color: var(--lbl-navy);
	box-shadow: 0 4px 20px rgba(0, 27, 84, 0.08);
	transform: translateY(-2px);
}

.lbl-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f3f4f6;
}
.lbl-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.lbl-card:hover .lbl-card__image img {
	transform: scale(1.03);
}

.lbl-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.25em 1.5em 1.5em;
}

.lbl-card__meta {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin-bottom: 0.75em;
	flex-wrap: wrap;
}

.lbl-card__date {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 12px;
	color: #6b7280;
}

.lbl-card__readtime {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 12px;
	color: #6b7280;
}
.lbl-card__readtime::before {
	content: '·';
	margin-right: 0.75em;
}

.lbl-card__title {
	font-family: 'Midnight Sans ST 24', sans-serif;
	font-size: clamp(17px, 2.2vw, 22px);
	line-height: 1.2;
	margin: 0 0 0.6em;
	flex: 1;
}
.lbl-card__title a {
	color: var(--lbl-navy);
	text-decoration: none;
	transition: color 0.2s ease;
}
.lbl-card__title a:hover {
	color: var(--lbl-cyan);
}

.lbl-card__excerpt {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	color: #6b7280;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}


/* ── No Results ── */
.lbl-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 4em 1em;
}
.lbl-no-results p {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 16px;
	color: #6b7280;
}


/* ── Pagination ── */
.lbl-pagination-wrap {
	padding: 2.5em var(--lbl-gutter) 0;
}
.lbl-pagination {
	max-width: var(--lbl-max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.lbl-pagination a,
.lbl-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	font-family: 'Midnight Sans ST 24', sans-serif;
	font-size: 15px;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.2s ease, color 0.2s ease;
}
.lbl-pagination a {
	background: var(--lbl-white);
	border: 1px solid #e2e6ea;
	color: var(--lbl-navy);
}
.lbl-pagination a:hover {
	background: var(--lbl-cyan);
	border-color: var(--lbl-cyan);
	color: var(--lbl-navy);
}
.lbl-pagination span.is-current {
	background: var(--lbl-lime);
	border: 1px solid var(--lbl-lime);
	color: var(--lbl-navy);
}
.lbl-pagination .lbl-pagination__prev,
.lbl-pagination .lbl-pagination__next {
	font-family: 'Neue Helvetica Lt Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 13px;
	letter-spacing: 0.02em;
}


/* ── Responsive ── */
@media (max-width: 768px) {
	.lbl-toolbar__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.lbl-topics {
		order: 2;
		width: 100%;
		border-top: 1px solid var(--lbl-card-border);
	}
	.lbl-search {
		order: 1;
		width: 100%;
		padding: 0.75em 0;
	}
	.lbl-search__form .lbl-search__input {
		width: 100%;
		flex: 1;
	}
	.lbl-grid {
		grid-template-columns: 1fr;
		gap: 1.5em;
	}
	.lbl-hero {
		padding: 6em var(--lbl-gutter) 1.5em; /* clears the site menu bar */
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.lbl-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1025px) {
	.lbl-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}