/**
 * Carousel Slider CSS
 * 
 * Main stylesheet for the carousel slider component
 * Matches the "Top Articles" design
 */

/* ============================================
   Main Wrapper
   ============================================ */
.carousel-slider-wrapper {
	position: relative;
	width: 100%;
	margin: 40px 0;
	padding: 0;
	box-sizing: border-box;
}

/* Title */
.carousel-slider-title {
	font-size: 32px;
	font-weight: 700;
	color: #333;
	margin-bottom: 30px;
	font-family: 'Poppins', sans-serif;
	padding: 0 15px;
}

.carousel-slider-count {
	font-size: 18px;
	font-weight: 400;
	color: #999;
	margin-left: 10px;
}

/* ============================================
   Container & Track
   ============================================ */
.carousel-slider-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 0 15px;
}

.carousel-slider-track {
	display: flex !important;
	transition: transform 0.5s ease-in-out;
	will-change: transform;
	gap: 20px;
	width: auto;
	min-width: 100%;
}

/* ============================================
   Slide Items
   ============================================ */
.carousel-slider-item {
	flex: 0 0 calc((100% - 40px) / 3);
	min-width: 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.carousel-slider-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Image */
.carousel-slider-image {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: 12px 12px 0 0;
}

.carousel-slider-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	display: block;
}

.carousel-slider-item:hover .carousel-slider-image img {
	transform: scale(1.05);
}

.carousel-slider-image a {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
}

/* Play Icon Overlay */
.carousel-slider-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	pointer-events: none;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel-slider-play-icon {
	width: 60px;
	height: 60px;
	object-fit: contain;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
	transition: transform 0.3s ease;
}

.carousel-slider-item:hover .carousel-slider-play-overlay {
	transform: translate(-50%, -50%) scale(1.1);
}

.carousel-slider-item:hover .carousel-slider-play-icon {
	transform: scale(1.1);
}

/* Content */
.carousel-slider-content {
	padding: 20px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

/* Meta Container - Category and Date */
.carousel-slider-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0;
	gap: 15px;
}

/* Category Tag - Left Side */
.carousel-slider-category {
	display: inline-block;
	padding: 6px 14px;
	background: #f5f5f5;
	border-radius: 20px;
	color: #666;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	width: fit-content;
	font-family: 'Poppins', sans-serif;
	flex-shrink: 0;
}

/* Date - Right Side */
.carousel-slider-date {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #999;
	font-size: 13px;
	font-family: 'Poppins', sans-serif;
	margin-left: auto;
	flex-shrink: 0;
}

.carousel-icon-calendar {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Title */
.carousel-slider-title-item {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 27px;
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    flex-grow: 1;
}

.carousel-slider-title-item a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.carousel-slider-title-item a:hover {
	color: #7b68ee;
}

/* Read More Button */
.carousel-slider-read-more {
    display: inline-block;
    padding: 12px 24px;
    background: #E1DEEC;
    color: #422E87;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Poppins', sans-serif;
    margin-top: auto;
}

.carousel-slider-read-more:hover {
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
	color: #fff;
}

/* ============================================
   Navigation Container
   ============================================ */
.carousel-slider-navigation {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 30px;
	padding: 0 15px;
}

/* ============================================
   Navigation Arrows
   ============================================ */
.carousel-slider-arrow {
	position: relative;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 20px;
	color: #333;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
}

.carousel-slider-arrow:hover {
	background: #fff;
	border-color: #7b68ee;
	color: #7b68ee;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-slider-arrow:active {
	transform: scale(0.95);
}

.carousel-slider-arrow.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.carousel-slider-arrow.disabled:hover {
	background: rgba(255, 255, 255, 0.95);
	border-color: #e0e0e0;
	color: #333;
}

.carousel-slider-arrow span {
	line-height: 1;
	font-weight: 300;
}

/* ============================================
   Pagination Dots
   ============================================ */
.carousel-slider-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.carousel-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ddd;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.3s ease;
}

.carousel-slider-dot:hover {
	background: #bbb;
	transform: scale(1.2);
}

.carousel-slider-dot.active {
	background: #7b68ee;
	width: 30px;
	border-radius: 5px;
}

