/**
 * Anasayfa slider'ı.
 *
 * Slaytlar üst üste duruyor, geçiş opaklık + hafif ölçek ile.
 * Kaydırmalı (transform) geçiş yerine çapraz solma seçildi: tam
 * genişlikte büyük görsellerde kayma hareketi gözü yoruyor, solma
 * basılı bir eserin sayfa çevirmesine daha yakın duruyor.
 *
 * @package astra-child
 */

.atlas-slider {
	--slider-h: 520px;
	--sl-sahis: #8e2f3c;
	--sl-kurum: #24566f;
	--sl-olay: #7a5c25;
	--sl-notr: #3a3531;
	--sl-accent: var(--sl-sahis);

	position: relative;
	width: 100%;
	height: var(--slider-h);
	overflow: hidden;
	background: #1d1a18;
	isolation: isolate;
}

.atlas-slider__track {
	position: relative;
	width: 100%;
	height: 100%;
}

/* ---------- Slayt ---------- */

.atlas-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transform: scale(1.02);
	transition: opacity 0.6s ease, transform 0.9s ease, visibility 0s linear 0.6s;
}

.atlas-slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
	transition: opacity 0.6s ease, transform 6s ease, visibility 0s;
	z-index: 1;
}

.atlas-slide--sahis { --sl-accent: var(--sl-sahis); }
.atlas-slide--kurum { --sl-accent: var(--sl-kurum); }
.atlas-slide--olay  { --sl-accent: var(--sl-olay); }
.atlas-slide--notr  { --sl-accent: var(--sl-notr); }

.atlas-slide__media {
	position: absolute;
	inset: 0;
}

.atlas-slide__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Görsel yokken: renkli zemin üzerine ince çapraz doku. Boş bir kutu
   yerine kasıtlı görünen bir yer tutucu. */
.atlas-slide__pattern {
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--sl-accent);
	background-image:
		repeating-linear-gradient(
			45deg,
			rgba(255, 255, 255, 0.05) 0,
			rgba(255, 255, 255, 0.05) 12px,
			transparent 12px,
			transparent 26px
		),
		radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.14), transparent 58%);
}

/* Metnin okunması için görselin üstüne koyu geçiş. */
.atlas-slide__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(20, 17, 15, 0.86) 0%,
		rgba(20, 17, 15, 0.66) 42%,
		rgba(20, 17, 15, 0.28) 74%,
		rgba(20, 17, 15, 0.18) 100%
	);
}

.atlas-slide.is-orta .atlas-slide__scrim {
	background: linear-gradient(180deg, rgba(20, 17, 15, 0.42), rgba(20, 17, 15, 0.78));
}

.atlas-slide.is-sag .atlas-slide__scrim {
	background: linear-gradient(
		260deg,
		rgba(20, 17, 15, 0.86) 0%,
		rgba(20, 17, 15, 0.66) 42%,
		rgba(20, 17, 15, 0.28) 74%,
		rgba(20, 17, 15, 0.18) 100%
	);
}

.atlas-slide__inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	height: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.atlas-slide.is-orta .atlas-slide__inner { justify-content: center; }
.atlas-slide.is-sag  .atlas-slide__inner { justify-content: flex-end; }

.atlas-slide__text {
	max-width: 42rem;
	color: #f6f3f0;
}

.atlas-slide.is-orta .atlas-slide__text { text-align: center; }
.atlas-slide.is-sag  .atlas-slide__text { text-align: right; }

.atlas-slide__eyebrow {
	margin: 0 0 10px;
	font-size: 0.78em;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 600;
	color: #fff;
	opacity: 0.82;
}

.atlas-slide__title {
	margin: 0 0 14px;
	font-family: Georgia, "Iowan Old Style", "Nimbus Roman", "Times New Roman", serif;
	font-weight: 600;
	font-size: clamp(28px, 4.4vw, 50px);
	line-height: 1.08;
	letter-spacing: -0.015em;
	color: #fff;
	text-wrap: balance;
}

.atlas-slide__lead {
	margin: 0 0 24px;
	font-size: clamp(15px, 1.5vw, 18px);
	line-height: 1.65;
	color: rgba(246, 243, 240, 0.9);
	max-width: 34rem;
}

.atlas-slide.is-orta .atlas-slide__lead { margin-inline: auto; }
.atlas-slide.is-sag  .atlas-slide__lead { margin-inline: 0 0; margin-left: auto; }

