/**
 * You May Have Missed Section Styles
 *
 * Tabbed slider section with category filtering.
 *
 * @package Blanco_Lite
 */

/* ===============================================
   Section Container
   =============================================== */

.nf-ymhm-section {
	padding: 40px 0;
	background: var(--nf-surface-primary);
	border-top: 3px solid var(--nf-accent-primary);
}

/* ===============================================
   Header: Title + Tabs
   =============================================== */

.nf-ymhm__header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
}

.nf-ymhm__title-wrap {
	flex-shrink: 0;
}

.nf-ymhm__title {
	display: inline-block;
	padding: 10px 18px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Category Tabs */
.nf-ymhm__tabs {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}

.nf-ymhm__tab {
	padding: 8px 16px;
	background: var(--nf-surface-elevated);
	border: none;
	color: var(--nf-text-secondary);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border-radius: 3px;
}

.nf-ymhm__tab:hover {
	background: var(--tab-color, var(--nf-surface-secondary));
	color: #ffffff;
}

.nf-ymhm__tab--active {
	background: var(--tab-color, var(--nf-accent-primary));
	color: #ffffff;
}

/* ===============================================
   Slider Container
   =============================================== */

.nf-ymhm__slider-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 15px;
}

/* Navigation Arrows */
.nf-ymhm__arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--nf-surface-elevated);
	border: none;
	color: var(--nf-text-secondary);
	font-size: 14px;
	cursor: pointer;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.nf-ymhm__arrow:hover {
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
}

.nf-ymhm__arrow:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* Slider Viewport */
.nf-ymhm__slider {
	flex: 1;
	overflow: hidden;
}

/* Track containing cards */
.nf-ymhm__track {
	display: flex;
	gap: 20px;
	transition: transform 0.4s ease;
}

/* ===============================================
   Post Cards
   =============================================== */

.nf-ymhm__card {
	flex: 0 0 calc(25% - 15px);
	min-width: calc(25% - 15px);
}

.nf-ymhm__card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Image Area */
.nf-ymhm__card-image-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
	margin-bottom: 12px;
}

.nf-ymhm__card-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.4s ease;
}

.nf-ymhm__card-link:hover .nf-ymhm__card-image {
	transform: scale(1.08);
}

.nf-ymhm__card-image--placeholder {
	background: linear-gradient(135deg, var(--nf-surface-secondary) 0%, var(--nf-surface-elevated) 100%);
}

/* Category Badges */
.nf-ymhm__card-categories {
	position: absolute;
	bottom: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	z-index: 2;
}

.nf-ymhm__card-cat {
	padding: 4px 10px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border-radius: 2px;
}

/* Content Area */
.nf-ymhm__card-content {
	padding: 0 5px;
}

.nf-ymhm__card-title {
	margin: 0 0 8px 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--nf-text-primary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.nf-ymhm__card-link:hover .nf-ymhm__card-title {
	color: var(--nf-accent-primary);
}

.nf-ymhm__card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.nf-ymhm__card-writer {
	font-size: 11px;
	font-weight: 600;
	color: #ffffff;
	background: var(--writer-color, var(--nf-accent-primary));
	padding: 3px 10px;
	border-radius: 4px;
	line-height: 1.3;
}

.nf-ymhm__card-date {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--nf-text-muted);
}

.nf-ymhm__card-date i {
	font-size: 11px;
}

/* No posts message */
.nf-ymhm__no-posts {
	width: 100%;
	text-align: center;
	padding: 40px;
	color: var(--nf-text-secondary);
}

/* ===============================================
   Loading State
   =============================================== */

.nf-ymhm__loading {
	display: flex;
	justify-content: center;
	padding: 30px 0;
}

.nf-ymhm__spinner {
	width: 30px;
	height: 30px;
	border: 3px solid var(--nf-surface-elevated);
	border-top-color: var(--nf-accent-primary);
	border-radius: 50%;
	animation: nf-ymhm-spin 0.8s linear infinite;
}

@keyframes nf-ymhm-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 1024px) {
	.nf-ymhm__card {
		flex: 0 0 calc(33.333% - 14px);
		min-width: calc(33.333% - 14px);
	}
}

@media (max-width: 768px) {
	.nf-ymhm__header {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.nf-ymhm__tabs {
		width: 100%;
		overflow-x: auto;
		padding-bottom: 10px;
		flex-wrap: nowrap;
	}
	
	.nf-ymhm__tab {
		white-space: nowrap;
	}
	
	.nf-ymhm__card {
		flex: 0 0 calc(50% - 10px);
		min-width: calc(50% - 10px);
	}
	
	.nf-ymhm__arrow {
		width: 35px;
		height: 35px;
	}
}

@media (max-width: 480px) {
	.nf-ymhm__slider-wrap {
		gap: 10px;
	}
	
	.nf-ymhm__card {
		flex: 0 0 100%;
		min-width: 100%;
	}
	
	.nf-ymhm__arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		z-index: 10;
		background: rgba(0, 0, 0, 0.7);
	}
	
	.nf-ymhm__arrow--prev {
		left: 5px;
	}
	
	.nf-ymhm__arrow--next {
		right: 5px;
	}
}
