/* =====================================================================
   Latest News — page header bar, card grid, sidebar, single post.
   Loaded only on the News listing template, single posts, and post
   archives (see bluegen_marine_child_news_assets() in functions.php).
   ===================================================================== */

/* ---- Shared page header bar (title + breadcrumb, matches About/Contact/etc.) ---- */
.bmg-page-header {
	background: linear-gradient(135deg, var(--blue) 30%, #efefef 100%);
	padding: 8rem 0 2.5rem;
	margin-top: -60px;
}

.bmg-page-header__inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.bmg-page-header__title {
	color: #fff;
	font-weight: 600;
	font-size: 2.75rem;
	margin: 0;
}

.bmg-page-header__crumb {
	font-size: 15px;
	font-weight: 600;
}

.bmg-breadcrumb,
.bmg-breadcrumb span {
	color: var(--navy);
}

.bmg-breadcrumb a {
	color: var(--navy);
}

.bmg-breadcrumb a:hover {
	color: var(--blue);
}

@media (max-width: 767.98px) {
	.bmg-page-header { padding-top: 10.5rem; }
	.bmg-page-header__title { font-size: 2rem; }
	.bmg-page-header__inner { flex-direction: column; align-items: flex-start; }
}

/* ---- Two-column layout: main content + sidebar ---- */
.bmg-news-layout {
	max-width: 1400px;
	margin: 0 auto;
	padding: 3.5rem 2rem 4.5rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 991.98px) {
	.bmg-news-layout { grid-template-columns: 1fr; }
	.bmg-news-sidebar { position: static; }
}

/* ---- Archive term title (e.g. "Category: Latest News"), shown above the grid ---- */
.bmg-news-archive-title {
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--navy);
	margin: 0 0 1.5rem;
}

.bmg-news-archive-title span {
	color: var(--blue);
}

/* ---- News item text styles (date/title/excerpt/more) — shared by list rows ---- */
.bmg-news-card__date {
	display: block;
	color: var(--blue);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.bmg-news-card__title {
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.6rem;
}

.bmg-news-card__title a {
	color: var(--navy);
}

.bmg-news-card__title a:hover {
	color: var(--blue);
}

.bmg-news-card__excerpt {
	color: #4a6377;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.bmg-news-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--blue);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.bmg-news-card__more:hover {
	color: var(--blue-dark);
}

/* ---- News list (single column, image left / text right) — used on archives.
   Flat rows separated by a 1px bottom border; no card box/shadow/hover. ---- */
.bmg-news-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.bmg-news-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	padding: 1.75rem 0;
	border-bottom: 1px solid #e3ecf3;
}

.bmg-news-row:first-child {
	padding-top: 0;
}

.bmg-news-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bmg-news-row__thumb {
	display: block;
	flex: 0 0 280px;
	max-width: 280px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eaf6fd;
	margin-right: 1.85rem;
}

.bmg-news-row__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bmg-news-row__thumb-fallback {
	object-fit: contain !important;
	padding: 2rem;
}

.bmg-news-row__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@media (max-width: 700px) {
	.bmg-news-row {
		flex-direction: column;
	}
	.bmg-news-row__thumb {
		flex-basis: auto;
		max-width: 100%;
		aspect-ratio: 16 / 9;
		margin-right: 0;
		margin-bottom: 1.1rem;
	}
}

/* ---- Pagination ---- */
.bmg-news-pagination {
	margin-top: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.bmg-news-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 0.75rem;
	border: 1px solid #cddbe8;
	border-radius: 8px;
	color: var(--navy);
	font-weight: 600;
	font-size: 0.9rem;
}

.bmg-news-pagination .page-numbers.current {
	background: var(--blue);
	border-color: var(--blue);
	color: #fff;
}

.bmg-news-pagination .page-numbers:not(.current):not(.dots):hover {
	background: #eaf6fd;
	border-color: var(--blue);
}

