/**
 * News wire archive (/about-the-dda/news/) — scoped to .dda-news-wire
 *
 * Loaded only when query var dda_news_wire=1 (see dda-news-wire.php).
 */

.dda-news-wire {
	padding: clamp(96px, 11vh, 145px) 0 clamp(72px, 10vh, 100px);
	color: inherit;
}

.dda-news-wire__standard-head {
	margin: 0 0 18px;
}

.dda-news-wire__standard-head .et_pb_title_container {
	margin-bottom: 6px;
}

.dda-news-wire__standard-head .entry-title {
	margin: 0;
}

.dda-news-wire label.dda-news-wire__filter-label,
.dda-news-wire div.dda-news-wire__filter-label {
	display: block;
	text-align: left;
	font-size: 12px;
	font-weight: 700;
	color: #374151;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.045em;
}

.dda-news-wire__sort {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	padding: 4px;
}

.dda-news-wire__sort-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 32px;
	border-radius: 4px;
	color: #4b5563;
	text-decoration: none;
	transition: background-color 140ms ease, color 140ms ease;
}

.dda-news-wire__sort-icon:hover {
	background: #f9fafb;
	color: #111;
}

.dda-news-wire__sort-icon.is-active {
	background: #f3f4f6;
	color: #111;
}

.dda-news-wire__layout-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	padding: 4px;
}

.dda-news-wire__layout-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 32px;
	border-radius: 4px;
	color: #4b5563;
	text-decoration: none;
	transition: background-color 140ms ease, color 140ms ease;
}

.dda-news-wire__layout-icon:hover {
	background: #f9fafb;
	color: #111;
}

.dda-news-wire__layout-icon.is-active {
	background: #f3f4f6;
	color: #111;
}

.dda-news-wire__sort-icon .fa-solid,
.dda-news-wire__layout-icon .fa-solid {
	font-size: 1rem;
}

.dda-news-wire__sr-only {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.dda-news-wire__filter-strip {
	padding: 0 0 1.35rem;
	margin: 0 0 1.75rem;
	border-bottom: 2px solid #cbd5e1;
	box-sizing: border-box;
}

.dda-news-wire__results-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 1.25rem;
}

.dda-news-wire__results-toolbar .dda-news-wire__results-status {
	flex: 1 1 12rem;
	margin: 0;
	min-width: 0;
	max-width: 100%;
}

.dda-news-wire__results-toolbar .dda-news-wire__filter-view {
	margin-left: 0;
	flex: 0 0 auto;
}

.dda-news-wire__results-status {
	margin: 0;
	max-width: 100%;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.01em;
}

@media (min-width: 768px) {
	.dda-news-wire__results-status {
		font-size: 1.1875rem;
	}
}

.dda-news-wire__filters-shell {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
	width: 100%;
}

.dda-news-wire__filters-form {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
	width: 100%;
}

.dda-news-wire__filter-category {
	flex: 0 1 auto;
	min-width: 0;
}

.dda-news-wire__filter-category #dda-news-category {
	min-width: 160px;
	max-width: 18rem;
	width: 100%;
	box-sizing: border-box;
}

.dda-news-wire__filter-search-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	flex: 1 1 14rem;
	min-width: 0;
}

.dda-news-wire__filter-search-row .dda-news-wire__filter-search {
	flex: 1 1 9rem;
	min-width: 0;
	max-width: 16rem;
}

