/**
 * Ledart-02 - Widget Stylesheet
 * Author: Hossein313
 * Version: 1.0.0
 */

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
	--pasp-primary:         #D4AF37;
	--pasp-primary-light:   #E5C76B;
	--pasp-primary-dark:    #A68A2A;
	--pasp-bg:              #F2F2F2;
	--pasp-card-bg:         #ffffff;
	--pasp-text-primary:    #1a1a2e;
	--pasp-text-secondary:  #666666;
	--pasp-text-meta:       #8A8A8A;
	--pasp-border:          #e8e8f0;
	--pasp-radius-card:     20px;
	--pasp-radius-image:    16px;
	--pasp-shadow-card:     0 8px 32px rgba(91, 67, 214, 0.08);
	--pasp-shadow-hover:    0 16px 48px rgba(91, 67, 214, 0.16);
	--pasp-transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Wrapper / Container
   ============================================================ */
.pasp-wrapper {
	background-color: var(--pasp-bg);
	border-radius: 24px;
	padding: 40px;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
	font-family: inherit;
}

.pasp-wrapper *,
.pasp-wrapper *::before,
.pasp-wrapper *::after {
	box-sizing: border-box;
}

/* ============================================================
   Header
   ============================================================ */
.pasp-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 32px;
	gap: 16px;
}

.pasp-header__left {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.pasp-header__right {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.pasp-header__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pasp-header__title {
	margin: 0;
	padding: 0;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--pasp-text-primary);
	letter-spacing: -0.5px;
}

.pasp-header__subtitle {
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: var(--pasp-text-meta);
	line-height: 1.6;
}

/* View All Button */
.pasp-header__view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background: #ffffff;
	color: var(--pasp-primary);
	font-size: 14px;
	font-weight: 600;
	border-radius: 40px;
	text-decoration: none;
	border: 1.5px solid var(--pasp-border);
	transition: var(--pasp-transition);
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pasp-header__view-all:hover {
	background: var(--pasp-primary);
	color: #ffffff;
	border-color: var(--pasp-primary);
	box-shadow: 0 4px 16px rgba(91, 67, 214, 0.3);
	transform: translateY(-1px);
	text-decoration: none;
}

.pasp-header__view-all svg {
	transition: transform 0.2s ease;
}

.pasp-header__view-all:hover svg {
	transform: translateX(-3px);
}

/* RTL: flip the arrow direction */
.pasp-rtl .pasp-header__view-all svg {
	transform: scaleX(-1);
}

.pasp-rtl .pasp-header__view-all:hover svg {
	transform: scaleX(-1) translateX(-3px);
}

/* ============================================================
   Slider Wrapper
   ============================================================ */
.pasp-slider-wrapper {
	position: relative;
	overflow: hidden;
}

.pasp-swiper {
	overflow: visible;
	padding-bottom: 4px;
}

/* Mask edges for the peek effect */
.pasp-slider-wrapper::after {
	content: '';
	position: absolute;
	top: 0;
	right: -1px;
	width: 60px;
	height: calc(100% - 40px);
	background: linear-gradient(to left, var(--pasp-bg) 20%, transparent 100%);
	pointer-events: none;
	z-index: 10;
}

/* ============================================================
   Card
   ============================================================ */
.pasp-card {
	background: var(--pasp-card-bg);
	border-radius: var(--pasp-radius-card);
	overflow: hidden;
	box-shadow: var(--pasp-shadow-card);
	transition: var(--pasp-transition);
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid rgba(255,255,255,0.8);
	/* Glassmorphism inspired */
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.pasp-card:hover {
	box-shadow: var(--pasp-shadow-hover);
	transform: translateY(-4px);
}

/* Thumbnail */
.pasp-card__thumbnail {
	position: relative;
	width: 100%;
	height: 260px;
	overflow: hidden;
	border-radius: var(--pasp-radius-image);
	margin: 8px;
	width: calc(100% - 16px);
	flex-shrink: 0;
}

.pasp-card__thumbnail a {
	display: block;
	width: 100%;
	height: 100%;
}

.pasp-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pasp-card:hover .pasp-card__image {
	transform: scale(1.04);
}

/* Category Badge (overlaid on image) */
.pasp-card__category {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-block;
	background: var(--pasp-primary);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 8px;
	z-index: 2;
	letter-spacing: 0.3px;
	box-shadow: 0 2px 8px rgba(91,67,214,0.3);
}

.pasp-card__category a {
	color: inherit;
	text-decoration: none;
}

.pasp-card__category a:hover {
	text-decoration: none;
}

.pasp-rtl .pasp-card__category {
	right: auto;
	left: 12px;
}

/* Inline category (no thumbnail) */
.pasp-card__category-inline {
	padding: 16px 16px 0;
}

/* Body */
.pasp-card__body {
	padding: 16px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
}

/* Meta (date) */
.pasp-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pasp-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--pasp-text-meta);
	font-weight: 400;
}

.pasp-card__meta-item svg {
	flex-shrink: 0;
	opacity: 0.7;
}