/* ---- Sidebar ---- */
.bmg-news-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: sticky;
	top: 120px;
	align-self: start;
}

/* Sidebar widget card — matches the homepage "stake-card" component
   (cyan header band + white body, rounded) with no hover motion.
   A 1px light border distinguishes each box instead of a drop shadow. */
.bmg-news-widget {
	background: #eaf3fa;
	border: 1px solid #b7d3e5;
	border-radius: 0.6rem;
	overflow: hidden;
	padding: 1.5rem;
}

.bmg-news-widget__title,
.bmg-news-sidebar .widget-title {
	background: var(--blue-dark);
	color: #fff;
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.25;
	margin: -1.5rem -1.5rem 1.25rem;
	padding: 1.25rem 1.5rem;
	text-transform: none;
	letter-spacing: normal;
}

/* Applies to both our fallback markup and WordPress' own core widget
   output (Recent Posts/Categories render plain <ul><li><a> with no
   special classes) so bullets are removed everywhere inside the widget. */
.bmg-news-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bmg-news-widget li {
	padding: 0.65rem 0;
	border-bottom: 1px solid #d7e6f0;
}

.bmg-news-widget li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bmg-news-widget li a {
	display: block;
	color: var(--navy);
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.4;
	transition: color 0.18s ease;
}

.bmg-news-widget li a:hover {
	color: var(--blue);
}

.bmg-news-widget__list time {
	display: block;
	color: #8aa2b4;
	font-size: 0.78rem;
	margin-top: 0.2rem;
}

.bmg-news-widget__empty {
	color: #8aa2b4;
	font-size: 0.9rem;
}

.bmg-news-sidebar .search-form {
	display: flex;
	gap: 0.5rem;
}

.bmg-news-sidebar .search-form label {
	flex: 1;
	margin: 0;
}

.bmg-news-sidebar .search-form .search-field {
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid #ccd8e2;
	border-radius: 8px;
	font: inherit;
	color: var(--navy);
}

.bmg-news-sidebar .search-form .search-submit {
	background: var(--blue);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 1.1rem;
	font-weight: 700;
	cursor: pointer;
}

.bmg-news-sidebar .search-form .search-submit:hover {
	background: var(--blue-dark);
}

/* ---- Single post ---- */
.bmg-news-single-col { min-width: 0; }

.bmg-news-single__title {
	font-size: 2.1rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--blue);
	margin: 0 0 1.5rem;
}

.bmg-news-single__thumb {
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 1.75rem;
}

.bmg-news-single__thumb img {
	width: 100% !important;
	height: auto !important;
	max-height: none !important;
	object-fit: initial !important;
	display: block;
}

.bmg-news-single__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	color: var(--blue);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.bmg-news-single__cats a { color: var(--blue); }

.bmg-news-single__content {
	color: #33475a;
	font-size: 1.05rem;
	line-height: 1.75;
}

.bmg-news-single__content h2,
.bmg-news-single__content h3 {
	color: var(--navy);
	font-weight: 700;
	margin: 1.75rem 0 0.9rem;
}

.bmg-news-single__content p { margin: 0 0 1.25rem; }

.bmg-news-single__content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.bmg-news-single__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 1.75rem;
	border-top: 1px solid #e3ecf3;
}

.bmg-news-single__back {
	color: var(--blue);
	font-weight: 700;
}

.bmg-news-single__adjacent {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.bmg-news-single__adjacent a {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	max-width: 260px;
}

.bmg-news-single__next {
	text-align: right;
	margin-left: auto;
}

.bmg-news-single__nav-label {
	color: var(--blue);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.bmg-news-single__nav-title {
	color: var(--navy);
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.35;
}

.bmg-news-single__adjacent a:hover .bmg-news-single__nav-title {
	color: var(--blue);
}

/* ---- Empty state ---- */
.bmg-news-main-col .bmg-notice {
	background: #eaf6fd;
	border: 1px solid #cfe8fa;
	border-radius: 12px;
	padding: 2rem;
}
