/***************************************************
 * HERO SLIDER — PT Niaga Nusa Abadi
 * ------------------------------------------------
 * Slider banner sinematik: layered parallax push
 * (Swiper creative effect) + curtain reveal + Ken Burns.
 * Mendukung media foto maupun video.
 *
 * 01. Shell & tinggi responsif
 * 02. Slide & layer media
 * 03. Curtain reveal + Ken Burns
 * 04. Overlay & konten
 * 05. Kontrol (pagination, arrow, progress)
 * 06. Responsive
 * 07. Reduced motion
 ***************************************************/

/* ============================================
   01. SHELL
   ============================================ */
.nna-hero {
	position: relative;
}

.nna-hero-slider {
	position: relative;
	overflow: hidden;
	border-radius: 0 0 24px 24px;
	background-color: var(--nna-blue-deep, #171a4d);
	/* Satu layar penuh. max-height dilepas — dulu dikunci
	   900px, jadi di monitor tinggi hero berhenti sebelum
	   menyentuh dasar layar dan section berikutnya ikut
	   terlihat. */
	height: 100vh;
	min-height: 560px;
}

/* svh menghitung tinggi layar TANPA address bar mobile,
   jadi hero tidak melompat saat bar-nya muncul/hilang
   waktu discroll. */
@supports (height: 100svh) {
	.nna-hero-slider {
		height: 100svh;
	}
}

.nna-hero-slider .swiper-wrapper {
	/* easing khusus supaya push-nya terasa "berat" & sinematik */
	transition-timing-function: cubic-bezier(0.72, 0, 0.16, 1);
}

/* ============================================
   02. SLIDE & MEDIA
   ============================================ */
.nna-hero-slide {
	position: relative;
	overflow: hidden;
}

.nna-hero-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.nna-hero-media img,
.nna-hero-media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* Video ditumpuk di atas <img>. Kalau video gagal dimuat,
   foto di bawahnya tetap tampil — tidak ada layar kosong. */
.nna-hero-media video {
	position: absolute;
	inset: 0;
}

.nna-hero-media video.is-failed {
	display: none;
}

/* Lapisan zoom terpisah dari clip-path supaya transform tidak bentrok */
.nna-hero-media-inner {
	position: absolute;
	inset: 0;
	transform: scale(1.16);
	transition: transform 1.2s cubic-bezier(0.72, 0, 0.16, 1);
	will-change: transform;
}

/* ============================================
   03. STATE AKTIF — depth reveal + Ken Burns
   Slide masuk: media "mendorong" dari skala besar ke
   normal, berlawanan arah dengan slide keluar yang
   mengecil (creativeEffect). Itu yang bikin transisinya
   terasa berlapis, bukan sekadar geser.
   ============================================ */
.nna-hero-slide.swiper-slide-active .nna-hero-media-inner {
	transform: scale(1);
	/* Ken Burns lambat selama slide aktif */
	animation: nnaKenBurns 9s ease-out 1.1s forwards;
}

@keyframes nnaKenBurns {
	from { transform: scale(1); }
	to   { transform: scale(1.09); }
}

/* ============================================
   04. OVERLAY & KONTEN
   ============================================ */
.nna-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(15, 17, 54, 0.9) 0%, rgba(15, 17, 54, 0.62) 42%, rgba(15, 17, 54, 0.18) 72%, rgba(15, 17, 54, 0.05) 100%),
		linear-gradient(0deg, rgba(15, 17, 54, 0.72) 0%, rgba(15, 17, 54, 0) 45%);
}

.nna-hero-body {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center;
}