/* ============================================
   No Posts Message
   ============================================ */
.carousel-slider-no-posts {
	text-align: center;
	padding: 40px 20px;
	color: #999;
}

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

/* Tablet */
@media (max-width: 992px) {
	.carousel-slider-item {
		flex: 0 0 calc((100% - 20px) / 2);
	}
	
	.carousel-slider-navigation {
		gap: 15px;
	}
	
	.carousel-slider-arrow {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.carousel-slider-wrapper {
		margin: 30px 0;
	}
	
	.carousel-slider-title {
		font-size: 24px;
		margin-bottom: 20px;
		padding: 0 10px;
	}
	
	.carousel-slider-container {
		padding: 0 10px;
	}
	
	.carousel-slider-item {
		flex: 0 0 85%;
		min-width: 85%;
	}
	
	.carousel-slider-track {
		gap: 15px;
	}
	
	.carousel-slider-navigation {
		gap: 10px;
		margin-top: 20px;
	}
	
	.carousel-slider-arrow {
		width: 35px;
		height: 35px;
		font-size: 16px;
		background: rgba(255, 255, 255, 0.98);
	}
	
	.carousel-slider-content {
		padding: 15px;
	}
	
	.carousel-slider-title-item {
		font-size: 16px;
	}
	
	.carousel-slider-read-more {
		padding: 10px 20px;
		font-size: 12px;
	}
}

/* ============================================
   Loading State
   ============================================ */
.carousel-slider-wrapper.loading .carousel-slider-track {
	opacity: 0.5;
}

/* ============================================
   Accessibility
   ============================================ */
.carousel-slider-arrow:focus {
	outline: 2px solid #7b68ee;
	outline-offset: 2px;
}

.carousel-slider-dot:focus {
	outline: 2px solid #7b68ee;
	outline-offset: 2px;
}

/* ============================================
   Carousel Initialized State
   ============================================ */
.carousel-slider-wrapper.carousel-initialized .carousel-slider-track {
	display: flex;
}

.carousel-slider-wrapper:not(.carousel-initialized) .carousel-slider-track {
	display: flex;
	flex-wrap: wrap;
}

/* ============================================
   Content Type Styles
   ============================================ */

/* Normal Posts - Default Style (Current Style) */
/* Uses default styles defined above - no additional styles needed */

/* Podcast Content Type - Matching Image Design */
.carousel-content-type-podcast .carousel-slider-item {
	border-radius: 12px;
	overflow: hidden;
}

.carousel-content-type-podcast .carousel-slider-image {
	border-radius: 12px 12px 0 0;
}

.carousel-content-type-podcast .carousel-slider-category {
	display: none; /* Hide category for podcast style */
}

.carousel-content-type-podcast .carousel-slider-date {
	display: none; /* Hide date for podcast style */
}

.carousel-content-type-podcast .carousel-slider-title-item {
	font-size: 20px;
	font-weight: 700;
	color: #2c3e50;
	margin-bottom: 0;
	line-height: 1.4;
}

.carousel-content-type-podcast .carousel-slider-title-item a {
	color: #2c3e50;
	-webkit-line-clamp: 2;
}

.carousel-content-type-podcast .carousel-slider-title-item a:hover {
	color: #422E87;
}

.carousel-content-type-podcast .carousel-slider-read-more {
	display: none; /* Hide read more button for podcast style */
}

.carousel-content-type-podcast .carousel-slider-content {
	padding: 20px;
	gap: 0;
}

.carousel-content-type-podcast .carousel-slider-meta {
	display: none; /* Hide meta for podcast style */
}

/* Podcast Play Button - Using play_circle.png */
.carousel-content-type-podcast .carousel-slider-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	pointer-events: none;
	transition: transform 0.3s ease;
}

.carousel-content-type-podcast .carousel-slider-play-icon-podcast {
	width: 80px;
	height: 80px;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
	transition: transform 0.3s ease;
}

.carousel-content-type-podcast .carousel-slider-item:hover .carousel-slider-play-icon-podcast {
	transform: scale(1.1);
}