.dda-news-wire__filter-search input[type="search"] {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.dda-news-wire__filter-view {
	flex: 0 0 auto;
	margin-left: auto;
}

.dda-news-wire__filter-view > [role="group"] {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
	text-align: left;
}

.dda-news-wire .dda-news-wire__filter-view div.dda-news-wire__filter-label {
	display: inline-block;
	margin-bottom: 0;
	line-height: 1.2;
	white-space: nowrap;
	vertical-align: middle;
}

@media (max-width: 900px) {
	.dda-news-wire__filter-search-row {
		flex: 1 1 100%;
	}

	/*
	 * Results toolbar on tablet/narrow viewports (desktop-wide only).
	 * View toggle is hidden below 981px; see max-width: 980px rule below.
	 */
	.dda-news-wire__results-toolbar .dda-news-wire__filter-view {
		margin-left: auto;
		width: auto;
		flex: 0 0 auto;
	}
}

/* Mobile: cards (grid) only — hide View toggle; list layout is desktop-only (matches Meetings). */
@media (max-width: 980px) {
	.dda-news-wire__results-toolbar .dda-news-wire__filter-view {
		display: none !important;
	}
}

.dda-news-wire__filter-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	justify-content: flex-end;
	align-items: center;
}

/* Primary Apply: Divi Button module classes + Theme Customizer (same as static CTAs e.g. Plan PDF). */
.dda-news-wire__filter-actions .dda-wire-filter-primary {
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	flex: 0 0 auto;
	white-space: nowrap;
	min-height: 2.5rem;
}

/* Clear All (filter bar): dda-wire-filter-clear-button.css */

.dda-news-wire__pagination {
	margin-top: 1.35rem;
}

.dda-news-wire__pagination .page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.dda-news-wire__pagination ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.dda-news-wire__pagination a.page-numbers,
.dda-news-wire__pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	min-height: 2.25rem;
	padding: 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 4px;
	text-decoration: none;
	color: #392425;
	border: 1px solid #d1d9e0;
	background: #fff;
}

.dda-news-wire__pagination a.page-numbers:hover {
	background: #f3f4f6;
	border-color: #b8c4ce;
}

.dda-news-wire__pagination span.page-numbers.current {
	border-color: #392425;
	background: #f0f3f6;
	color: #1e293b;
	cursor: default;
}

.dda-news-wire__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 12px;
	width: 100%;
}

@media (min-width: 1024px) {
	.dda-news-wire__grid--three:not(.dda-news-wire__grid--list) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* List layout: desktop/tablet wide only (mobile uses grid cards). */
@media (min-width: 981px) {
	.dda-news-wire__grid--list {
		display: flex;
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}
}

/*
 * Cards: match /district/arts/ — et_pb_column panels (#392425, 15px pad, white type).
 */
.dda-news-wire__card {
	padding: 15px;
	min-width: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	background-color: #392425;
	color: #ffffff;
}

@media (min-width: 981px) {
	.dda-news-wire__grid--list .dda-news-wire__card {
		flex-direction: row;
		align-items: stretch;
		gap: 0;
	}
}

.dda-news-wire__media-wrap {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	flex-shrink: 0;
	box-sizing: border-box;
	margin: 0 0 10px;
	padding: 0;
	background: transparent;
}

.dda-news-wire__grid:not(.dda-news-wire__grid--list) .dda-news-wire__media-wrap {
	aspect-ratio: 16 / 10;
}

.dda-news-wire__media-wrap .dda-news-wire__media,
.dda-news-wire__media-wrap img[class*="wp-image-"],
.dda-news-wire__media-wrap img.wp-post-image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center center;
	display: block;
	margin: 0 !important;
	max-width: none !important;
}

@media (min-width: 981px) {
	.dda-news-wire__grid--list .dda-news-wire__media-wrap {
		flex: 0 0 clamp(140px, 36vw, 280px);
		width: clamp(140px, 36vw, 280px);
		max-width: 42%;
		min-width: 120px;
		align-self: stretch;
		min-height: 9.5rem;
		margin: 0 15px 0 0;
		aspect-ratio: auto;
	}
}

/* ?layout=list on mobile: keep grid card thumbnails (list row styles are desktop-only). */
@media (max-width: 980px) {
	.dda-news-wire__grid--list .dda-news-wire__media-wrap {
		flex: none;
		width: 100%;
		max-width: none;
		min-width: 0;
		align-self: auto;
		min-height: 0;
		margin: 0 0 10px;
		aspect-ratio: 16 / 10;
	}
}

