/**
 * Featured Posts Section Styles
 *
 * Styles for the main content + sidebar section below hero.
 * Left: horizontal post list | Right: spotlight + ads + social
 *
 * @package Blanco_Lite
 */

/* ===============================================
   Section Layout (70% / 30%)
   =============================================== */

.nf-main-section {
	padding: 30px 0;
}

.nf-main-section__grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 30px;
	align-items: stretch;
}

.nf-main-section__content {
	/* Left column - Featured posts */
}

.nf-main-section__sidebar {
	/* Right column - Widgets */
	display: flex;
	flex-direction: column;
	gap: 25px;
}

/* ===============================================
   Featured Posts List (Left Column)
   =============================================== */

.nf-featured-list {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.nf-featured-item {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 20px;
	background: var(--nf-surface-secondary);
	border-radius: 6px;
	overflow: hidden;
}

/* Image Area */
.nf-featured-item__image-wrap {
	position: relative;
	min-height: 200px;
}

.nf-featured-item__image-link {
	display: block;
	position: absolute;
	inset: 0;
}

.nf-featured-item__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.4s ease;
}

.nf-featured-item__image-link:hover .nf-featured-item__image {
	transform: scale(1.05);
}

.nf-featured-item__image--placeholder {
	background: linear-gradient(135deg, var(--nf-surface-secondary) 0%, var(--nf-surface-elevated) 100%);
}

/* Video Icon */
.nf-featured-item__video-icon {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	color: var(--nf-text-primary);
}

/* Category Badges */
.nf-featured-item__categories {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.nf-featured-item__cat-badge {
	display: inline-block;
	padding: 4px 10px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 2px;
}

/* Content Area */
.nf-featured-item__content {
	padding: 20px 20px 20px 0;
	display: flex;
	flex-direction: column;
}

.nf-featured-item__title {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.nf-featured-item__title a {
	color: var(--nf-text-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.nf-featured-item__title a:hover {
	color: var(--nf-accent-primary);
}

/* Meta */
.nf-featured-item__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

.nf-featured-item__writer {
	display: inline-block;
	padding: 4px 10px;
	background: var(--writer-color, var(--nf-accent-primary));
	color: var(--nf-text-primary);
	font-size: 11px;
	font-weight: 600;
	border-radius: 3px;
	white-space: nowrap;
}

.nf-featured-item__date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--nf-text-muted);
}

.nf-featured-item__date svg {
	opacity: 0.7;
}

/* Excerpt */
.nf-featured-item__excerpt {
	margin: 0 0 16px 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--nf-text-secondary);
	flex-grow: 1;
}

/* Read More Button */
.nf-featured-item__read-more {
	display: inline-block;
	align-self: flex-start;
	padding: 8px 20px;
	background: transparent;
	border: 1px solid var(--nf-border-primary);
	color: var(--nf-text-primary);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.nf-featured-item__read-more:hover {
	background: var(--nf-accent-primary);
	border-color: var(--nf-accent-primary);
	color: var(--nf-text-primary);
}

/* ===============================================
   Sidebar - Writer Spotlight
   =============================================== */

.nf-spotlight {
	background: var(--nf-surface-secondary);
	border-radius: 6px;
	overflow: hidden;
}

.nf-spotlight__header {
	background: var(--spotlight-accent, var(--nf-accent-primary));
	padding: 0;
	position: relative;
	transition: background 0.5s ease;
}

.nf-spotlight__label {
	display: inline-block;
	padding: 10px 16px;
	background: transparent;
	color: var(--nf-text-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.nf-spotlight__progress {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: rgba(0, 0, 0, 0.2);
}

.nf-spotlight__progress-bar {
	height: 100%;
	width: 0;
	background: rgba(255, 255, 255, 0.5);
	animation: spotlight-progress 8s linear infinite;
}

@keyframes spotlight-progress {
	from { width: 0; }
	to { width: 100%; }
}

.nf-spotlight--transitioning .nf-spotlight__progress-bar {
	animation: none;
	width: 0;
}

.nf-spotlight__content {
	padding: 30px 20px;
	text-align: center;
}

/* Avatar ring container */
.nf-spotlight__avatar-ring {
	position: relative;
	width: 140px;
	height: 140px;
	margin: 0 auto 20px;
}

.nf-spotlight__ring-svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.nf-spotlight__ring-bg {
	fill: none;
	stroke: var(--nf-surface-elevated);
	stroke-width: 4;
}

.nf-spotlight__ring-progress {
	fill: none;
	stroke: var(--spotlight-accent, var(--nf-accent-primary));
	stroke-width: 4;
	stroke-linecap: round;
	transition: stroke 0.5s ease;
}

.nf-spotlight__avatar-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 120px;
	height: 120px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--nf-surface-elevated);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.nf-spotlight--transitioning .nf-spotlight__avatar-wrap {
	transform: translate(-50%, -50%) scale(0.9);
	opacity: 0;
}

.nf-spotlight__avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.nf-spotlight__avatar--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--nf-surface-elevated);
	border-radius: 50%;
	color: var(--nf-text-muted);
}

.nf-spotlight__name {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--nf-text-primary);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.nf-spotlight--transitioning .nf-spotlight__name {
	opacity: 0;
	transform: translateY(-10px);
}

.nf-spotlight__bio {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--nf-text-secondary);
	transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}

