/*
 * Telesen Design Projects Carousel
 * Карточка слайда повторяет визуальный стиль блока "Похожие проекты"
 * (обложка с изображением, затемнение снизу, метка, заголовок), но целиком
 * кликабельна и открывает PDF в модальном окне вместо перехода по ссылке.
 */

.tls-dp-carousel { width: 100%; }
.tls-dp-carousel__swiper { width: 100%; overflow: hidden; }

.tls-dp-carousel__slide {
	position: relative;
	aspect-ratio: 410 / 288;
	overflow: hidden;
	background: #1e1e1e;
}

.tls-dp-carousel__slide.is-clickable {
	cursor: pointer;
}

.tls-dp-carousel__slide.is-clickable:focus-visible {
	outline: 2px solid #6d91c6;
	outline-offset: -2px;
}

.tls-dp-carousel__bg {
	position: absolute;
	inset: 0;
}

.tls-dp-carousel__bg-img {
	position: absolute;
	inset: 0;
	background-image: var( --tls-dp-bg-image, none );
	background-size: cover;
	background-position: center;
	transition: transform 0.4s ease;
}

.tls-dp-carousel__slide.is-clickable:hover .tls-dp-carousel__bg-img {
	transform: scale( 1.04 );
}

.tls-dp-carousel__bg-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient( 180deg, rgba( 0, 0, 0, 0 ) 39%, rgba( 0, 0, 0, 0.92 ) 100% );
}

.tls-dp-carousel__content {
	position: absolute;
	inset: 0;
	padding: 1.78em;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.tls-dp-carousel__tag {
	display: inline-block;
	background: rgba( 217, 217, 217, 0.12 );
	color: #ffffff;
	font-size: 15px;
	font-weight: 300;
	padding: 6px 12px;
}

.tls-dp-carousel__title {
	margin: 0;
	margin-top: auto;
	color: #ffffff;
	font-size: 1.4rem;
	line-height: 1.15;
	font-weight: 300;
}

.tls-dp-carousel__nav {
	margin-top: 16px;
	display: flex;
	gap: 12px;
}

.tls-dp-carousel__nav-btn {
	width: 48px;
	height: 48px;
	border: 1px solid #d9d9d9;
	background: #fff;
	color: #111;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.tls-dp-carousel__nav-btn.swiper-button-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Модальное окно с PDF */

.tls-dp-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.tls-dp-modal.is-open { display: flex; }

.tls-dp-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.72 );
}

.tls-dp-modal__dialog {
	position: relative;
	z-index: 1;
	width: min( 760px, 92vw );
	height: 90vh;
	background: #525659;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.tls-dp-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #1e1e1e;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.25 );
}

.tls-dp-modal__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	font-weight: 300;
}

.tls-dp-modal__scroll {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 16px;
}

.tls-dp-modal__page {
	display: block;
	max-width: 100%;
	height: auto;
	background: #fff;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.35 );
}

body.tls-dp-modal-open { overflow: hidden; }

@media ( max-width: 768px ) {
	.tls-dp-modal__dialog {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}
}
