/* News Layout — Latest News card grid */

.news-layout {
	--nl-accent: #1f3a8a;        /* navy accent for links, badge, button */
	--nl-accent-dark: #16285f;
	--nl-text: #1a1a1a;
	--nl-muted: #6b7280;
	--nl-border: #e2e5ea;
	--nl-card-bg: #ffffff;
	--nl-radius: 4px;
	--news-layout-columns: 3;

	max-width: 1140px;
	margin: 0 auto;
	padding: 10px 0 40px;
	box-sizing: border-box;
	color: var(--nl-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* When inside Divi (or any theme), inherit the theme's typography. */
.news-layout.news-layout--inherit-fonts,
.news-layout.news-layout--inherit-fonts .news-layout__heading,
.news-layout.news-layout--inherit-fonts .news-layout__title,
.news-layout.news-layout--inherit-fonts .news-layout__excerpt {
	font-family: inherit;
}

/* Divi places the shortcode inside a constrained module column, so let the
   wrapper fill that column rather than imposing its own max-width there. */
.et_pb_module .news-layout,
.et_pb_text .news-layout,
.et_pb_code .news-layout {
	max-width: 100%;
}

.news-layout *,
.news-layout *::before,
.news-layout *::after {
	box-sizing: border-box;
}

/* Header with title, divider line, and icon */
.news-layout__header {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 28px;
}

.news-layout__heading {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nl-text);
	white-space: nowrap;
}

.news-layout__divider {
	flex: 1 1 auto;
	height: 2px;
	background: var(--nl-accent);
	opacity: 0.85;
}

.news-layout__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--nl-accent);
	flex: 0 0 auto;
}

/* Grid */
.news-layout__grid {
	display: grid;
	grid-template-columns: repeat(var(--news-layout-columns), 1fr);
	gap: 30px 28px;
}

/* Card */
.news-layout__card {
	display: flex;
	flex-direction: column;
	background: var(--nl-card-bg);
	border: 1px solid var(--nl-border);
	border-radius: var(--nl-radius);
	overflow: hidden;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.news-layout__card:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}

/* Thumbnail */
.news-layout__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #d9dde3;
}

.news-layout__thumb-link {
	display: block;
	width: 100%;
	height: 100%;
}

.news-layout__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.news-layout__card:hover .news-layout__img {
	transform: scale(1.04);
}

.news-layout__img--placeholder {
	background: linear-gradient(135deg, #c7cdd6 0%, #aeb6c2 100%);
}

/* Featured badge */
.news-layout__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: var(--nl-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 2px;
}

/* Card body */
.news-layout__body {
	display: flex;
	flex-direction: column;
	padding: 18px 20px 22px;
	flex: 1 1 auto;
}

.news-layout__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nl-muted);
	margin-bottom: 10px;
}

.news-layout__meta-sep {
	color: var(--nl-border);
}

.news-layout__category {
	color: var(--nl-muted);
}

.news-layout__title {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
}

.news-layout__title a {
	color: var(--nl-text);
	text-decoration: none;
}

.news-layout__title a:hover {
	color: var(--nl-accent);
}

.news-layout__excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--nl-muted);
}

.news-layout__readmore {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nl-accent);
	text-decoration: none;
}

.news-layout__readmore:hover {
	color: var(--nl-accent-dark);
}

.news-layout__arrow {
	transition: transform 0.18s ease;
}

.news-layout__readmore:hover .news-layout__arrow {
	transform: translateX(4px);
}

/* Footer button */
.news-layout__footer {
	display: flex;
	justify-content: center;
	margin-top: 38px;
}

.news-layout__view-all {
	display: inline-block;
	padding: 13px 34px;
	border: 1px solid var(--nl-accent);
	border-radius: var(--nl-radius);
	color: var(--nl-accent);
	background: transparent;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.18s ease, color 0.18s ease;
}

.news-layout__view-all:hover {
	background: var(--nl-accent);
	color: #fff;
}

/* Button is also rendered as a <button> for the AJAX load-more. */
button.news-layout__view-all {
	cursor: pointer;
	font-family: inherit;
}

.news-layout__load-more.is-loading {
	opacity: 0.65;
	cursor: progress;
}

/* Fade-in for AJAX-appended cards. */
.news-layout__card--new {
	opacity: 0;
	transform: translateY(12px);
}

.news-layout__card {
	transition: box-shadow 0.18s ease, transform 0.18s ease, opacity 0.3s ease;
}

.news-layout--empty {
	text-align: center;
	color: var(--nl-muted);
	padding: 40px 0;
}

/* Responsive */
@media (max-width: 900px) {
	.news-layout__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.news-layout__grid {
		grid-template-columns: 1fr;
	}

	.news-layout__heading {
		font-size: 18px;
	}
}
