/* =========================================================
   Masiran Hero Slider
   Front-end presentation
   ========================================================= */


/* ---------------------------------------------------------
   Root
   --------------------------------------------------------- */

.masiran-hero {
	position: relative;

	/* Full-bleed: escape Gutenberg / Blocksy content container */
	width: 100vw;
	max-width: none !important;

	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);

	height: clamp(620px, 43vw, 820px);
	min-height: 620px;

	overflow: hidden;
	isolation: isolate;

	background: #0a0a0a;

	font-family: inherit;
	direction: rtl;

	box-sizing: border-box;
}


/* ---------------------------------------------------------
   Slides
   --------------------------------------------------------- */

.masiran-hero__slides {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.masiran-hero__slide {
	position: absolute;
	inset: 0;

	width: 100%;
	height: 100%;

	overflow: hidden;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

    transition:
        opacity var(--masiran-hero-transition, 1000ms) ease,
        visibility var(--masiran-hero-transition, 1000ms) ease;

	z-index: 1;
}

.masiran-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	z-index: 2;
}


/* ---------------------------------------------------------
   Background image
   --------------------------------------------------------- */

.masiran-hero__image {
	position: absolute;
	inset: 0;

	width: 100%;
	height: 100%;

	display: block;

	object-fit: cover;
	object-position: center center;

	user-select: none;
	pointer-events: none;

	transform: scale(1);
	transform-origin: center center;

	will-change: transform;
}


/*
 * Slow cinematic zoom.
 * JS later controls active slide timing.
 */
.masiran-hero[data-slow-zoom="1"]
.masiran-hero__slide.is-active
.masiran-hero__image {
	animation:
	masiranHeroSlowZoom
	var(--masiran-hero-zoom-duration, 7000ms)
	linear
	forwards;
}

@keyframes masiranHeroSlowZoom {

	from {
		transform: scale(1);
	}

	to {
		transform: scale(1.022);
	}
}


/* ---------------------------------------------------------
   Overlay
   --------------------------------------------------------- */

.masiran-hero__overlay {
	position: absolute;
	inset: 0;

	z-index: 2;

	pointer-events: none;
}


/*
 * Extra RTL text protection.
 *
 * This is intentionally subtle.
 * It protects Persian text without making
 * the whole photograph look artificially dark.
 */
.masiran-hero__slide::after {
	content: "";

	position: absolute;
	inset: 0;

	z-index: 3;

	pointer-events: none;

	background:
		linear-gradient(
			270deg,
			rgba(0, 0, 0, 0.52) 0%,
			rgba(0, 0, 0, 0.28) 25%,
			rgba(0, 0, 0, 0.08) 47%,
			rgba(0, 0, 0, 0) 68%
		);
}


/* ---------------------------------------------------------
   Main content container
   --------------------------------------------------------- */

.masiran-hero__container {
	position: relative;
	z-index: 4;

	width: min(100%, 1440px);
	height: 100%;

	margin-inline: auto;

	padding-inline:
		clamp(28px, 5.5vw, 92px);

	display: flex;
	align-items: center;
}


/* ---------------------------------------------------------
   Text positioning
   --------------------------------------------------------- */

.masiran-hero__slide--text-right
.masiran-hero__container {
	justify-content: flex-start;
}

.masiran-hero__slide--text-center
.masiran-hero__container {
	justify-content: center;
}

.masiran-hero__slide--text-left
.masiran-hero__container {
	justify-content: flex-end;
}


.masiran-hero__content {
	width: min(100%, 650px);

	text-align: right;

	transform: translateY(0);
}


.masiran-hero__slide--text-center
.masiran-hero__content {
	text-align: center;
}

.masiran-hero__slide--text-left
.masiran-hero__content {
	text-align: left;
}


/* ---------------------------------------------------------
   Eyebrow
   --------------------------------------------------------- */

.masiran-hero__eyebrow {
	margin: 0 0 14px;

	font-size: clamp(13px, 0.85vw, 16px);
	font-weight: 600;
	line-height: 1.8;

	letter-spacing: 0.01em;
}


/* ---------------------------------------------------------
   Heading
   --------------------------------------------------------- */

.masiran-hero__title {
	margin: 0;

	max-width: 680px;

	font-size: clamp(38px, 3.35vw, 64px);
	font-weight: 800;
	line-height: 1.35;

	letter-spacing: -0.025em;

	text-wrap: balance;
}


