/*
Theme Name: SHU ColorMag Child
Theme URI: https://shule.local/
Description: SHU news portal customizations for ColorMag Pro.
Author: SHU
Template: colormag-pro
Version: 0.5.0
Text Domain: shule-colormag
*/

:root {
	--shule-yellow: #ffd400;
	--shule-yellow-dark: #e5b900;
	--shule-black: #090909;
	--shule-panel: #141414;
	--shule-border: #323232;
	--shule-muted: #a7a7a7;
	--shule-content-width: 1360px;
}

/* Stable SHU header; avoids the parent Header Builder's separate menu row. */
.shule-site-header {
	position: relative;
	background: var(--shule-black);
	border-bottom: 3px solid var(--shule-yellow);
	color: #fff;
}

.shule-header-inner {
	display: flex;
	width: min(100% - 48px, calc(var(--shule-content-width) - 48px));
	min-height: 114px;
	margin: 0 auto;
	align-items: center;
	justify-content: flex-start;
	gap: 32px;
}

.shule-brand-column {
	display: flex;
	min-width: 150px;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 5px;
}

.shule-header-date {
	color: #bdbdbd;
	font-size: 0.62rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.shule-brand,
.shule-brand:hover {
	flex: 0 0 auto;
	color: var(--shule-yellow) !important;
	font-size: clamp(2.8rem, 4.4vw, 3.9rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.05em;
	text-decoration: none;
	text-transform: uppercase;
}

.shule-brand .custom-logo-link,
.shule-brand .custom-logo {
	display: block;
	max-height: 56px;
	width: auto;
}

.shule-primary-navigation {
	min-width: 0;
	flex: 1 1 auto;
}

.shule-theme-toggle {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	padding: 8px 10px;
	border: 1px solid var(--shule-border);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}

.shule-theme-toggle:hover,
.shule-theme-toggle:focus-visible {
	border-color: var(--shule-yellow);
	color: var(--shule-yellow);
	outline: 3px solid rgba(255, 212, 0, 0.35);
	outline-offset: 2px;
}

/* Keep the client credit centered in every ColorMag footer layout. */
body.shule-news .cm-copyright,
body.shule-news .cm-footer-bottom-row,
body.shule-news .site-info,
body.shule-news .shule-footer {
	text-align: center !important;
}

body.shule-news .cm-footer-builder .cm-footer-bottom-row .cm-container,
body.shule-news .cm-footer-builder .cm-footer-bottom-row .cm-bottom-row,
body.shule-news .cm-footer-builder .cm-footer-bottom-row .cm-footer-col,
body.shule-news .cm-footer-builder .cm-footer-bottom-row .cm-copyright {
	position: relative;
	left: 50%;
	width: 100vw !important;
	max-width: none !important;
	transform: translateX(-50%);
	justify-content: center !important;
	text-align: center !important;
}

.shule-primary-menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.shule-primary-menu li {
	margin: 0;
	padding: 0;
}

.shule-primary-menu a {
	position: relative;
	display: block;
	padding: 30px 10px 24px;
	color: #fff !important;
	font-size: clamp(1rem, 1.35vw, 1.22rem);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.shule-primary-menu .current-menu-item > a,
.shule-primary-menu .current-menu-ancestor > a,
.shule-primary-menu a:hover,
.shule-primary-menu a:focus-visible {
	background: transparent;
	color: var(--shule-yellow) !important;
}

.shule-primary-menu .current-menu-item > a::after,
.shule-primary-menu .current-menu-ancestor > a::after,
.shule-primary-menu a:hover::after,
.shule-primary-menu a:focus-visible::after {
	position: absolute;
	right: 14px;
	bottom: 8px;
	left: 14px;
	height: 4px;
	background: var(--shule-yellow);
	content: "";
}

@media (max-width: 800px) {
	.shule-header-inner {
		width: calc(100% - 32px);
		min-height: 0;
		padding: 20px 0 12px;
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.shule-brand-column {
		gap: 7px;
	}

	.shule-primary-navigation {
		width: 100%;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.shule-theme-toggle {
		margin-left: 0;
	}

	.shule-primary-menu {
		justify-content: flex-start;
		width: max-content;
	}
}

/* Base direction from the client mockup. */
body,
body.shule-news {
	background: var(--shule-black);
	color: #f5f5f5;
}

body a,
body.shule-news a {
	color: inherit;
}

.site,
#page,
body.shule-news .site,
body.shule-news #page {
	background: var(--shule-black);
}

/* Keep the breaking-news strip close to the custom header. */
body.shule-news .cm-content {
	padding-top: 0 !important;
}

body.shule-news .inner-wrap,
body.shule-news .container,
body.shule-news .cm-container {
	max-width: var(--shule-content-width);
}

/* Header and navigation. */
body.shule-news .cm-header,
body.shule-news .header,
body.shule-news .main-header {
	background: var(--shule-black);
	border-bottom: 1px solid var(--shule-border);
}

body.shule-news .main-navigation a,
body.shule-news .cm-primary-nav a,
body.shule-news .menu-item a {
	font-weight: 700;
	letter-spacing: 0.01em;
}

body.shule-news .main-navigation .current-menu-item > a,
body.shule-news .main-navigation a:hover,
body.shule-news .cm-primary-nav a:hover {
	color: var(--shule-yellow);
}

/* Yellow utility accents used throughout the mockup. */
body.shule-news .breaking-news,
body.shule-news .cm-breaking-news,
body.shule-news .widget-title span,
body.shule-news .section-title span {
	background: var(--shule-yellow);
	color: var(--shule-black);
}

body.shule-news .cm-post-content,
body.shule-news .widget,
body.shule-news article {
	border-color: var(--shule-border);
}

body.shule-news .widget-title,
body.shule-news .cm-post-title,
body.shule-news .entry-title {
	color: #fff;
}

body.shule-news .entry-meta,
body.shule-news .byline,
body.shule-news .posted-on {
	color: var(--shule-muted);
}

/* Single articles must keep readable contrast against the SHU dark palette. */
body.shule-news.single-post .entry-title,
body.shule-news.single-post .cm-entry-title,
body.shule-news.single-post .cm-entry-title a,
body.shule-news.single-post .entry-content,
body.shule-news.single-post .entry-content p,
body.shule-news.single-post .entry-content h2,
body.shule-news.single-post .entry-content h3,
body.shule-news.single-post .entry-content li,
body.shule-news.single-post .post-navigation a,
body.shule-news.single-post .comments-title,
body.shule-news.single-post .comment-reply-title {
	color: #f5f5f5 !important;
}

body.shule-news.single-post .cat-links a,
body.shule-news.single-post .entry-categories a {
	background: var(--shule-yellow) !important;
	color: var(--shule-black) !important;
}

body.shule-news.single-post .comment-respond label,
body.shule-news.single-post .comment-notes,
body.shule-news.single-post .comment-form-comment label {
	color: #d6d6d6 !important;
}

/* Featured stories should read as image-led cards with strong contrast. */
body.shule-news .cm-featured-image,
body.shule-news .cm-post-thumb,
body.shule-news .post-thumbnail {
	overflow: hidden;
}

body.shule-news .cm-featured-image img,
body.shule-news .cm-post-thumb img,
body.shule-news .post-thumbnail img {
	transition: transform 180ms ease;
}

body.shule-news article:hover .cm-featured-image img,
body.shule-news article:hover .cm-post-thumb img,
body.shule-news article:hover .post-thumbnail img {
	transform: scale(1.03);
}

/* Buttons and search controls. */
body.shule-news button,
body.shule-news input[type="submit"],
body.shule-news .read-more,
body.shule-news .more-link {
	background: var(--shule-yellow);
	border-color: var(--shule-yellow);
	color: var(--shule-black);
	font-weight: 800;
}

body.shule-news button:hover,
body.shule-news input[type="submit"]:hover,
body.shule-news .read-more:hover,
body.shule-news .more-link:hover {
	background: var(--shule-yellow-dark);
	border-color: var(--shule-yellow-dark);
}

/* Preserve keyboard visibility against the dark palette. */
body.shule-news a:focus-visible,
body.shule-news button:focus-visible,
body.shule-news input:focus-visible,
body.shule-news select:focus-visible,
body.shule-news textarea:focus-visible {
	outline: 3px solid var(--shule-yellow);
	outline-offset: 3px;
}

@media (max-width: 767px) {
	body.shule-news .inner-wrap,
	body.shule-news .container,
	body.shule-news .cm-container {
		width: calc(100% - 32px);
	}

	body.shule-news .main-navigation a,
	body.shule-news .cm-primary-nav a {
		padding-top: 12px;
		padding-bottom: 12px;
	}
}

/* SHU homepage layout. */
.shule-home {
	max-width: var(--shule-content-width);
	margin: 0 auto;
	padding: 12px 24px 64px;
}

/* Desktop mockup: branding and primary navigation share one header row. */
@media (min-width: 600px) {
	.cm-header-builder {
		position: relative;
	}

	.cm-header-builder .cm-header-main-row {
		min-height: 86px;
		padding: 12px 24px !important;
	}

	.cm-header-builder .cm-header-main-row .cm-container {
		max-width: none;
		padding: 0;
	}

	.cm-header-builder .cm-header-main-row .cm-main-row {
		min-height: 62px;
		display: flex !important;
		align-items: center;
		justify-content: flex-start;
	}

	.cm-header-builder .cm-header-main-row .cm-header-left-col {
		flex: 0 0 auto;
	}

	.cm-header-builder .cm-header-bottom-row {
		position: absolute;
		top: 50%;
		right: 24px;
		left: 220px;
		z-index: 5;
		width: auto;
		transform: translateY(-50%);
		padding: 0 !important;
		background: transparent !important;
		border: 0 !important;
	}

	.cm-header-builder .cm-header-bottom-row .cm-container {
		max-width: none;
		padding: 0;
	}

	.cm-header-builder .cm-header-bottom-row .cm-bottom-row {
		display: flex;
		min-height: 0;
		align-items: center;
		justify-content: flex-end;
	}

	.cm-header-builder .cm-header-bottom-row #cm-primary-nav {
		width: auto;
		background: transparent;
		border: 0 !important;
	}

	.cm-header-builder .cm-header-bottom-row #cm-primary-nav ul {
		display: flex !important;
		flex-wrap: nowrap;
		width: max-content;
		max-width: none;
		margin-left: auto;
		justify-content: flex-end;
		white-space: nowrap;
	}

	.cm-header-builder .cm-header-bottom-row #cm-primary-nav li {
		padding: 10px 9px;
	}

	.cm-header-builder .cm-header-bottom-row #cm-primary-nav a {
		font-size: 12px;
		white-space: nowrap;
	}

	.cm-header-builder .cm-header-top-row {
		display: none;
	}

	#cm-masthead {
		display: grid;
		grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr);
		align-items: stretch;
	}

	#cm-header-1,
	#cm-header-2 {
		min-width: 0;
		align-self: stretch;
	}

	#cm-header-1 .cm-container,
	#cm-header-2 .cm-container {
		width: auto;
		max-width: none;
		padding-right: 16px;
		padding-left: 16px;
	}

	#cm-header-1 .cm-row {
		height: 100%;
		justify-content: flex-start;
		padding: 12px 0;
	}

	#cm-header-1 .cm-header-col-1 {
		flex-basis: auto;
	}

	#cm-header-1 .cm-header-col-2 {
		display: none;
	}

	#cm-header-2 #cm-primary-nav {
		height: 100%;
		border-top: 0 !important;
		border-bottom: 3px solid var(--shule-yellow) !important;
	}

	#cm-header-2 #cm-primary-nav .cm-row {
		height: 100%;
		justify-content: flex-start;
	}

	#cm-header-2 .cm-primary-nav {
		width: auto;
		text-align: left;
	}

	#cm-header-2 .cm-primary-nav ul {
		display: flex !important;
		flex-wrap: nowrap;
		align-items: center;
	}

	/* ColorMag Pro Header Builder layout. */
	.cm-header-builder .cm-desktop-row.cm-main-header .cm-main-row {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		align-items: center;
		gap: 24px;
	}

	.cm-header-builder .cm-desktop-row.cm-main-header .cm-header-left-col {
		min-width: max-content;
	}

	.cm-header-builder .cm-desktop-row.cm-main-header .cm-header-right-col {
		min-width: 0;
	}

	.cm-header-builder .cm-desktop-row.cm-main-header #cm-primary-nav {
		width: 100%;
		border: 0 !important;
		background: transparent;
	}

	.cm-header-builder .cm-desktop-row.cm-main-header #cm-primary-nav ul {
		justify-content: flex-end;
	}

	.cm-header-builder .cm-desktop-row.cm-main-header #cm-primary-nav li {
		padding-right: 10px;
		padding-left: 10px;
	}
}