.nf-spotlight--transitioning .nf-spotlight__bio {
	opacity: 0;
	transform: translateY(-10px);
}

.nf-spotlight__read-more {
	display: inline-block;
	margin-bottom: 20px;
	font-size: 13px;
	color: var(--nf-text-secondary);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.nf-spotlight--transitioning .nf-spotlight__read-more {
	opacity: 0;
	transform: translateY(-10px);
}

.nf-spotlight__read-more:hover {
	color: var(--spotlight-accent, var(--nf-accent-primary));
}

.nf-spotlight__socials {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.nf-spotlight__social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--nf-surface-elevated);
	color: var(--nf-text-secondary);
	border-radius: 4px;
	font-size: 14px;
	transition: all 0.2s ease, opacity 0.3s ease, transform 0.3s ease;
}

.nf-spotlight__social-icon:nth-child(1) { transition-delay: 0.15s; }
.nf-spotlight__social-icon:nth-child(2) { transition-delay: 0.2s; }
.nf-spotlight__social-icon:nth-child(3) { transition-delay: 0.25s; }

.nf-spotlight--transitioning .nf-spotlight__social-icon {
	opacity: 0;
	transform: translateY(10px);
	transition-delay: 0s;
}

.nf-spotlight__social-icon:hover {
	background: var(--spotlight-accent, var(--nf-accent-primary));
	color: var(--nf-text-primary);
}

/* ===============================================
   Sidebar - Advertisement Placeholder
   =============================================== */

.nf-sidebar-ad {
	text-align: center;
}

.nf-sidebar-ad__img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.nf-sidebar-ad__video {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	background: #05070d;
	display: block;
}

.nf-sidebar-ad__img.is-hidden,
.nf-sidebar-ad__video.is-hidden {
	display: none !important;
}

/* Stretch variant - fills remaining sidebar space */
.nf-sidebar-ad--stretch {
	flex: 0 0 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.nf-sidebar-ad--stretch a {
	flex: 0 0 auto;
	display: block;
}

.nf-sidebar-ad--stretch .nf-sidebar-ad__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nf-sidebar-ad--stretch .nf-sidebar-ad__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Spot variant - Ad with title and text */
.nf-sidebar-ad--spot {
	background: var(--nf-surface-secondary);
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--nf-border-primary);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nf-sidebar-ad--spot:hover {
	border-color: var(--nf-accent-primary);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nf-sidebar-ad--spot .nf-sidebar-ad__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.nf-sidebar-ad--spot .nf-sidebar-ad__img {
	width: 100%;
	border-radius: 0;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.nf-sidebar-ad--spot .nf-sidebar-ad__video {
	width: 100%;
	border-radius: 0;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.nf-sidebar-ad__content {
	padding: 14px 16px;
	text-align: left;
	background: var(--nf-surface-elevated);
}

.nf-sidebar-ad--product .nf-sidebar-ad__content {
	padding: 12px 12px 13px;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--nf-surface-elevated) 92%, var(--nf-surface-primary)),
		color-mix(in srgb, var(--nf-surface-secondary) 94%, var(--nf-surface-primary))
	);
	border-top: 1px solid color-mix(in srgb, var(--nf-border-primary) 78%, transparent);
}

.nf-sidebar-ad__title {
	margin: 0 0 6px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--nf-text-primary);
	line-height: 1.3;
}

.nf-sidebar-ad--product .nf-sidebar-ad__title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 7px;
	color: var(--nf-text-primary);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nf-sidebar-ad--product .nf-sidebar-ad__price {
	font-size: 22px;
	font-weight: 800;
	color: #00d084;
	line-height: 1;
	margin: 0;
}

.nf-sidebar-ad__text {
	margin: 0;
	font-size: 13px;
	color: var(--nf-text-secondary);
	line-height: 1.5;
}