/* ---------------------------------------------------------
   Description
   --------------------------------------------------------- */

.masiran-hero__description {
	width: min(100%, 520px);
	max-width: 520px;

	margin-top: 20px;

	font-size: clamp(15px, 1.05vw, 19px);
	font-weight: 400;
	line-height: 2;

	text-wrap: pretty;
}


/* Keep description aligned with the selected text position */

.masiran-hero__slide--text-right
.masiran-hero__description {
	margin-inline-start: 0;
	margin-inline-end: auto;
}

.masiran-hero__slide--text-center
.masiran-hero__description {
	margin-inline: auto;
}

.masiran-hero__slide--text-left
.masiran-hero__description {
	margin-inline-start: auto;
	margin-inline-end: 0;
}


/* ---------------------------------------------------------
   Light theme
   --------------------------------------------------------- */

.masiran-hero__slide--theme-light
.masiran-hero__title {
	color: #ffffff;
}

.masiran-hero__slide--theme-light
.masiran-hero__description {
	color: rgba(255, 255, 255, 0.78);
}

.masiran-hero__slide--theme-light
.masiran-hero__eyebrow {
	color: rgba(255, 255, 255, 0.72);
}


/* ---------------------------------------------------------
   Dark theme
   --------------------------------------------------------- */

.masiran-hero__slide--theme-dark
.masiran-hero__title {
	color: #17191c;
}

.masiran-hero__slide--theme-dark
.masiran-hero__description {
	color: rgba(23, 25, 28, 0.72);
}

.masiran-hero__slide--theme-dark
.masiran-hero__eyebrow {
	color: rgba(23, 25, 28, 0.64);
}


/* ---------------------------------------------------------
   Actions
   --------------------------------------------------------- */

.masiran-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;

	margin-top: 30px;
}


.masiran-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 48px;

	padding: 11px 24px;

	border: 1px solid transparent;
	border-radius: 4px;

	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;

	text-decoration: none !important;

	cursor: pointer;

	transition:
		background-color 220ms ease,
		border-color 220ms ease,
		color 220ms ease,
		transform 220ms ease,
		box-shadow 220ms ease;
}


.masiran-hero__button:hover {
	transform: translateY(-2px);
}


/* Primary CTA */

.masiran-hero__button--primary {
	color: #ffffff !important;
	background: #e10600;
	border-color: #e10600;
}

.masiran-hero__button--primary:hover {
	color: #ffffff !important;
	background: #c90601;
	border-color: #c90601;

	box-shadow:
		0 9px 28px rgba(225, 6, 0, 0.24);
}


/* Secondary CTA */

.masiran-hero__slide--theme-light
.masiran-hero__button--secondary {
	color: #ffffff !important;

	background:
		rgba(255, 255, 255, 0.06);

	border-color:
		rgba(255, 255, 255, 0.38);

	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.masiran-hero__slide--theme-light
.masiran-hero__button--secondary:hover {
	background:
		rgba(255, 255, 255, 0.13);

	border-color:
		rgba(255, 255, 255, 0.65);
}


/* ---------------------------------------------------------
   Content reveal
   --------------------------------------------------------- */

.masiran-hero__eyebrow,
.masiran-hero__title,
.masiran-hero__description,
.masiran-hero__actions {
	opacity: 0;

	transform: translateY(18px);

	transition:
		opacity 650ms ease,
		transform 750ms cubic-bezier(.22, .61, .36, 1);
}


.masiran-hero__slide.is-active
.masiran-hero__eyebrow {
	opacity: 1;
	transform: translateY(0);

	transition-delay: 180ms;
}


.masiran-hero__slide.is-active
.masiran-hero__title {
	opacity: 1;
	transform: translateY(0);

	transition-delay: 230ms;
}


.masiran-hero__slide.is-active
.masiran-hero__description {
	opacity: 1;
	transform: translateY(0);

	transition-delay: 340ms;
}


.masiran-hero__slide.is-active
.masiran-hero__actions {
	opacity: 1;
	transform: translateY(0);

	transition-delay: 450ms;
}


/* ---------------------------------------------------------
   Navigation arrows
   --------------------------------------------------------- */

.masiran-hero__navigation {
	position: absolute;

	left: clamp(22px, 3vw, 52px);
	bottom: clamp(30px, 3.2vw, 52px);

	z-index: 8;

	display: flex;
	align-items: center;
	gap: 8px;

    direction: ltr;
}


.masiran-hero__arrow {
	width: 44px;
	height: 44px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	padding: 0;

	border:
		1px solid rgba(255, 255, 255, 0.25);

	border-radius: 50%;

	color: #ffffff;

	background:
		rgba(10, 10, 10, 0.25);

	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);

	cursor: pointer;

	transition:
		background-color 200ms ease,
		border-color 200ms ease,
		transform 200ms ease;
}