.nna-hero-content {
	max-width: 800px;
	padding: 0 0 90px;
	color: var(--nna-white, #fff);
}

/* Default: konten TERLIHAT. Kalau JS gagal atau transisi CSS tidak
   jalan, banner tetap terbaca — tidak pernah blank. */
.nna-hero-content > * {
	opacity: 1;
	transform: none;
}

/* Animasi baru dinyalakan setelah JS menandai slider siap (.is-ready). */
.nna-hero-slider.is-ready .nna-hero-content > * {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.75s ease-out, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-content > * {
	opacity: 1;
	transform: translateY(0);
}

/* stagger */
.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-eyebrow { transition-delay: 0.25s; }
.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-title   { transition-delay: 0.38s; }
.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-text    { transition-delay: 0.5s; }
.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-actions { transition-delay: 0.62s; }

.nna-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	margin-bottom: 22px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 100px;
	background-color: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nna-hero-eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background-color: var(--nna-orange, #f37021);
}

.nna-hero-title {
	margin: 0 0 20px;
	color: var(--nna-white, #fff);
	font-size: clamp(2.6rem, 6.5vw, 5.4rem);
	font-weight: 700;
	line-height: 1.06;
	letter-spacing: -0.025em;
}

.nna-hero-title em {
	font-style: normal;
	color: var(--nna-orange, #f37021);
}

.nna-hero-text {
	margin: 0 0 34px;
	max-width: 520px;
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(1.05rem, 1.35vw, 1.22rem);
	line-height: 1.7;
}

.nna-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* ============================================
   05. KONTROL
   ============================================ */
.nna-hero-controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 0 0 30px;
}

.nna-hero-controls-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

/* --- pagination bernomor --- */
.nna-hero-pagination {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.nna-hero-tab {
	position: relative;
	min-width: 108px;
	padding: 12px 4px 0;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: left;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.3s ease;
}

.nna-hero-tab::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background-color: rgba(255, 255, 255, 0.25);
}

/* garis progress mengikuti durasi autoplay */
.nna-hero-tab::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--nna-orange, #f37021);
	transform: scaleX(0);
	transform-origin: left center;
}

.nna-hero-tab:hover,
.nna-hero-tab.is-active {
	color: var(--nna-white, #fff);
}

.nna-hero-tab.is-active::after {
	animation: nnaTabProgress var(--nna-hero-duration, 7000ms) linear forwards;
}

.nna-hero-tab.is-done::after {
	transform: scaleX(1);
}

/* saat autoplay dihentikan (hover / reduced motion) */
.nna-hero-slider.is-paused .nna-hero-tab.is-active::after {
	animation-play-state: paused;
}

@keyframes nnaTabProgress {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

/* --- arrow + counter --- */
.nna-hero-nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nna-hero-arrow {
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--nna-white, #fff);
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.nna-hero-arrow:hover {
	background-color: var(--nna-orange, #f37021);
	border-color: var(--nna-orange, #f37021);
	transform: translateY(-2px);
}

.nna-hero-arrow:focus-visible {
	outline: 2px solid var(--nna-orange, #f37021);
	outline-offset: 3px;
}

.nna-hero-count {
	min-width: 62px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: right;
}

.nna-hero-count b {
	color: var(--nna-white, #fff);
	font-size: 16px;
}

/* tombol mute hanya tampil di slide video */
.nna-hero-sound {
	display: none;
}

.nna-hero-slider.has-video-active .nna-hero-sound {
	display: inline-flex;
}

/* ============================================
   06. RESPONSIVE
   ============================================ */
@media (max-width: 1199px) {
	.nna-hero-content {
		max-width: 560px;
		padding-bottom: 96px;
	}
}

@media (max-width: 991px) {
	.nna-hero {
		padding: 0 14px;
	}

	.nna-hero-slider {
		height: 100vh;
		min-height: 520px;
		border-radius: 20px;
	}

	.nna-hero-overlay {
		background:
			linear-gradient(90deg, rgba(15, 17, 54, 0.88) 0%, rgba(15, 17, 54, 0.55) 60%, rgba(15, 17, 54, 0.3) 100%),
			linear-gradient(0deg, rgba(15, 17, 54, 0.8) 0%, rgba(15, 17, 54, 0) 55%);
	}
}

@media (max-width: 767px) {
	.nna-hero {
		padding: 0 10px;
	}

	.nna-hero-slider {
		height: 100vh;
		min-height: 470px;
		border-radius: 16px;
	}

	@supports (height: 100svh) {
		.nna-hero-slider {
			height: 100svh;
		}
	}

	.nna-hero-content {
		max-width: 100%;
		padding-bottom: 130px;
	}

	.nna-hero-text {
		margin-bottom: 26px;
	}

	.nna-hero-actions .nna-btn {
		flex: 1 1 100%;
	}

	/* kontrol ditumpuk supaya tidak sempit */
	.nna-hero-controls-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.nna-hero-pagination {
		gap: 8px;
	}

	/* di mobile label teks disembunyikan, sisakan garis progress saja */
	.nna-hero-tab {
		min-width: 0;
		flex: 1 1 0;
		font-size: 0;
		padding-top: 10px;
	}

	.nna-hero-nav {
		justify-content: flex-end;
	}
}

@media (max-width: 575px) {
	.nna-hero-slider {
		height: 100svh;
		min-height: 440px;
	}

	.nna-hero-arrow {
		width: 42px;
		height: 42px;
	}
}

/* ============================================
   07. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
	.nna-hero-media-inner,
	.nna-hero-content > * {
		transition: none;
	}

	.nna-hero-media-inner,
	.nna-hero-slide.swiper-slide-active .nna-hero-media-inner {
		transform: none;
		animation: none;
	}

	.nna-hero-slider.is-ready .nna-hero-content > *,
	.nna-hero-slider.is-ready .nna-hero-slide.is-active .nna-hero-content > * {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.nna-hero-tab.is-active::after {
		animation: none;
		transform: scaleX(1);
	}
}
