/**
 * Styles for Otalume Popular Slider
 * Cinematic anime banner with diagonal slanted artwork, dedicated RTL support,
 * natural portrait cover proportions, and eye-friendly contrast.
 */

:root {
	--otalume-slider-yellow: #ffd000;
	--otalume-slider-yellow-hover: #ffbe00;
	--otalume-slider-blue-dot: #3b82f6;
	--otalume-slider-red: #eb2f06;
	--otalume-slider-bg-dark: #131722;
	--otalume-slider-text-primary: #ffffff;
	--otalume-slider-text-muted: #cbd5e1;
}

/* Outer Container: Fits cleanly into the theme layout with RTL by default */
.otalume-popular-slider-wrap {
	position: relative;
	width: calc(100% - 32px) !important;
	max-width: 1170px !important;
	margin: 20px auto 28px !important;
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--otalume-slider-bg-dark);
	box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.08);
	color: var(--otalume-slider-text-primary);
	user-select: none;
	-webkit-user-select: none;
	font-family: 'Tajawal', 'Cairo', 'Almarai', system-ui, -apple-system, sans-serif;
	box-sizing: border-box;
	direction: rtl !important;
	text-align: right !important;
}

.otalume-popular-slider-wrap *,
.otalume-popular-slider-wrap *::before,
.otalume-popular-slider-wrap *::after {
	box-sizing: border-box;
}

.otalume-popular-slider {
	position: relative;
	width: 100%;
	height: 330px;
	min-height: 330px;
	overflow: hidden;
	direction: rtl;
}

.otalume-slider-track {
	position: relative;
	width: 100%;
	height: 100%;
}

/* Individual Slide */
.otalume-slider-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.45s ease, visibility 0.45s ease;
	display: flex;
	align-items: center;
	overflow: hidden;
	direction: rtl !important;
	z-index: 1;
}

.otalume-slider-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 2;
}

/* Ambient Backdrop Blur (Soft, velvety, gentle on the eyes) */
.otalume-slide-backdrop {
	position: absolute;
	inset: -20px;
	background-size: cover;
	background-position: center;
	filter: blur(48px) brightness(0.24) saturate(1.2);
	transform: scale(1.06);
	opacity: 0.88;
	z-index: 1;
	pointer-events: none;
	transition: transform 6s ease-out;
}

.otalume-slider-slide.is-active .otalume-slide-backdrop {
	transform: scale(1.12);
}

.otalume-slide-backdrop--default {
	background: radial-gradient(circle at 70% 30%, #1e293b 0%, #0f172a 100%);
}

/* Soft atmospheric gradient: text on right is 100% readable, artwork on left glows through */
.otalume-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(19, 23, 34, 0.08) 0%,
		rgba(19, 23, 34, 0.55) 36%,
		rgba(19, 23, 34, 0.92) 65%,
		#131722 100%
	);
	z-index: 2;
	pointer-events: none;
}

/* =========================================================
   CONTENT SIDE (Right side in RTL)
   ========================================================= */

.otalume-slide-content {
	position: relative;
	z-index: 5;
	width: 64%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	margin-right: 0 !important;
	margin-left: auto !important;
	padding: 30px 48px 30px 24px;
	text-align: right !important;
	direction: rtl !important;
	box-sizing: border-box;
}

/* Chapter Label (e.g. الفصل: 5) */
.otalume-slide-chapter-tag {
	font-size: 14.5px;
	font-weight: 700;
	color: #e2e8f0;
	letter-spacing: 0.2px;
	line-height: 1.2;
}

/* Title */
.otalume-slide-title {
	margin: 0;
	font-size: clamp(1.65rem, 2.7vw, 2.25rem);
	font-weight: 800;
	line-height: 1.25;
	color: #ffffff;
	text-align: right !important;
}

.otalume-slide-title a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.otalume-slide-title a:hover {
	color: var(--otalume-slider-yellow);
}

/* Description: Comfortable line height, soft text */
.otalume-slide-desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.65;
	color: var(--otalume-slider-text-muted);
	max-width: 540px;
	text-align: right !important;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Genre Pill */
.otalume-slide-genres {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 2px;
	justify-content: flex-start;
}

.otalume-genre-tag {
	font-size: 12px;
	font-weight: 600;
	color: #f1f5f9;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 4px;
	padding: 3px 12px;
	text-decoration: none;
	line-height: 1.3;
	transition: all 0.2s ease;
}

.otalume-genre-tag:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.6);
	color: #ffffff;
}

/* Action Buttons ("ابدأ القراءة" & Bookmark) */
.otalume-slide-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
	justify-content: flex-start;
}

.otalume-btn-start-reading {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--otalume-slider-yellow);
	color: #111827 !important;
	font-weight: 800;
	font-size: 14px;
	padding: 9px 22px;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 4px 14px rgba(255, 208, 0, 0.32);
	border: none;
	line-height: 1.4;
}