.masiran-hero__arrow span {
	display: block;

	font-family: Arial, sans-serif;
	font-size: 19px;
	line-height: 1;
}


.masiran-hero__arrow:hover {
	background:
		rgba(255, 255, 255, 0.13);

	border-color:
		rgba(255, 255, 255, 0.58);

	transform: scale(1.04);
}


.masiran-hero__arrow:focus-visible,
.masiran-hero__button:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}


/* ---------------------------------------------------------
   Pagination / progress
   --------------------------------------------------------- */

.masiran-hero__pagination {
	position: absolute;

	right: clamp(28px, 5.5vw, 92px);
	bottom: clamp(33px, 3.4vw, 55px);

	z-index: 8;

	display: flex;
	align-items: center;
	gap: 12px;

	color: rgba(255, 255, 255, 0.75);

	font-family:
		Arial,
		sans-serif;

	font-size: 12px;
	font-weight: 600;

	direction: ltr;
}


.masiran-hero__current {
	color: #ffffff;
}


.masiran-hero__progress {
	position: relative;

	display: block;

	width: 92px;
	height: 1px;

	overflow: hidden;

	background:
		rgba(255, 255, 255, 0.28);
}


.masiran-hero__progress-bar {
	position: absolute;

	inset-block: 0;
	left: 0;

	width: 0%;
	height: 100%;

	background: #ffffff;
}


/* JS adds this class later */

.masiran-hero.is-running
.masiran-hero__progress-bar {
	animation:
	masiranHeroProgress
	var(--masiran-hero-delay, 6500ms)
	linear
	forwards;
}

.masiran-hero.is-paused
.masiran-hero__progress-bar {
	animation-play-state: paused;
}


@keyframes masiranHeroProgress {

	from {
		width: 0%;
	}

	to {
		width: 100%;
	}
}

/* ---------------------------------------------------------
   Full viewport hero — large desktop
   --------------------------------------------------------- */

@media (min-width: 1200px) {

	.masiran-hero {
		height: 100vh;
		height: 100svh;
		min-height: 620px;
	}

}



/* ---------------------------------------------------------
   Desktop content positioning
   --------------------------------------------------------- */

@media (min-width: 1000px) {

	.masiran-hero__slide--text-right
	.masiran-hero__content {
		transform:
			translateX(
				clamp(
					0px,
					calc(20vw - 200px),
					40px
				)
			);
	}

}

/* =========================================================
   Responsive
   ========================================================= */


/* ---------------------------------------------------------
   <= 1199px
   --------------------------------------------------------- */

@media (max-width: 1199px) {

    .masiran-hero {
        height: 620px;
        min-height: 620px;
    }

	.masiran-hero__container {
		padding-inline:
			clamp(28px, 5vw, 60px);
	}

	.masiran-hero__content {
		width: min(100%, 570px);
	}

	.masiran-hero__title {
		font-size:
			clamp(38px, 3.35vw, 42px);
	}

	.masiran-hero__description {
		max-width: 520px;
	}

	.masiran-hero__pagination {
		right:
			clamp(28px, 5vw, 60px);
	}

}

/* ---------------------------------------------------------
   <= 999px — image crop calibration
   --------------------------------------------------------- */

@media (max-width: 999px) {

	.masiran-hero__image {
		object-position: 40% center;
	}

}

/* ---------------------------------------------------------
   <= 781px
   --------------------------------------------------------- */

