/*
 * News single-post template — enqueued directly (not via an Elementor widget, since
 * this replaces the theme's single.php entirely for News-flagged posts). Follows the
 * same brand tokens as the rest of the plugin: accent green, Montserrat headings,
 * Amiko body text, card/pill language. Deliberately has no author byline or date
 * anywhere, per spec.
 *
 * Layout: full-bleed hero (featured image + gradient, or a hexagon-pattern fallback
 * when no image is set) with a rounded content card overlapping its lower edge — the
 * hero's own height provides generous breathing room below the theme's header instead
 * of the article starting flush under the nav.
 */

.ac-news-single {
	padding-bottom: 80px;
}

/* Hero */

.ac-news-hero {
	position: relative;
	width: 100%;
	height: min( 50vh, 440px );
	min-height: 260px;
	overflow: hidden;
	background: linear-gradient( 135deg, #1c4430, var( --ac-accent, #2e6741 ) );
}

.ac-news-hero-media {
	position: absolute;
	inset: 0;
}

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

.ac-news-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( 180deg, rgba( 0, 0, 0, 0.1 ) 0%, rgba( 0, 0, 0, 0.5 ) 100% );
}

.ac-news-hero-hexbg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.ac-news-hero-hex {
	position: absolute;
	top: var( --ac-hex-top, 10% );
	left: var( --ac-hex-left, 10% );
	width: var( --ac-hex-size, 60px );
	height: calc( var( --ac-hex-size, 60px ) * 1.15 );
	clip-path: polygon( 50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25% );
	background: #fff;
	opacity: var( --ac-hex-opacity, 0.12 );
	animation: ac-news-hex-float var( --ac-hex-duration, 15s ) ease-in-out infinite alternate;
	animation-delay: var( --ac-hex-delay, 0s );
}

@keyframes ac-news-hex-float {
	0% {
		transform: translate( 0, 0 ) rotate( 0deg );
	}
	100% {
		transform: translate( 14px, -18px ) rotate( 6deg );
	}
}

/* Content card */

.ac-news-single-card {
	position: relative;
	max-width: 780px;
	margin: -60px auto 0;
	background: #fff;
	border-radius: 28px 28px 0 0;
	box-shadow: 0 -12px 30px rgba( 0, 0, 0, 0.08 );
	padding: 45px 45px 10px;
	font-family: 'Amiko', sans-serif;
}

.ac-news-single-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.ac-news-category-tag {
	display: inline-block;
	background-color: #e8f0ec;
	color: var( --ac-accent, #2e6741 );
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 5px 14px;
	border-radius: 50px;
	text-decoration: none;
	transition: background-color 0.25s;
}

.ac-news-category-tag:hover {
	background-color: var( --ac-accent, #2e6741 );
	color: #fff;
}

.ac-news-single-title {
	font-family: 'Montserrat', sans-serif;
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: #111;
	margin: 0 0 12px;
}

.ac-news-single-subtitle {
	font-size: 1.15rem;
	line-height: 1.6;
	color: #555;
	margin: 0 0 18px;
}

.ac-news-single-meta {
	margin-bottom: 25px;
}

.ac-news-single-reading-time {
	display: inline-block;
	background-color: #f0f0f0;
	color: #666;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 50px;
}

.ac-news-single-summary {
	background-color: #f7f9fc;
	border-left: 4px solid var( --ac-accent, #2e6741 );
	border-radius: 0 10px 10px 0;
	padding: 20px 25px;
	font-size: 1.1rem;
	line-height: 1.7;
	font-weight: 500;
	color: #333;
	margin-bottom: 35px;
}

.ac-news-single-content {
	font-size: 1.05rem;
	line-height: 1.8;
	color: #333;
}

.ac-news-single-content p {
	margin: 0 0 20px;
}

.ac-news-single-content h2,
.ac-news-single-content h3,
.ac-news-single-content h4 {
	font-family: 'Montserrat', sans-serif;
	font-weight: 800;
	color: #111;
	margin: 35px 0 15px;
}

.ac-news-single-content h2 {
	font-size: 1.5rem;
}

.ac-news-single-content h3 {
	font-size: 1.25rem;
}

.ac-news-single-content ul,
.ac-news-single-content ol {
	margin: 0 0 20px;
	padding-left: 22px;
}

.ac-news-single-content li {
	margin-bottom: 8px;
}

.ac-news-single-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.ac-news-single-content a {
	color: var( --ac-accent, #2e6741 );
}

.ac-news-single-source {
	margin-top: 40px;
	padding-top: 20px;
	padding-bottom: 30px;
	border-top: 1px solid #eee;
	font-size: 0.9rem;
	color: #666;
}

.ac-news-single-source a {
	color: var( --ac-accent, #2e6741 );
}

/* Share row */

.ac-news-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
	padding-top: 25px;
	padding-bottom: 30px;
	border-top: 1px solid #eee;
}

.ac-news-share-label {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 0.85rem;
	color: #666;
	margin-right: 4px;
}

.ac-news-share-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: #f5f7f6;
	color: #555;
	border: none;
	appearance: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.ac-news-share-btn svg {
	width: 17px;
	height: 17px;
}

.ac-news-share-btn:hover,
.ac-news-share-btn:focus {
	background-color: var( --ac-accent, #2e6741 );
	color: #fff;
	transform: translateY( -2px );
}

.ac-news-share-copy::after {
	content: attr( data-copied-label );
	position: absolute;
	bottom: calc( 100% + 8px );
	left: 50%;
	transform: translateX( -50% ) translateY( 4px );
	background: #111;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}

.ac-news-share-copy.ac-news-share-copied::after {
	opacity: 1;
	transform: translateX( -50% ) translateY( 0 );
}

/* Related articles — reuses the News-Liste widget's own .ac-news-card component */

.ac-news-related {
	max-width: 1040px;
	margin: 50px auto 0;
	padding: 0 20px;
}

.ac-news-related-heading {
	font-family: 'Montserrat', sans-serif;
	font-size: 1.4rem;
	font-weight: 800;
	color: #111;
	margin: 0 0 22px;
	text-align: center;
}

@media ( max-width: 780px ) {
	.ac-news-single-card {
		margin: -40px 16px 0;
		padding: 32px 24px 10px;
		border-radius: 22px 22px 0 0;
	}
}

@media ( max-width: 600px ) {
	.ac-news-hero {
		height: min( 38vh, 320px );
	}

	.ac-news-single-title {
		font-size: 1.7rem;
	}
}