.otalume-btn-start-reading:hover {
	background-color: var(--otalume-slider-yellow-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(255, 208, 0, 0.45);
}

.otalume-btn-arrow {
	font-size: 16px;
	font-weight: 900;
	display: inline-block;
	transition: transform 0.2s ease;
}

.otalume-btn-start-reading:hover .otalume-btn-arrow {
	transform: translateX(-4px);
}

.otalume-btn-bookmark {
	width: 38px;
	height: 38px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.otalume-btn-bookmark:hover {
	background: rgba(235, 47, 6, 0.2);
	border-color: var(--otalume-slider-red);
	color: var(--otalume-slider-red);
	transform: translateY(-2px);
}

.otalume-btn-bookmark:active {
	transform: scale(0.92);
}

.otalume-btn-bookmark.is-bookmarked {
	background: var(--otalume-slider-red) !important;
	color: #ffffff !important;
	border-color: var(--otalume-slider-red) !important;
	box-shadow: 0 2px 10px rgba(235, 47, 6, 0.4);
}

.otalume-btn-bookmark.is-bookmarked svg {
	fill: #ffffff !important;
	stroke: #ffffff !important;
}

/* =========================================================
   FEATURED ARTWORK SIDE (Left side in RTL)
   Sized proportionally (width: 34%) to prevent 260% zoom,
   with object-position: center 10% to frame character head/face.
   ========================================================= */

.otalume-slide-artwork {
	position: absolute;
	left: 0 !important;
	right: auto !important;
	top: 0;
	bottom: 0;
	width: clamp(260px, 34%, 350px);
	height: 100%;
	z-index: 3;
	overflow: hidden;
	clip-path: polygon(0 0, calc(100% - 45px) 0, 100% 100%, 0 100%);
	-webkit-clip-path: polygon(0 0, calc(100% - 45px) 0, 100% 100%, 0 100%);
	filter: drop-shadow(4px 0 14px rgba(0, 0, 0, 0.45));
}

.otalume-slide-art-link {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	text-decoration: none;
}

.otalume-slide-art-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 10%; /* Focus on character face and title */
	display: block;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.otalume-slider-slide.is-active .otalume-slide-art-img {
	animation: otalumeArtZoom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes otalumeArtZoom {
	0% {
		transform: scale(1.04);
		opacity: 0.85;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.otalume-slide-art-link:hover .otalume-slide-art-img {
	transform: scale(1.03);
}

.otalume-slide-art-placeholder {
	width: 100%;
	height: 100%;
	background: #1e293b;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

/* Luminous highlight seam along the slanted divider */
.otalume-slide-art-seam {
	position: absolute;
	top: -5%;
	bottom: -5%;
	right: 0;
	width: 2px;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.45) 0%,
		rgba(255, 255, 255, 0.15) 60%,
		transparent 100%
	);
	transform-origin: top right;
	transform: skewX(-8.5deg);
	pointer-events: none;
}

/* =========================================================
   BOTTOM NAVIGATION DOTS (Over artwork corner on left in RTL)
   ========================================================= */

.otalume-slider-dots {
	position: absolute;
	bottom: 18px;
	left: 24px !important;
	right: auto !important;
	display: flex;
	align-items: center;
	gap: 7px;
	z-index: 10;
}

.otalume-slider-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: all 0.22s ease;
	outline: none;
}

.otalume-slider-dot:hover {
	background: rgba(255, 255, 255, 0.85);
	transform: scale(1.15);
}

.otalume-slider-dot.is-active {
	background: var(--otalume-slider-blue-dot);
	box-shadow: 0 0 10px rgba(59, 130, 246, 0.9);
	transform: scale(1.2);
}

/* =========================================================
   ARROWS NAVIGATION
   ========================================================= */

.otalume-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(20, 24, 34, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: all 0.2s ease;
	opacity: 0.65;
	padding: 0;
}

.otalume-popular-slider-wrap:hover .otalume-slider-arrow {
	opacity: 1;
}

.otalume-slider-arrow:hover {
	background: rgba(255, 208, 0, 0.9);
	border-color: #ffd000;
	color: #111827;
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* In RTL: Prev is on the right, Next is on the left */
.otalume-slider-arrow--prev {
	right: 12px;
	left: auto;
}

.otalume-slider-arrow--next {
	left: 12px;
	right: auto;
}

/* =========================================================
   RESPONSIVE DESIGN (Tablets & Mobile Phones)
   ========================================================= */

@media (max-width: 991px) {
	.otalume-popular-slider,
	.otalume-slider-track {
		height: 310px;
		min-height: 310px;
	}

	.otalume-slide-content {
		width: 65%;
		padding: 24px 32px 24px 16px;
	}

	.otalume-slide-artwork {
		width: 35%;
	}

	.otalume-slide-title {
		font-size: 1.65rem;
	}
}

@media (max-width: 767px) {
	.otalume-popular-slider-wrap {
		width: calc(100% - 20px) !important;
		margin: 12px auto 20px !important;
		border-radius: 8px;
	}

	.otalume-popular-slider,
	.otalume-slider-track {
		height: 260px;
		min-height: 260px;
	}

	.otalume-slide-content {
		width: 62%;
		padding: 16px 16px 16px 8px;
		gap: 6px;
	}

	.otalume-slide-chapter-tag {
		font-size: 12.5px;
	}

	.otalume-slide-title {
		font-size: 1.12rem;
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.otalume-slide-desc {
		display: none; /* Hide description on mobile for clean breathing room */
	}

	.otalume-slide-genres {
		margin-top: 0;
	}

	.otalume-genre-tag {
		font-size: 11px;
		padding: 2px 8px;
	}

	.otalume-slide-actions {
		gap: 8px;
		margin-top: 2px;
	}

	.otalume-btn-start-reading {
		padding: 7px 14px;
		font-size: 12.5px;
	}

	.otalume-btn-bookmark {
		width: 32px;
		height: 32px;
	}

	.otalume-slide-artwork {
		width: 38%;
		clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
		-webkit-clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
	}

	.otalume-slide-art-img {
		object-position: center 8%;
	}

	.otalume-slider-arrow {
		display: none; /* Use touch swipe on mobile */
	}

	.otalume-slider-dots {
		left: 12px !important;
		bottom: 10px;
	}

	.otalume-slider-dot {
		width: 6px;
		height: 6px;
	}
}