.nf-sidebar-ad--product .nf-sidebar-ad__text {
	font-size: 13px;
	line-height: 1.4;
	color: var(--nf-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nf-sidebar-ad--image-only .nf-sidebar-ad__image-wrap {
	aspect-ratio: auto;
}

.nf-sidebar-ad--image-only .nf-sidebar-ad__img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.nf-sidebar-ad--image-only .nf-sidebar-ad__video {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* ===============================================
   Sidebar - Social Links Grid
   =============================================== */

.nf-social-widget {
	background: var(--nf-surface-secondary);
	border-radius: 6px;
	overflow: hidden;
}

.nf-social-widget__header {
	background: var(--nf-accent-primary);
	padding: 0;
}

.nf-social-widget__label {
	display: inline-block;
	padding: 10px 16px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.nf-social-widget__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--nf-border-primary);
}

.nf-social-widget__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 10px;
	aspect-ratio: 1 / 1;
	max-height: 126px;
	min-height: 0;
	background: var(--social-color, var(--nf-surface-elevated));
	color: var(--nf-text-primary);
	text-decoration: none;
	font-size: 20px;
	transition: all 0.2s ease;
}

.nf-social-widget__item:hover {
	filter: brightness(1.1);
	transform: translateY(-2px);
}

.nf-social-widget__name {
	font-size: 11px;
	font-weight: 600;
	text-align: center;
}

.nf-sidebar-ad__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 10px;
	border: 1px solid var(--nf-accent-primary);
	background: color-mix(in srgb, var(--nf-accent-primary) 16%, transparent);
	color: var(--nf-text-primary);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.nf-sidebar-ad__cta:hover {
	background: var(--nf-accent-primary);
}

.nf-sidebar-ad__buy-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 7px;
}

/* ===============================================
   Full-Width Ad Banner (Between Sections)
   =============================================== */

.nf-fullwidth-ad {
	padding: 30px 0;
	ground: var(--nf-surface-primary);
	text-align: center;
}

.nf-fullwidth-ad .container > img.nf-fullwidth-ad__img,
.nf-fullwidth-ad .container > a > img.nf-fullwidth-ad__img,
.nf-fullwidth-ad .container > a > video.nf-fullwidth-ad__video,
.nf-fullwidth-ad .container > video.nf-fullwidth-ad__video {
	width: 100%;
	max-width: 100%;
	height: auto !important;
	aspect-ratio: 3 / 1;
	max-height: none !important;
	object-fit: fill;
	border-radius: 4px;
	display: block;
}

/* ===============================================
   Ad Rotation Transitions - Blur Swap
   =============================================== */

/* Base state - smooth transitions */
[data-ad-rotate] .nf-ad-rotate__img,
[data-ad-rotate] .nf-ad-rotate__video,
[data-ad-rotate] .nf-ad-creator,
[data-ad-rotate] .nf-ad-rotate__title,
[data-ad-rotate] .nf-ad-rotate__price,
[data-ad-rotate] .nf-ad-rotate__tagline {
	transition: 
		filter 0.4s ease-out,
		transform 0.4s ease-out,
		opacity 0.3s ease-out;
}

[data-ad-rotate] .nf-ad-rotate__img.is-hidden,
[data-ad-rotate] .nf-ad-rotate__video.is-hidden {
	display: none !important;
}

[data-ad-rotate].nf-ad--resizing {
	transition: height 0.36s ease;
}

/* Blurring state - applied to container */
[data-ad-rotate].nf-ad--blurring .nf-ad-rotate__img,
[data-ad-rotate].nf-ad--blurring .nf-ad-rotate__video {
	filter: blur(12px);
}

[data-ad-rotate].nf-ad--blurring .nf-ad-creator {
	filter: blur(4px);
	opacity: 0.5;
}

[data-ad-rotate].nf-ad--blurring .nf-ad-rotate__title,
[data-ad-rotate].nf-ad--blurring .nf-ad-rotate__price,
[data-ad-rotate].nf-ad--blurring .nf-ad-rotate__tagline {
	filter: blur(3px);
	opacity: 0.6;
}

@media (max-width: 767px) {
	.nf-fullwidth-ad .container > img.nf-fullwidth-ad__img,
	.nf-fullwidth-ad .container > a > img.nf-fullwidth-ad__img,
	.nf-fullwidth-ad .container > a > video.nf-fullwidth-ad__video,
	.nf-fullwidth-ad .container > video.nf-fullwidth-ad__video {
		height: auto !important;
		aspect-ratio: 4 / 1;
		max-height: none !important;
	}
}



/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 1199px) {
	.nf-main-section__grid {
		grid-template-columns: 1fr 300px;
	}

	.nf-featured-item {
		grid-template-columns: 240px 1fr;
	}
}

@media (max-width: 991px) {
	.nf-main-section__grid {
		grid-template-columns: 1fr;
	}

	.nf-main-section__sidebar {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.nf-spotlight,
	.nf-social-widget {
		flex: 1;
		min-width: 280px;
	}
}

@media (max-width: 767px) {
	.nf-featured-item {
		grid-template-columns: 1fr;
	}

	.nf-featured-item__image-wrap {
		min-height: 200px;
	}

	.nf-featured-item__content {
		padding: 16px;
	}

	.nf-main-section__sidebar {
		flex-direction: column;
	}

	.nf-spotlight,
	.nf-social-widget {
		min-width: auto;
	}
}