.dda-news-wire__media-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.25);
	color: #ffffff;
	margin: 0;
	box-sizing: border-box;
}

.dda-news-wire__media-placeholder .fa-solid {
	font-size: 2rem;
}

.dda-news-wire__card-inner {
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1 1 auto;
	min-height: 0;
}

@media (min-width: 981px) {
	.dda-news-wire__grid--list .dda-news-wire__card-inner {
		padding: 0;
		justify-content: center;
	}
}

.dda-news-wire__meta {
	margin: 0 0 8px;
}

.dda-news-wire__title {
	margin: 0 0 10px !important;
}

.dda-news-wire__title a {
	text-decoration: none;
}

.dda-news-wire__title a:hover,
.dda-news-wire__title a:focus-visible {
	text-decoration: underline;
}

.dda-news-wire__excerpt {
	margin: 0 0 10px;
	font-weight: 600;
	line-height: 1.65;
	flex: 1 1 auto;
}

.dda-news-wire__actions {
	margin-top: auto;
	padding-top: 14px;
	overflow: visible;
}

/*
 * Primary CTAs (card Read more + filter Apply): site filled red — matches Theme Builder buttons.
 */
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card {
	color: #ffffff !important;
	border: 1px solid #ffffff !important;
	border-color: #ffffff !important;
	border-radius: 0 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	font-family: inherit !important;
	letter-spacing: normal !important;
	line-height: 1.25 !important;
	background-color: #892020 !important;
	background-image: none !important;
	box-shadow: none !important;
	transform: none !important;
	filter: none !important;
}

/* Filter Apply only: symmetric padding so hover does not shrink the control. */
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button {
	box-sizing: border-box !important;
	min-height: 2.5rem !important;
	padding: 0.35rem 1.5em !important;
}

.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:hover,
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:focus-visible {
	padding: 0.35rem 1.5em !important;
	min-height: 2.5rem !important;
	font-size: 17px !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
}

/*
 * Card CTA only: full width, centered label, single line.
 * Max length DDA_NEWS_CARD_CTA_MAX_LENGTH (20) — sized for ~300px grid columns + 15px card pad + button pad.
 */
.dda-news-wire__actions .dda-news-wire__card-btn-module.et_pb_button_module_wrapper.et_pb_module {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	text-align: center;
}

.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.5rem 0.5em !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap;
	font-size: 16px !important;
	text-align: center;
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.dda-news-wire__actions .dda-news-wire__card-btn-module .dda-news-wire__btn-text {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 1.25rem;
	text-align: center;
	white-space: nowrap;
	overflow: visible;
	text-overflow: unset;
	line-height: 1.3;
	word-break: keep-all;
	overflow-wrap: normal;
	hyphens: none;
}

.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:hover,
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:focus-visible,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card:hover,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card:focus-visible {
	background-color: #c6312f !important;
	border-color: #ffffff !important;
	color: #ffffff !important;
	transform: none !important;
	filter: none !important;
}

.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card:hover .dda-news-wire__btn-text,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card:focus-visible .dda-news-wire__btn-text {
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 1px !important;
}

.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button::before,
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button::after,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card::before,
.dda-news-wire__actions .dda-news-wire__card-btn-module .et_pb_button.dda-news-wire__btn--card::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: none !important;
	transition: none !important;
}

.dda-news-wire__empty {
	padding: 1rem 0;
	color: #5b6470;
}

/* Filter Apply: keep filled primary on hover (overrides wire-filter freeze underline-only chrome). */
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:hover,
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:focus-visible {
	background-color: #c6312f !important;
	background-image: none !important;
	border-color: #ffffff !important;
	color: #ffffff !important;
	padding: 0.35rem 1.5em !important;
	font-size: 17px !important;
	min-height: 2.5rem !important;
	border-width: 1px !important;
	transform: none !important;
}

.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:hover .et_pb_button_text,
.dda-news-wire__filter-actions .dda-wire-filter-primary.et_pb_button:focus-visible .et_pb_button_text {
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 1px !important;
}