/* Webinars Content Type - Same style as Podcast but without title */
.carousel-content-type-webinars .carousel-slider-item {
	border-radius: 12px;
	overflow: hidden;
}

.carousel-content-type-webinars .carousel-slider-image {
	border-radius: 12px 12px 0 0;
}

.carousel-content-type-webinars .carousel-slider-category {
	display: none; /* Hide category for webinars style */
}

.carousel-content-type-webinars .carousel-slider-date {
	display: none; /* Hide date for webinars style */
}

.carousel-content-type-webinars .carousel-slider-title-item {
	display: none; /* Hide title for webinars style */
}

.carousel-content-type-webinars .carousel-slider-read-more {
	display: none; /* Hide read more button for webinars style */
}

.carousel-content-type-webinars .carousel-slider-content {
	padding: 20px;
	gap: 0;
}

.carousel-content-type-webinars .carousel-slider-meta {
	display: none; /* Hide meta for webinars style */
}

/* Webinars Play Button - Same as Podcast */
.carousel-content-type-webinars .carousel-slider-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	pointer-events: none;
	transition: transform 0.3s ease;
}

.carousel-content-type-webinars .carousel-slider-play-icon-podcast {
	width: 80px;
	height: 80px;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
	transition: transform 0.3s ease;
}

.carousel-content-type-webinars .carousel-slider-item:hover .carousel-slider-play-icon-podcast {
	transform: scale(1.1);
}

/* Reports Content Type - Vertical/Portrait Design */
.carousel-content-type-reports .carousel-slider-item {
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: auto;
}

.carousel-content-type-reports .carousel-slider-image {
	border-radius: 12px 12px 0 0;
	aspect-ratio: 3 / 4; /* Vertical/Portrait aspect ratio */
	width: 100%;
}

.carousel-content-type-reports .carousel-slider-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.carousel-content-type-reports .carousel-slider-category {
	display: none; /* Hide category for reports style */
}

.carousel-content-type-reports .carousel-slider-date {
	display: none; /* Hide date for reports style */
}

.carousel-content-type-reports .carousel-slider-title-item {
	font-size: 18px;
	font-weight: 600;
	color: #2c3e50;
	margin: 0;
	line-height: 1.5;
	text-align: center;
	padding: 20px;
}

.carousel-content-type-reports .carousel-slider-title-item a {
	color: #2c3e50;
	text-decoration: none;
	display: block;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.3s ease;
}

.carousel-content-type-reports .carousel-slider-title-item a:hover {
	color: #422E87;
}

.carousel-content-type-reports .carousel-slider-read-more {
	display: none; /* Hide read more button for reports style */
}

.carousel-content-type-reports .carousel-slider-content {
	padding: 0;
	gap: 0;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.carousel-content-type-reports .carousel-slider-meta {
	display: none; /* Hide meta for reports style */
}

/* ============================================
   RTL Support
   ============================================ */
html[dir="rtl"] .carousel-slider-wrapper,
body[dir="rtl"] .carousel-slider-wrapper {
	direction: rtl;
}

html[dir="rtl"] .carousel-slider-track,
body[dir="rtl"] .carousel-slider-track {
	direction: ltr; /* Keep track direction ltr for proper sliding */
}

html[dir="rtl"] .carousel-slider-navigation,
body[dir="rtl"] .carousel-slider-navigation {
	direction: rtl;
	flex-direction: row-reverse;
}

html[dir="rtl"] .carousel-slider-meta,
body[dir="rtl"] .carousel-slider-meta {
	flex-direction: row-reverse;
}

html[dir="rtl"] .carousel-slider-date,
body[dir="rtl"] .carousel-slider-date {
	margin-left: 0;
	margin-right: auto;
}

html[dir="rtl"] .carousel-slider-category,
body[dir="rtl"] .carousel-slider-category {
	margin-right: 0;
	margin-left: auto;
}

html[dir="rtl"] .carousel-slider-arrow,
body[dir="rtl"] .carousel-slider-arrow {
	/* Arrows are already swapped in template, just ensure proper styling */
}

html[dir="rtl"] .carousel-slider-navigation,
body[dir="rtl"] .carousel-slider-navigation {
	/* Navigation order is reversed via flex-direction: row-reverse */
}