@media (max-width: 599px) {
	#cm-masthead {
		display: block;
	}

	#cm-header-2 #cm-primary-nav {
		border-top: 0 !important;
		border-bottom: 3px solid var(--shule-yellow) !important;
	}
}

.shule-home a {
	text-decoration: none;
}

.shule-breaking {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 42px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--shule-border);
	font-size: 0.9rem;
}

.shule-breaking__label,
.shule-hero-card .cat-links a,
.shule-secondary-card .cat-links a,
.shule-news-card .cat-links a {
	display: inline-block;
	background: var(--shule-yellow);
	color: var(--shule-black);
	font-size: 0.7rem;
	font-weight: 800;
	line-height: 1;
	padding: 8px 10px;
	text-transform: uppercase;
}

.shule-breaking__link {
	overflow: hidden;
	color: #dedede;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shule-home__top-grid {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(270px, 0.8fr);
	gap: 28px;
}

.shule-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr);
	gap: 14px;
}

.shule-hero-card,
.shule-secondary-card,
.shule-news-card,
.shule-video-card {
	min-width: 0;
	border: 1px solid var(--shule-border);
	background: var(--shule-panel);
}

.shule-hero-card {
	position: relative;
	min-height: 430px;
	grid-row: span 2;
	overflow: hidden;
}

