/* ─── Smartupworld Post Slider — Component Styles ───────────────────────────
 * Loaded via wp_enqueue_style() in post-slider.php
 * Path: assets/css/post-slider.css
 * ─────────────────────────────────────────────────────────────────────────── */

/* ── Section wrapper ── */
.suw-post-slider {
	position: relative;
	padding: 50px 0 30px;
}

/* ── Section header ── */
.suw-slider-header {
	text-align: center;
	margin-bottom: 36px;
	font-size: clamp(1.55rem, 3vw, 2.2rem);
	font-weight: 600;
	color: #414141;
}

.suw-slider-title {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	margin: 0 0 12px !important;
	line-height: 1.25 !important;
	position: relative;
	display: inline-block;
}

/* When the .swb-underline div is present, suppress the pseudo-element
   so the bar is not drawn twice. With underline="false" there is no
   .swb-underline in the DOM, so the original bar renders as before. */
.suw-slider-header:has(.swb-underline) .suw-slider-title::after {
	display: none;
}

/* ── Header parts must stack, not sit inline ── */
.suw-slider-header .swb-eyebrow {
	display: inline-block;
	margin: 0 auto 14px;
}

.suw-slider-header .suw-slider-title {
	display: block;
	width: 100%;
}

.suw-slider-header .swb-underline {
	margin: 0 auto;
}

.suw-slider-subtitle {
	font-size: 15px;
	color: #777;
	margin: 14px 0 0;
	line-height: 1.6;
}

/* ── Card wrapper ── */
.owl-carousel .owl-item .item {
	overflow: hidden;
}

/* ── Card ── */
.suw-slide-card {
	display: block;
	position: relative;
	height: 320px;
	overflow: hidden;
	text-decoration: none !important;
	box-shadow: 0 4px 20px rgba(0,0,0,.12);
	background: #111;
	transition: transform .3s ease, box-shadow .3s ease;
}

.suw-slide-card:hover {
	box-shadow: 0 10px 32px rgba(0,0,0,.22);
}

/* ── Image ── */
.suw-slide-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	max-width: 100%;
	transition: transform .5s ease, opacity .3s ease;
	opacity: .92;
}

.suw-slide-card:hover .suw-slide-img {
	transform: scale(1.06);
	opacity: 1;
}

.owl-carousel .owl-item img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	object-position: center center;
}

/* ── Gradient overlay ── */
.suw-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0,0,0,.88) 0%,
		rgba(0,0,0,.45) 45%,
		rgba(0,0,0,.10) 100%
	);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 22px 18px 18px;
	transition: background .3s ease;
}

.suw-slide-card:hover .suw-slide-overlay {
	background: linear-gradient(
		to top,
		rgba(0,0,0,.92) 0%,
		rgba(0,0,0,.55) 50%,
		rgba(0,0,0,.18) 100%
	);
}

/* ── Category badge (currently hidden, kept for future use) ── */
.suw-slide-cat {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: #bd864e;
	color: #fff;
	padding: 3px 9px;
	border-radius: 4px;
	margin-bottom: 8px;
	width: fit-content;
	line-height: 1.5;
}

/* ── Card title (unscoped — works on homepage and single posts) ── */
.suw-slide-title {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: #fff !important;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Meta row ── */
.suw-slide-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.suw-slide-author,
.suw-slide-date {
	font-size: 12px;
	color: rgba(255,255,255,.75);
	display: flex;
	align-items: center;
	gap: 4px;
	line-height: 1;
}

.suw-slide-author svg,
.suw-slide-date svg {
	flex-shrink: 0;
	opacity: .8;
}

/* ── Read more pill ── */
.suw-slide-read {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 11px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255,255,255,.18);
	border: 1px solid rgba(255,255,255,.25);
	padding: 5px 12px;
	border-radius: 20px;
	backdrop-filter: blur(4px);
	transition: background .25s, border-color .25s;
	width: fit-content;
}

.suw-slide-card:hover .suw-slide-read {
	background: #bd864e;
	border-color: transparent;
}

/* ── Navigation arrows ── */
.suw-post-slider .owl-nav button.owl-prev,
.suw-post-slider .owl-nav button.owl-next {
	position: absolute;
	top: 46%;
	transform: translateY(-50%);
	width: 32px;
	height: 42px;
	border-radius: unset !important;
	background: rgba(255,255,255,.43) !important;
	box-shadow: 0 2px 12px rgba(0,0,0,.18) !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	color: #333 !important;
	transition: background .2s, color .2s !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.suw-post-slider .owl-nav button.owl-prev:hover,
.suw-post-slider .owl-nav button.owl-next:hover {
	background: #bd864e7d !important;
	color: #fff !important;
}

.suw-post-slider .owl-nav button.owl-prev {
	left: 0;
}

.suw-post-slider .owl-nav button.owl-next {
	right: 0;
}

/* ── Pagination dots ── */
.suw-post-slider .owl-dots {
	margin-top: 16px !important;
	text-align: center;
}

.suw-post-slider .owl-dot span {
	width: 8px !important;
	height: 8px !important;
	background: #ccc !important;
	transition: background .2s, width .2s !important;
}

.suw-post-slider .owl-dot.active span {
	background: #bd864e !important;
	width: 22px !important;
	border-radius: 4px !important;
}

/* ── No-image fallback ── */
.suw-slide-no-img {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.suw-slide-no-img svg {
	opacity: .3;
}

/* ── Reduced motion support ── */
@media (prefers-reduced-motion: reduce) {
	.suw-slide-img,
	.suw-slide-card,
	.suw-slide-overlay,
	.suw-slide-read,
	.suw-post-slider .owl-dot span {
		transition: none !important;
	}
}

/* ── Mobile responsive ── */
@media (max-width: 599px) {
	.suw-slide-card {
		height: 270px;
	}

	.suw-slider-title {
		font-size: 35px !important;
	}

	.suw-slider-subtitle {
		font-size: 13px;
	}

	.suw-slide-title {
		font-size: 14px;
	}

	.suw-post-slider .owl-nav button.owl-prev,
	.suw-post-slider .owl-nav button.owl-next {
		top: 43%;
	}
}

/* ─── Smartupworld Post Slider — Component Styles Ends───────────────────────────*/