.atlas-slide__cta {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 26px;
	border: 1px solid var(--sl-accent);
	border-radius: 3px;
	background: var(--sl-accent);
	color: #fff;
	text-decoration: none;
	font-size: 0.98em;
	letter-spacing: 0.02em;
	transition: background-color 0.18s ease, border-color 0.18s ease, gap 0.18s ease;
}

.atlas-slide__cta:hover,
.atlas-slide__cta:focus-visible {
	background: #fff;
	border-color: #fff;
	color: #1d1a18;
	gap: 14px;
}

/* ---------- Düğme sıfırlama ---------- */

/*
 * Astra düğmelere padding: 12px 24px veriyor. Kutu modeli border-box
 * olduğu için bu dolgu genişlik kuralımızı eziyordu: 38px istediğimiz
 * ok 50px çıkıyordu. Dolguyu burada sıfırlıyoruz.
 */
.atlas-slider button {
	padding: 0;
	min-width: 0;
	min-height: 0;
	box-shadow: none;
	font-size: inherit;
	line-height: 1;
}

.atlas-slider button:hover,
.atlas-slider button:focus {
	box-shadow: none;
}

/* ---------- Oklar ---------- */

.atlas-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-top: -23px;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 50%;
	background: rgba(20, 17, 15, 0.32);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(3px);
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.atlas-slider__arrow:hover,
.atlas-slider__arrow:focus-visible {
	background: rgba(20, 17, 15, 0.72);
	border-color: #fff;
}

.atlas-slider__arrow--prev { left: 18px; }
.atlas-slider__arrow--next { right: 18px; }

/* ---------- Noktalar ---------- */

.atlas-slider__dots {
	position: absolute;
	left: 50%;
	bottom: 22px;
	z-index: 3;
	display: flex;
	gap: 9px;
	transform: translateX(-50%);
}

.atlas-slider__dot {
	display: block;
	width: 30px;
	height: 16px;
	padding: 6px 0;
	border: none;
	background: none;
	cursor: pointer;
}

.atlas-slider__dot span {
	display: block;
	height: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.42);
	transition: background-color 0.2s ease;
}

.atlas-slider__dot:hover span,
.atlas-slider__dot:focus-visible span {
	background: rgba(255, 255, 255, 0.8);
}

.atlas-slider__dot.is-active span {
	background: #fff;
}

/* ---------- Duraklat ---------- */

.atlas-slider__pause {
	position: absolute;
	right: 18px;
	bottom: 18px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: rgba(20, 17, 15, 0.3);
	cursor: pointer;
}

.atlas-slider__pause:hover,
.atlas-slider__pause:focus-visible {
	border-color: #fff;
	background: rgba(20, 17, 15, 0.7);
}

.atlas-slider__pauseicon {
	display: block;
	width: 9px;
	height: 10px;
	border-left: 3px solid #fff;
	border-right: 3px solid #fff;
}

.atlas-slider.is-paused .atlas-slider__pauseicon {
	width: 0;
	height: 0;
	border: none;
	border-left: 9px solid #fff;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	margin-left: 3px;
}

/* ---------- Dar ekran ---------- */

@media (max-width: 880px) {
	.atlas-slider {
		height: clamp(360px, 62vh, var(--slider-h));
	}

	.atlas-slide__scrim,
	.atlas-slide.is-orta .atlas-slide__scrim,
	.atlas-slide.is-sag .atlas-slide__scrim {
		background: linear-gradient(180deg, rgba(20, 17, 15, 0.48), rgba(20, 17, 15, 0.86));
	}

	.atlas-slide__inner,
	.atlas-slide.is-orta .atlas-slide__inner,
	.atlas-slide.is-sag .atlas-slide__inner {
		justify-content: flex-start;
		align-items: flex-end;
		padding-bottom: 64px;
	}

	.atlas-slide__text,
	.atlas-slide.is-orta .atlas-slide__text,
	.atlas-slide.is-sag .atlas-slide__text {
		text-align: left;
	}

	.atlas-slide.is-sag .atlas-slide__lead { margin-left: 0; }

	.atlas-slider__arrow {
		width: 38px;
		height: 38px;
		margin-top: -19px;
	}

	.atlas-slider__arrow--prev { left: 10px; }
	.atlas-slider__arrow--next { right: 10px; }

	.atlas-slider__dots { bottom: 16px; }
	.atlas-slider__pause { display: none; }
}

/* ---------- Hareket tercihi ---------- */

@media (prefers-reduced-motion: reduce) {
	.atlas-slide,
	.atlas-slide.is-active {
		transition: opacity 0.2s linear;
		transform: none;
	}

	.atlas-slide__cta {
		transition: none;
	}
}
