/* AT.IT Podcast Carousel — Frontend Styles (ללא תלות בספריות חיצוניות) */

.atpc-wrapper {
	--atpc-items: 3;
	--atpc-gap: 24px;
	position: relative;
	width: 100%;
	direction: rtl;
}

/* -------- מסילת הקרוסלה -------- */
.atpc-track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--atpc-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
	overscroll-behavior-x: contain;
}

.atpc-track::-webkit-scrollbar {
	display: none;
}

/* -------- מצב תנועה רציפה (מרקיז אינסופי) -------- */
.atpc-wrapper.atpc-marquee-mode {
	--atpc-marquee-duration: 30s;
}

.atpc-track-marquee {
	display: flex;
	overflow: hidden;
	overflow-x: hidden;
}

.atpc-marquee-inner {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--atpc-gap);
	flex-shrink: 0;
	animation: atpc-marquee var(--atpc-marquee-duration, 30s) linear infinite;
}

.atpc-marquee-duplicate {
	display: contents;
}

.atpc-marquee-pause-hover .atpc-marquee-inner {
	animation-play-state: running;
}

.atpc-marquee-pause-hover:hover .atpc-marquee-inner {
	animation-play-state: paused;
}

@keyframes atpc-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/* -------- כרטיס -------- */
.atpc-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: calc( ( 100% - ( var(--atpc-items) - 1 ) * var(--atpc-gap) ) / var(--atpc-items) );
	height: 460px;
	background-color: #171C4B;
	border-radius: 1em;
	padding: 1vw;
	box-sizing: border-box;
	overflow: hidden;
}

.atpc-media,
.atpc-btn {
	width: 100%;
}

/* -------- יישור תוכן (נשלט מהוויג'ט: ימין / מרכז / שמאל) -------- */
.atpc-content-align-right .atpc-card {
	align-items: flex-start;
}
.atpc-content-align-right .atpc-title {
	text-align: right;
}
.atpc-content-align-center .atpc-card {
	align-items: center;
}
.atpc-content-align-center .atpc-title {
	text-align: center;
}
.atpc-content-align-left .atpc-card {
	align-items: flex-end;
}
.atpc-content-align-left .atpc-title {
	text-align: left;
}

.atpc-media {
	position: relative;
	height: 60%;
	border-radius: 1em;
	overflow: hidden;
	background-color: #0f1338;
	flex-shrink: 0;
}

.atpc-media img,
.atpc-media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.atpc-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #5A6CF5;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
	padding: 0;
}

.atpc-play-btn:hover {
	transform: translate(-50%, -50%) scale(1.08);
}

.atpc-play-btn-disabled {
	cursor: default;
	opacity: 0.6;
}

.atpc-play-btn-disabled:hover {
	transform: translate(-50%, -50%);
}

.atpc-play-btn svg {
	fill: #ffffff;
	margin-inline-start: 3px; /* איזון אופטי של משולש ה-play */
}

/* -------- כותרת -------- */
.atpc-title {
	color: #ffffff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	margin: 16px 0 0 0;
	text-align: center;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* -------- כפתור -------- */
.atpc-btn {
	margin-top: auto;
	display: flex;
	flex-direction: row; /* ברירת מחדל: איקון ראשון (מימין ב-RTL), לפני הטקסט */
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: #5A6CF5;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	padding: 12px 16px;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.atpc-btn:hover {
	opacity: 0.88;
	color: #ffffff;
}

.atpc-btn i,
.atpc-btn svg {
	font-size: 15px;
	width: 15px;
	height: 15px;
}

/* -------- שורת חצי ניווט (מחוץ למסילה, כדי שלא ייחתכו) -------- */
.atpc-nav-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
}

.atpc-nav {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	cursor: pointer;
	font-size: 22px;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	background-color: rgba(255, 255, 255, 0.08);
}

.atpc-nav:hover {
	opacity: 0.75;
}

.atpc-nav.atpc-nav-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.atpc-nav img {
	width: 22px;
	height: auto;
	display: block;
}

.atpc-btn-icon-img {
	width: 16px;
	height: 16px;
	object-fit: contain;
	display: block;
}

/* -------- פופאפ וידאו -------- */
.atpc-video-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.atpc-video-popup.atpc-active {
	display: flex;
}

.atpc-video-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 8, 30, 0.88);
}

.atpc-video-popup-inner {
	position: relative;
	z-index: 2;
	width: min(92vw, 400px);
	aspect-ratio: 9 / 16;
	background: #000;
	border-radius: 1em;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.atpc-video-popup-frame {
	width: 100%;
	height: 100%;
}

.atpc-video-popup-frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.atpc-video-popup-close {
	position: absolute;
	top: -44px;
	left: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.atpc-video-popup-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

/* -------- עורך אלמנטור -------- */
.atpc-editor-notice,
.atpc-empty-notice {
	padding: 16px;
	background: #fff8e5;
	border: 1px dashed #e0c04a;
	border-radius: 8px;
	font-size: 13px;
	color: #6b5900;
}

/* -------- רספונסיביות --------
 * כמות הפריטים הנראים, הגובה, השוליים וכו' נשלטים ישירות מטאב "עיצוב"
 * בוויג'ט (יש שם בקרות נפרדות לדסקטופ/טאבלט/מובייל). כאן רק כיוונון עדין לטקסט.
 */
@media (max-width: 767px) {
	.atpc-title {
		font-size: 15px;
	}

	.atpc-btn {
		font-size: 13px;
		padding: 10px 14px;
	}
}