.shule-card-image {
	display: block;
	position: relative;
	overflow: hidden;
	background: #242424;
}

.shule-hero-card > .shule-card-image,
.shule-hero-card > .shule-card-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.shule-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 180ms ease;
}

.shule-card-image:hover img {
	transform: scale(1.04);
}

.shule-card-image__placeholder {
	display: block;
	min-height: 160px;
	background: linear-gradient(135deg, #343434, #111);
}

.shule-hero-card__overlay {
	display: flex;
	position: absolute;
	inset: 0;
	flex-direction: column;
	justify-content: flex-end;
	padding: 28px;
	background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.92) 100%);
}

.shule-hero-card__overlay h2 {
	max-width: 680px;
	margin: 12px 0 8px;
	color: #fff !important;
	font-size: clamp(1.7rem, 3vw, 2.8rem);
	line-height: 1.04;
}

.shule-hero-card__overlay p {
	max-width: 620px;
	margin: 0 0 10px;
	color: #ddd;
}

.shule-featured__secondary {
	display: grid;
	align-content: start;
	gap: 14px;
}

.shule-secondary-card {
	display: grid;
	grid-template-columns: 42% 1fr;
	min-height: 130px;
}

.shule-secondary-card .shule-card-image,
.shule-secondary-card .shule-card-image img {
	min-height: 100%;
}

