/**
 * Front Page Advanced Styles
 */

:root {
	--primary-bg: #dce8ef;
	--primary-blue: #0073aa;
	--secondary-blue: #005a87;
	--dark-blue: #003d5c;
}

html, body {
	scroll-behavior: smooth;
}

body.front-page {
	background-color: var(--primary-bg);
	overflow-x: hidden;
}

/* Fullscreen Container */
.fullscreen-container {
	width: 100%;
	height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}

/* Screens Container */
.screens-wrapper {
	display: flex;
	width: 100%;
	height: 100%;
	overflow: hidden;
	transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	direction: rtl; /* RTL flex: first child = rightmost, last = leftmost */
}

.screens-wrapper.is-scrolling {
	pointer-events: none;
}

/* Individual Screen */
.screen {
	width: 100%;
	min-width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 40px 320px;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
	direction: rtl; /* restore RTL for Hebrew content inside each screen */
}

.screen-1 {
	background: linear-gradient(135deg, var(--primary-bg) 0%, #c5d9e6 100%);
}

.screen-2 {
	background: linear-gradient(135deg, #b3cadb 0%, var(--primary-bg) 100%);
}

.screen-3 {
	background: linear-gradient(135deg, var(--primary-bg) 0%, #e5f0f7 100%);
}

/* Screen Content */
.screen-content {
	max-width: 800px;
	width: 100%;
	text-align: center;
	opacity: 0;
	transform: translateY(40px);
	animation: slideInUp 0.8s ease-out forwards;
	animation-delay: 0.3s;
}

@keyframes slideInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.screen-content h1 {
	font-size: 4em;
	margin-bottom: 20px;
	color: var(--dark-blue);
	font-weight: 800;
	letter-spacing: -2px;
}

.screen-content p {
	font-size: 1.4em;
	color: var(--secondary-blue);
	line-height: 1.8;
	margin-bottom: 40px;
}

.screen-content .cta-button {
	display: inline-block;
	padding: 15px 40px;
	background-color: var(--primary-blue);
	color: white;
	border-radius: 50px;
	font-size: 1.1em;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
	border: none;
	box-shadow: 0 10px 30px rgba(0, 115, 170, 0.3);
}

.screen-content .cta-button:hover {
	background-color: var(--secondary-blue);
	transform: translateY(-3px);
	box-shadow: 0 15px 40px rgba(0, 115, 170, 0.4);
}

/* Navigation */
.horizontal-nav {
	position: fixed;
	top: 30px;
	right: 40px;
	display: flex;
	gap: 15px;
	z-index: 100;
	align-items: center;
}

.nav-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: rgba(0, 61, 92, 0.3);
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.nav-dot.active {
	background-color: var(--dark-blue);
	transform: scale(1.3);
	box-shadow: 0 0 15px rgba(0, 115, 170, 0.5);
}

.nav-dot:hover {
	background-color: var(--secondary-blue);
	transform: scale(1.2);
}

/* Screen Counter */
.screen-counter {
	position: fixed;
	bottom: 320px;
	right: 40px;
	font-size: 1.2em;
	color: var(--dark-blue);
	font-weight: 600;
	z-index: 50;
}

.screen-counter span {
	display: inline-block;
	min-width: 30px;
	text-align: center;
}

/*
 * Waves container sits OUTSIDE the scrolling wrapper (no overflow:hidden parent).
 * It's fixed to the viewport bottom so it's always visible.
 * The SVG inside is 300vw wide; JS moves it in sync with screen transitions
 * so each screen reveals its own third of the wave design.
 */
.waves-container {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 300%;
	height: 300px;
	overflow: hidden;
	z-index: 20;
	pointer-events: none;
}

.waves-container svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 300vw;
	height: 100%;
	display: block;
	transform: translateX(0);
	transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

/* Navigation Arrows */
.nav-arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 50;
	background: rgba(0, 61, 92, 0.75);
	border: none;
	border-radius: 50%;
	width: 64px;
	height: 64px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
	color: white;
	backdrop-filter: blur(4px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	padding: 0;
}

.nav-arrow:hover {
	background: var(--primary-blue);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 8px 30px rgba(0, 115, 170, 0.4);
}

.nav-arrow.hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) scale(0.8);
}

.nav-arrow-right {
	right: 20px;
}

.nav-arrow-left {
	left: 20px;
}

.nav-arrow svg {
	width: 32px;
	height: 32px;
}

/* Scroll Indicator */
.scroll-indicator {
	position: absolute;
	bottom: 230px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 30;
	animation: bounce 2s infinite;
}

@keyframes bounce {
	0%, 100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(-10px);
	}
}

.scroll-indicator p {
	font-size: 0.9em;
	color: var(--secondary-blue);
	margin-bottom: 8px;
}

.scroll-arrow {
	width: 24px;
	height: 24px;
	border-right: 2px solid var(--secondary-blue);
	border-bottom: 2px solid var(--secondary-blue);
	transform: rotate(-45deg);
	animation: slideDown 1s infinite;
}

@keyframes slideDown {
	0% {
		opacity: 0;
		transform: rotate(-45deg) translateY(-10px);
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: rotate(-45deg) translateY(10px);
	}
}

/* Intro Animation Overlay */
.intro-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: white;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-overlay.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.intro-svg {
	width: 300px;
	height: 300px;
}

/* Responsive */
@media (max-width: 1024px) {
	.screen-content h1 {
		font-size: 3em;
	}

	.screen-content p {
		font-size: 1.2em;
	}

	.horizontal-nav {
		right: 20px;
		top: 20px;
	}

	.screen-counter {
		right: 20px;
		bottom: 220px;
	}
}

@media (max-width: 768px) {
	.screen {
		padding: 40px 20px;
	}

	.screen-content h1 {
		font-size: 2.2em;
	}

	.screen-content p {
		font-size: 1em;
	}

	.screen-content .cta-button {
		padding: 12px 30px;
		font-size: 1em;
	}

	.waves-container {
		height: 180px;
	}

	.screen-counter {
		bottom: 200px;
	}

	.scroll-indicator {
		bottom: 140px;
	}

	.horizontal-nav {
		gap: 10px;
	}

	.nav-dot {
		width: 10px;
		height: 10px;
	}
}

@media (max-width: 480px) {
	.fullscreen-container {
		height: auto;
		min-height: 100vh;
	}

	.screens-wrapper {
		flex-direction: column;
		height: auto;
		gap: 0;
	}

	.screen {
		width: 100%;
		height: 100vh;
		padding: 30px 15px;
	}

	.screen-content h1 {
		font-size: 1.8em;
	}

	.screen-content p {
		font-size: 0.95em;
	}

	.horizontal-nav {
		flex-direction: column;
		right: 15px;
		top: 15px;
	}

	.screen-counter {
		display: none;
	}

	.scroll-indicator {
		display: none;
	}

	.waves-container {
		height: 120px;
	}
}
