/* KORTEX News MVP — all public rules are isolated under plugin-owned classes. */

.kortex-news-listing,
.kortex-news-social-heading,
.kortex-news-single {
	--kortex-news-ink: #111111;
	--kortex-news-paper: #f4f4f1;
	--kortex-news-muted: #6e6e6a;
	--kortex-news-line: #d7d7d2;
	--kortex-news-red: #ca0607;
	--kortex-news-red-dark: #970000;
	color: var(--kortex-news-ink);
	font-family: Montserrat, Arial, Helvetica, sans-serif;
}

.kortex-news-listing {
	background: var(--kortex-news-paper);
	padding: clamp(4rem, 7vw, 7.5rem) 0;
}

.kortex-news-listing__container,
.kortex-news-social-heading__container,
.kortex-news-single__hero-inner,
.kortex-news-single__cover,
.kortex-news-single__content {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: 1600px;
	padding-inline: 0;
	width: 100%;
}

.kortex-news-section-heading {
	align-items: center;
	display: grid;
	gap: clamp(1rem, 2.4vw, 2.5rem);
	grid-template-columns: auto 1fr;
	margin-bottom: clamp(2rem, 4vw, 4rem);
}

.kortex-news-section-heading__title {
	color: var(--kortex-news-ink);
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	font-size: clamp(28px, 3.2vw, 56px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.02;
	margin: 0;
}

.kortex-news-section-heading__rule {
	background: var(--kortex-news-red);
	display: block;
	height: 0.25rem;
	min-width: 2rem;
}

.kortex-news-grid {
	display: grid;
	column-gap: 8px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	row-gap: 64px;
}

.kortex-news-card {
	background: #ffffff;
	border: 1px solid var(--kortex-news-line);
	min-width: 0;
	position: relative;
}

.kortex-news-card--featured {
	grid-column: auto;
}

.kortex-news-card__link {
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
}

.kortex-news-card__link:focus-visible {
	outline: 4px solid var(--kortex-news-red);
	outline-offset: 4px;
}

.kortex-news-card__media {
	aspect-ratio: 16 / 10;
	background: #1b1b1b;
	margin: 0;
	overflow: hidden;
}

.kortex-news-card--featured .kortex-news-card__media {
	aspect-ratio: 16 / 10;
}

.kortex-news-card__image {
	height: 100%;
	object-fit: cover;
	transition: transform 260ms ease;
	width: 100%;
}

.kortex-news-card__fallback {
	align-items: flex-end;
	background:
		linear-gradient(135deg, transparent 0 57%, rgb(202 6 7 / 95%) 57% 72%, transparent 72%),
		linear-gradient(145deg, #252525, #050505);
	box-sizing: border-box;
	color: #ffffff;
	display: flex;
	font-size: clamp(24px, 4vw, 48px);
	font-weight: 500;
	height: 100%;
	justify-content: flex-start;
	letter-spacing: 0.08em;
	padding: clamp(1rem, 2vw, 2rem);
	width: 100%;
}

.kortex-news-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(1.25rem, 2vw, 2rem);
}

.kortex-news-card__meta,
.kortex-news-single__meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	font-weight: 500;
	gap: 0.65rem 1rem;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.kortex-news-card__category,
.kortex-news-single__category {
	background: var(--kortex-news-red);
	color: #ffffff;
	padding: 6px 10px 5px;
}

.kortex-news-card__date {
	color: var(--kortex-news-muted);
}

.kortex-news-card__title {
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	font-size: clamp(20px, 1.7vw, 32px);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.16;
	margin: 20px 0 0;
	overflow-wrap: anywhere;
}

.kortex-news-card--featured .kortex-news-card__title {
	font-size: clamp(20px, 1.7vw, 32px);
}

.kortex-news-card__excerpt {
	color: #40403d;
	display: -webkit-box;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(16px, 1.2vw, 19px);
	line-height: 1.55;
	margin: 16px 0 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.kortex-news-card__action {
	align-items: center;
	color: var(--kortex-news-red);
	display: flex;
	font-size: 12px;
	font-weight: 500;
	gap: 0.5rem;
	letter-spacing: 0.08em;
	margin-top: auto;
	padding-top: 24px;
	text-transform: uppercase;
}

.kortex-news-card__action span {
	font-size: 19px;
}

.kortex-news-card__link:hover .kortex-news-card__image {
	transform: scale(1.025);
}

.kortex-news-card__link:hover .kortex-news-card__title {
	color: var(--kortex-news-red-dark);
}

.kortex-news-social-heading {
	background: #ffffff;
}

.kortex-news-social-heading__container {
	padding-bottom: 0;
	padding-top: clamp(4rem, 7vw, 7.5rem);
}

.kortex-news-social-heading .kortex-news-section-heading {
	margin-bottom: 0;
}

.kortex-news-single {
	background: #ffffff;
}

.kortex-news-single__hero {
	background: #0b0b0b;
	color: #ffffff;
	padding: clamp(2rem, 4vw, 4rem) 0 clamp(4rem, 7vw, 7.5rem);
}

.kortex-news-single__hero-inner {
	max-width: 1320px;
}

.kortex-news-breadcrumbs {
	font-size: 12px;
	letter-spacing: 0.04em;
	margin-bottom: clamp(3rem, 7vw, 7rem);
}

.kortex-news-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kortex-news-breadcrumbs__list li:not(:last-child)::after {
	color: #8b8b8b;
	content: "/";
	margin-left: 0.55rem;
}

.kortex-news-breadcrumbs__list a {
	color: #ffffff;
	text-underline-offset: 0.25em;
}

.kortex-news-breadcrumbs__list li[aria-current="page"] {
	color: #a9a9a9;
}

.kortex-news-breadcrumbs__list a:focus-visible {
	outline: 3px solid var(--kortex-news-red);
	outline-offset: 3px;
}

.kortex-news-single__meta {
	color: #bdbdbd;
}

.kortex-news-single__title {
	color: #ffffff;
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	font-size: clamp(38px, 6.6vw, 107px);
	font-weight: 400;
	letter-spacing: -0.055em;
	line-height: 0.98;
	margin: clamp(1.25rem, 2.5vw, 2.5rem) 0 0;
	max-width: 13ch;
	overflow-wrap: anywhere;
}

.kortex-news-single__lead {
	color: #d6d6d6;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(18px, 1.8vw, 25px);
	line-height: 1.55;
	margin: clamp(1.5rem, 3vw, 3rem) 0 0;
	max-width: 56rem;
}

.kortex-news-single__cover {
	max-width: 1320px;
	padding-top: clamp(1.5rem, 4vw, 4rem);
}

.kortex-news-single__cover-image {
	aspect-ratio: 16 / 8.5;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.kortex-news-single__content {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(17px, 1.45vw, 21px);
	line-height: 1.72;
	max-width: 1320px;
	padding-bottom: clamp(5rem, 9vw, 9rem);
	padding-top: clamp(3rem, 6vw, 6rem);
}

.kortex-news-single__content > * {
	margin-bottom: 0;
	margin-top: 1.5em;
}

.kortex-news-single__content > :first-child {
	margin-top: 0;
}

.kortex-news-single__content h2,
.kortex-news-single__content h3,
.kortex-news-single__content h4 {
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin-top: 2.2em;
}

.kortex-news-single__content h2 {
	font-size: clamp(30px, 3.5vw, 52px);
}

.kortex-news-single__content h3 {
	font-size: clamp(24px, 2.7vw, 38px);
}

.kortex-news-single__content a {
	color: var(--kortex-news-red-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

.kortex-news-single__content a:focus-visible,
.kortex-news-single__content button:focus-visible {
	outline: 3px solid var(--kortex-news-red);
	outline-offset: 3px;
}

.kortex-news-single__content blockquote {
	border-left: 0.3rem solid var(--kortex-news-red);
	font-size: 1.12em;
	font-style: italic;
	margin-left: 0;
	padding: 0.25rem 0 0.25rem clamp(1.25rem, 3vw, 2.5rem);
}

.kortex-news-single__content img {
	height: auto;
	max-width: 100%;
}

.kortex-news-single__content .wp-block-gallery {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kortex-news-single__content .wp-block-gallery figure,
.kortex-news-single__content .wp-block-image {
	margin-left: 0;
	margin-right: 0;
}

.kortex-news-single__content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.kortex-news-single__content .wp-block-button__link {
	background: var(--kortex-news-red);
	border: 1px solid var(--kortex-news-red);
	border-radius: 0.25rem;
	color: #ffffff;
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 500;
	padding: 0.85rem 1.25rem;
	text-decoration: none;
}

@media (max-width: 1679px) {
	.kortex-news-listing__container,
	.kortex-news-social-heading__container {
		max-width: 1200px;
	}

	.kortex-news-grid {
		row-gap: 48px;
	}
}

@media (max-width: 1279px) {
	.kortex-news-listing__container,
	.kortex-news-social-heading__container,
	.kortex-news-single__hero-inner,
	.kortex-news-single__cover,
	.kortex-news-single__content {
		padding-inline: 32px;
	}

	.kortex-news-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	/*
	 * The legacy KORTEX theme scales the root font size with the viewport
	 * (`html { font-size: 1vw; }`). Keep the plugin legible on phones by using
	 * component-local pixel minima instead of inheriting that root scale.
	 */
	.kortex-news-listing {
		padding: 64px 0;
	}

	.kortex-news-section-heading {
		align-items: start;
		gap: 16px;
		grid-template-columns: 1fr;
		margin-bottom: 32px;
	}

	.kortex-news-section-heading__title {
		font-size: 28px;
	}

	.kortex-news-section-heading__rule {
		height: 4px;
		width: 72px;
	}

	.kortex-news-grid {
		column-gap: 8px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 24px;
	}

	.kortex-news-card--featured {
		grid-column: auto;
	}

	.kortex-news-card--featured .kortex-news-card__media,
	.kortex-news-card__media {
		aspect-ratio: 16 / 10;
	}

	.kortex-news-card__body {
		padding: 20px;
	}

	.kortex-news-card__meta,
	.kortex-news-single__meta {
		font-size: 12px;
		gap: 10px 16px;
	}

	.kortex-news-card__category,
	.kortex-news-single__category {
		padding: 6px 10px 5px;
	}

	.kortex-news-card__title,
	.kortex-news-card--featured .kortex-news-card__title {
		font-size: 24px;
		margin-top: 20px;
	}

	.kortex-news-card__excerpt {
		font-size: 16px;
		margin-top: 16px;
	}

	.kortex-news-card__action {
		font-size: 12px;
		padding-top: 24px;
	}

	.kortex-news-social-heading__container {
		padding-top: 64px;
	}

	.kortex-news-single__hero {
		padding: 32px 0 64px;
	}

	.kortex-news-breadcrumbs {
		font-size: 12px;
		margin-bottom: 48px;
	}

	.kortex-news-single__title {
		font-size: clamp(38px, 12vw, 52px);
		margin-top: 20px;
		max-width: none;
	}

	.kortex-news-single__lead {
		font-size: 18px;
		margin-top: 24px;
	}

	.kortex-news-single__cover {
		padding-top: 24px;
	}

	.kortex-news-single__content {
		font-size: 17px;
		padding-bottom: 80px;
		padding-top: 48px;
	}

	.kortex-news-single__content h2 {
		font-size: 30px;
	}

	.kortex-news-single__content h3 {
		font-size: 24px;
	}

	.kortex-news-single__content blockquote {
		padding-left: 20px;
	}

	.kortex-news-single__content .wp-block-gallery {
		gap: 12px;
		grid-template-columns: minmax(0, 1fr);
	}

	.kortex-news-single__content .wp-block-button__link {
		font-size: 14px;
		padding: 14px 20px;
	}
}

@media (max-width: 575px) {
	.kortex-news-listing__container,
	.kortex-news-social-heading__container,
	.kortex-news-single__hero-inner,
	.kortex-news-single__cover,
	.kortex-news-single__content {
		padding-inline: 12px;
	}

	.kortex-news-grid {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 32px;
	}
}

@media (max-width: 359px) {
	.kortex-news-single__title {
		font-size: 35px;
		hyphens: auto;
		letter-spacing: -0.045em;
		line-height: 1.02;
		overflow-wrap: break-word;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kortex-news-card__image {
		transition: none;
	}
}