.shule-secondary-card__body,
.shule-news-card__body {
	padding: 14px;
}

.shule-secondary-card h2,
.shule-news-card h3,
.shule-video-card h3 {
	margin: 9px 0;
	color: #fff;
	font-size: 1rem;
	line-height: 1.25;
}

.shule-hero-card__overlay > a,
.shule-secondary-card__body > a,
.shule-news-card__body > a {
	display: inline-block;
	width: fit-content;
	background: var(--shule-yellow);
	color: var(--shule-black) !important;
	font-size: 0.7rem;
	font-weight: 800;
	line-height: 1;
	padding: 8px 10px;
	text-transform: uppercase;
}

.shule-sidebar {
	min-width: 0;
}

.shule-section-heading {
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--shule-yellow);
	font-size: 1.15rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.shule-most-read {
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
}

.shule-most-read li {
	display: grid;
	grid-template-columns: 72px 28px 1fr;
	gap: 10px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--shule-border);
	font-size: 0.92rem;
	font-weight: 700;
}

.shule-most-read__image {
	display: block;
	height: 52px;
	overflow: hidden;
	background: #242424;
}

.shule-most-read__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shule-most-read__number {
	color: var(--shule-yellow);
	font-size: 1.55rem;
	font-weight: 900;
}

.shule-empty-state {
	padding: 16px;
	border: 1px solid var(--shule-border);
	color: var(--shule-muted);
}

.shule-subscribe-card {
	padding: 24px;
	border: 1px solid var(--shule-yellow-dark);
	background: linear-gradient(135deg, #262100, #131313);
}

.shule-subscribe-card__eyebrow {
	color: var(--shule-yellow);
	font-weight: 900;
	letter-spacing: 0.18em;
}

.shule-subscribe-card h2 {
	margin: 12px 0 8px;
	font-size: 1.35rem;
}

.shule-subscribe-card p {
	color: #ccc;
}

.shule-button {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 16px;
	background: var(--shule-yellow);
	color: var(--shule-black) !important;
	font-weight: 800;
}

.shule-promo-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 20px 0 28px;
	padding: 12px 24px;
	background: var(--shule-yellow);
	color: var(--shule-black);
	font-size: 0.95rem;
}

.shule-section {
	margin-top: 28px;
}

.shule-card-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.shule-news-card .shule-card-image,
.shule-video-card .shule-card-image {
	aspect-ratio: 16 / 9;
}

.shule-post-meta {
	color: var(--shule-muted);
	font-size: 0.75rem;
}

.shule-video-card {
	position: relative;
}

.shule-video-card__play {
	display: grid;
	position: absolute;
	left: 10px;
	bottom: 10px;
	width: 30px;
	height: 30px;
	place-items: center;
	border-radius: 50%;
	background: var(--shule-yellow);
	color: var(--shule-black);
	font-size: 0.75rem;
}

@media (max-width: 1100px) {
	.shule-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.shule-home {
		padding: 16px 16px 40px;
	}

	.shule-breaking {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
		padding-bottom: 10px;
	}

	.shule-featured,
	.shule-home__top-grid,
	.shule-sidebar {
		display: block;
	}

	.shule-hero-card {
		min-height: 360px;
	}

	.shule-featured__secondary {
		margin-top: 14px;
	}

	.shule-secondary-card {
		grid-template-columns: 38% 1fr;
	}

	.shule-subscribe-card {
		margin-top: 24px;
	}

	.shule-promo-strip {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
		padding: 14px 16px;
	}

	.shule-card-grid,
	.shule-card-grid--five {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	.shule-card-grid,
	.shule-card-grid--five {
		grid-template-columns: 1fr;
	}
}