.pasp-card__date time {
	direction: ltr;
	unicode-bidi: embed;
}

/* Title */
.pasp-card__title {
	margin: 0;
	padding: 0;
	font-size: clamp(17px, 2.2vw, 21px);
	font-weight: 700;
	line-height: 1.4;
	color: var(--pasp-text-primary);
}

.pasp-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.pasp-card__title a:hover {
	color: var(--pasp-primary);
	text-decoration: none;
}

/* Excerpt */
.pasp-card__excerpt {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.75;
	color: var(--pasp-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Footer */
.pasp-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--pasp-border);
	gap: 8px;
}

/* Reading Time */
.pasp-card__reading-time {
	font-size: 13px;
}

/* Read More */
.pasp-card__read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pasp-primary);
	text-decoration: none;
	transition: gap 0.2s ease, color 0.2s ease;
}

.pasp-card__read-more:hover {
	gap: 8px;
	color: var(--pasp-primary-dark);
	text-decoration: none;
}

.pasp-card__read-more svg {
	transition: transform 0.2s ease;
}

.pasp-card__read-more:hover svg {
	transform: translateX(3px);
}

.pasp-rtl .pasp-card__read-more:hover svg {
	transform: translateX(-3px);
}

/* ============================================================
   Pagination Dots
   ============================================================ */
.pasp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 24px;
	position: static;
	width: 100%;
}

.pasp-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #B0B0B0;
	border-radius: 50%;
	opacity: 1;
	cursor: pointer;
	transition: var(--pasp-transition);
	border: none;
	display: inline-block;
}

.pasp-pagination .swiper-pagination-bullet-active {
	background: var(--pasp-primary);
	width: 24px;
	border-radius: 4px;
}

/* ============================================================
   No Posts State
   ============================================================ */
.pasp-no-posts {
	text-align: center;
	padding: 40px;
	color: var(--pasp-text-meta);
	font-size: 15px;
}

/* ============================================================
   Editor Preview Placeholder
   ============================================================ */
.pasp-editor-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
	border: 2px dashed rgba(91, 67, 214, 0.25);
	border-radius: var(--pasp-radius-card);
	background: rgba(91, 67, 214, 0.04);
	margin-top: 16px;
	padding: 32px;
}

.pasp-editor-placeholder p {
	margin: 0;
	font-weight: 600;
	color: var(--pasp-primary);
	font-size: 16px;
}

.pasp-editor-placeholder small {
	color: var(--pasp-text-meta);
	font-size: 13px;
}

/* ============================================================
   RTL Adjustments
   ============================================================ */
.pasp-rtl .pasp-header {
	flex-direction: row-reverse;
}

.pasp-rtl .pasp-header__left {
	flex-direction: row-reverse;
}

.pasp-rtl .pasp-header__text {
	text-align: right;
}

.pasp-rtl .pasp-card__meta {
	flex-direction: row-reverse;
}

.pasp-rtl .pasp-card__footer {
	flex-direction: row-reverse;
}

.pasp-rtl .pasp-card__title {
	text-align: right;
}

.pasp-rtl .pasp-card__excerpt {
	text-align: right;
}

/* Auto RTL via dir attribute */
[dir="rtl"] .pasp-card__category {
	right: auto;
	left: 12px;
}

/* ============================================================
   Responsive - Tablet
   ============================================================ */
@media (max-width: 1024px) {
	.pasp-wrapper {
		padding: 28px;
	}

	.pasp-header__title {
		font-size: 24px;
	}

	.pasp-card__thumbnail {
		height: 220px;
	}
}

/* ============================================================
   Responsive - Mobile
   ============================================================ */
@media (max-width: 767px) {
	.pasp-wrapper {
		padding: 20px 16px;
		border-radius: 16px;
	}

	.pasp-header {
		flex-direction: column-reverse;
		gap: 12px;
	}

	.pasp-header__left {
		width: 100%;
	}

	.pasp-header__right {
		width: 100%;
	}

	.pasp-header__view-all {
		width: 100%;
		justify-content: center;
	}

	.pasp-header__title {
		font-size: 20px;
	}

	.pasp-card__thumbnail {
		height: 200px;
	}

	.pasp-card__body {
		padding: 12px 16px 16px;
	}

	.pasp-slider-wrapper::after {
		display: none;
	}
}

/* ============================================================
   Accessibility - Focus styles
   ============================================================ */
.pasp-card__title a:focus-visible,
.pasp-card__read-more:focus-visible,
.pasp-header__view-all:focus-visible {
	outline: 2px solid var(--pasp-primary);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ============================================================
   Swiper overrides - disable default pagination bottom spacing
   ============================================================ */
.pasp-swiper.swiper {
	padding-bottom: 0 !important;
}

.pasp-swiper .swiper-slide {
	height: auto;
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
	.pasp-wrapper {
		background: #fff;
		box-shadow: none;
	}

	.pasp-card {
		box-shadow: none;
		border: 1px solid #ddd;
		page-break-inside: avoid;
	}

	.pasp-pagination {
		display: none;
	}
}