@media (max-width: 781px) {

    .masiran-hero {
        height: 620px;
        min-height: 620px;
    }

	.masiran-hero__slide::after {
		background:
			linear-gradient(
				180deg,
				rgba(0, 0, 0, 0.12) 0%,
				rgba(0, 0, 0, 0.20) 37%,
				rgba(0, 0, 0, 0.78) 100%
			);
	}

    .masiran-hero__container {
        align-items: flex-end;

        padding:
            40px clamp(20px, 3.6vw, 28px) 112px;
    }

	.masiran-hero__content,
	.masiran-hero__slide--text-center
	.masiran-hero__content,
	.masiran-hero__slide--text-left
	.masiran-hero__content {
		width: 100%;
		max-width: 620px;

		text-align: right;
	}

	.masiran-hero__title {
		font-size:
			clamp(32px, 5vw, 38px);

		line-height: 1.4;
	}

	.masiran-hero__description {
		max-width: 520px;

		font-size: 15px;
		line-height: 1.95;

		margin-top: 16px;
	}

	.masiran-hero__actions {
		margin-top: 24px;
	}

	.masiran-hero__navigation {
		left: 28px;
		bottom: 34px;
	}

	.masiran-hero__pagination {
		right: 28px;
		bottom: 45px;
	}

}

/* ---------------------------------------------------------
   782px–999px — smooth tablet content transition
   --------------------------------------------------------- */

@media (min-width: 782px) and (max-width: 999px) {

	.masiran-hero__content {
		transform:
			translateY(
				clamp(
					0px,
					calc(480px - 48vw),
					105px
				)
			);
	}

}

/* ---------------------------------------------------------
   <= 520px
   --------------------------------------------------------- */

@media (max-width: 520px) {

    .masiran-hero {
        height: 610px;
        min-height: 610px;
    }

	.masiran-hero__container {
		padding:
			32px 20px 105px;
	}

	.masiran-hero__title {
		font-size: 32px;
		line-height: 1.45;
	}

	.masiran-hero__description {
		font-size: 14px;
		line-height: 1.9;
	}

	.masiran-hero__actions {
		gap: 9px;
	}

	.masiran-hero__button {
		min-height: 45px;

		padding:
			9px 17px;

		font-size: 13px;
	}

	.masiran-hero__navigation {
		left: 20px;
		bottom: 30px;
	}

	.masiran-hero__arrow {
		width: 40px;
		height: 40px;
	}

	.masiran-hero__pagination {
		right: 20px;
		bottom: 42px;

		gap: 9px;
	}

	.masiran-hero__progress {
		width: 58px;
	}

}


/* =========================================================
   Reduced motion / accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.masiran-hero__slide,
	.masiran-hero__image,
	.masiran-hero__eyebrow,
	.masiran-hero__title,
	.masiran-hero__description,
	.masiran-hero__actions,
	.masiran-hero__progress-bar,
	.masiran-hero__button,
	.masiran-hero__arrow {
		animation: none !important;
		transition-duration: 0.01ms !important;
	}

	.masiran-hero__image {
		transform: none !important;
	}

}

/* =========================================================
   Responsive image source
   ========================================================= */

.masiran-hero__picture {
	position: absolute;
	inset: 0;

	display: block;

	width: 100%;
	height: 100%;
}


/* ---------------------------------------------------------
   Toyota mobile hero
   Source image ratio: 6:5
   --------------------------------------------------------- */

@media (max-width: 781px) {

	.masiran-hero {
		height: clamp(360px, 83.333vw, 620px);
		min-height: 0;
	}

	.masiran-hero__image {
		object-fit: cover;
		object-position: center center;
	}

}

/* Preserve desktop Toyota composition on narrower desktops */

@media (min-width: 1000px) {

	.masiran-hero {
		height: clamp(500px, 46.875vw, 900px);
		min-height: 0;
	}

}

/* Ultra-wide desktop — fill the remaining viewport height */

@media (min-width: 1000px) and (min-aspect-ratio: 2/1) {

	.masiran-hero {
		height: 100vh;
		height: 100svh;
	}

}

/* =========================================================
   Toyota lineup — subtle symmetric cinematic edge shading
   ========================================================= */

.masiran-hero__slide[data-slide-id="toyota-lineup-2026"]::after {
	background:
		linear-gradient(
			90deg,
			rgba(0, 0, 0, 0.10) 0%,
			rgba(0, 0, 0, 0.04) 9%,
			rgba(0, 0, 0, 0) 20%,
			rgba(0, 0, 0, 0) 80%,
			rgba(0, 0, 0, 0.04) 91%,
			rgba(0, 0, 0, 0.10) 100%
		);
}