/* =========================================================
   Egységes oldalháttér — a vendég-főoldal (landing) háttere
   minden oldalon, vendégnek és belépve is.
   Forrás: simple-mode/landing.css body.kmae-marketing (ugyanaz a kép és fehér átfedés).
   Legvégén töltődik be (functions.php kmae_enqueue_site_background),
   ezért a régi sötét belépett háttér (app-shell-dark.css) fölé írja.
   ========================================================= */

/* A kép saját, fix pozíciójú rétegen ül (html::before), nem `background-attachment: fixed`-del:
   az utóbbi görgetéskor minden képkockán újrafesti a hátteret (az üveg-elmosások miatt laggol).
   A réteg külön GPU-rétegre kerül, így görgetéskor nem kell újrarajzolni. */
html::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.42)),
		url("https://albira.hu/wp-content/uploads/2026/09/landing-hatter.webp") center top / cover no-repeat,
		#f3f9ff;
	transform: translateZ(0);
	will-change: transform;
}

/* A body (és a landing body/.kmae-main) háttere átlátszó, hogy a fix réteg látsszon alatta. */
body,
body.kmae-marketing:not(.kmae-faq-page) {
	background: transparent !important;
}

body.kmae-marketing .kmae-main {
	background: transparent;
}

/* A belépett sötét héj díszítő rétegei (ívek, hatszög-háló) a régi hátteret adják, ezért kikapcsoljuk. */
body.kmae-app.kmae-theme-dark::before,
body.kmae-app.kmae-theme-dark::after {
	display: none !important;
}

/* A főtartalom saját háttere ne takarja a közös képet. A landing saját .kmae-main hátterét nem érinti. */
body:not(.kmae-marketing) .kmae-main {
	background: transparent !important;
}

/* Telefon fekvő: minden oldalon állóba kell fordítani. PC-n és állóban rejtve. */
.kmae-browse-rotate {
	display: none;
}

@media (max-width: 1024px) and (orientation: landscape) {
	html,
	body {
		overflow: hidden;
		height: 100%;
	}

	body {
		position: fixed;
		inset: 0;
		width: 100%;
		overscroll-behavior: none;
	}

	.kmae-browse-rotate {
		display: flex;
		position: fixed;
		inset: 0;
		z-index: 2147483647; /* a Lapozó (2147483000) fölött is */
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		width: auto;
		height: auto;
		max-width: none;
		max-height: none;
		margin: 0;
		border: 0;
		padding:
			calc(12px + env(safe-area-inset-top, 0px))
			calc(16px + env(safe-area-inset-right, 0px))
			calc(12px + env(safe-area-inset-bottom, 0px))
			calc(16px + env(safe-area-inset-left, 0px));
		overflow: hidden;
		color: #0b3a66;
		background-color: #eaf4ff;
		background-image:
			radial-gradient(120% 90% at 0% 0%, rgba(255, 170, 80, 0.32), transparent 55%),
			radial-gradient(110% 90% at 100% 100%, rgba(0, 170, 220, 0.3), transparent 55%),
			linear-gradient(160deg, #f6fbff 0%, #e4f1fd 55%, #fdf1e4 100%);
		pointer-events: auto;
		touch-action: none;
	}

	/* finom pontrács a háttéren, középen kifakul */
	.kmae-browse-rotate::before {
		content: "";
		position: absolute;
		inset: 0;
		background-image: radial-gradient(rgba(11, 58, 102, 0.16) 1px, transparent 1.4px);
		background-size: 18px 18px;
		-webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%);
		mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%);
		pointer-events: none;
	}

	/* lebegő fényfoltok */
	.kmae-browse-rotate__aura {
		position: absolute;
		inset: 0;
		pointer-events: none;
	}

	.kmae-browse-rotate__aura span {
		position: absolute;
		border-radius: 50%;
		filter: blur(46px);
		opacity: 0.75;
		animation: kmae-browse-rotate-drift 12s ease-in-out infinite alternate;
	}

	.kmae-browse-rotate__aura span:nth-child(1) {
		top: -90px;
		left: 6%;
		width: 280px;
		height: 280px;
		background: rgba(255, 148, 42, 0.6);
	}

	.kmae-browse-rotate__aura span:nth-child(2) {
		right: 4%;
		bottom: -100px;
		width: 300px;
		height: 300px;
		background: rgba(40, 170, 230, 0.55);
		animation-delay: -4s;
		animation-duration: 14s;
	}

	.kmae-browse-rotate__aura span:nth-child(3) {
		top: 30%;
		left: 42%;
		width: 200px;
		height: 200px;
		background: rgba(120, 210, 255, 0.45);
		animation-delay: -8s;
		animation-duration: 16s;
	}

	.kmae-browse-rotate__card {
		position: relative;
		z-index: 1;
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 22px;
		box-sizing: border-box;
		width: min(640px, 100%);
		max-height: 100%;
		margin: 0;
		padding: 18px 28px 18px 18px;
		border: 1.5px solid transparent;
		border-radius: 32px;
		background:
			linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(228, 243, 255, 0.72)) padding-box,
			linear-gradient(135deg, rgba(0, 199, 247, 0.75), rgba(255, 255, 255, 0.95) 45%, rgba(255, 138, 30, 0.75)) border-box;
		-webkit-backdrop-filter: blur(20px) saturate(1.5);
		backdrop-filter: blur(20px) saturate(1.5);
		box-shadow:
			0 2px 6px rgba(11, 58, 102, 0.08),
			0 16px 34px rgba(11, 58, 102, 0.14),
			0 40px 80px rgba(11, 58, 102, 0.16),
			inset 0 1px 0 rgba(255, 255, 255, 1),
			inset 0 -10px 24px rgba(0, 150, 200, 0.06);
		animation: kmae-browse-rotate-in 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
	}

	/* neon csík fent */
	.kmae-browse-rotate__card::before {
		content: "";
		position: absolute;
		top: -1.5px;
		left: 32px;
		right: 32px;
		height: 3px;
		border-radius: 0 0 3px 3px;
		background: linear-gradient(90deg, #00c7f7, #0096c8 35%, #ff8a1e 70%, #ffad41);
		background-size: 200% 100%;
		box-shadow: 0 0 12px rgba(0, 170, 220, 0.55), 0 0 22px rgba(255, 138, 30, 0.3);
		animation: kmae-browse-rotate-flow 4s linear infinite;
		pointer-events: none;
	}

	.kmae-browse-rotate__art {
		position: relative;
		flex: 0 0 auto;
		width: min(176px, 50vh);
		height: min(176px, 50vh);
	}

	.kmae-browse-rotate__halo {
		position: absolute;
		inset: 14%;
		border-radius: 50%;
		background:
			radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.95), rgba(190, 230, 255, 0.55) 45%, rgba(0, 170, 220, 0.18) 70%, transparent 72%);
		box-shadow:
			0 0 40px rgba(0, 170, 220, 0.35),
			0 0 70px rgba(255, 150, 50, 0.18);
		animation: kmae-browse-rotate-pulse 3.2s ease-in-out infinite;
	}

	.kmae-browse-rotate__ring {
		position: absolute;
		border-radius: 50%;
		pointer-events: none;
	}

	.kmae-browse-rotate__ring--outer {
		inset: -4%;
		border: 1.5px dashed rgba(0, 150, 200, 0.32);
		animation: kmae-browse-rotate-spin 30s linear infinite reverse;
	}

	.kmae-browse-rotate__ring--inner {
		inset: 20%;
		border: 1px solid rgba(255, 138, 30, 0.28);
	}

	.kmae-browse-rotate__orbit {
		position: absolute;
		inset: -4%;
		animation: kmae-browse-rotate-spin 6s linear infinite;
	}

	.kmae-browse-rotate__orbit i {
		position: absolute;
		top: -4px;
		left: 50%;
		width: 9px;
		height: 9px;
		margin-left: -4.5px;
		border-radius: 50%;
		background: radial-gradient(circle at 35% 35%, #ffd39a, #ff7a1e);
		box-shadow: 0 0 10px rgba(255, 122, 30, 0.85), 0 0 20px rgba(255, 122, 30, 0.45);
	}

	.kmae-browse-rotate__arrows,
	.kmae-browse-rotate__phone {
		display: block;
	}

	.kmae-browse-rotate__arrows {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		transform-origin: center;
		filter: drop-shadow(0 3px 6px rgba(11, 58, 102, 0.18));
		animation: kmae-browse-rotate-spin 14s linear infinite;
	}

	.kmae-browse-rotate__phone {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 37.5%;
		height: auto;
		transform: translate(-50%, -50%);
		filter:
			drop-shadow(0 6px 10px rgba(11, 58, 102, 0.22))
			drop-shadow(0 16px 24px rgba(11, 58, 102, 0.16));
		animation: kmae-browse-rotate-tilt 3.2s ease-in-out infinite;
	}

	.kmae-browse-rotate__copy {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		align-items: flex-start;
		min-width: 0;
	}

	.kmae-browse-rotate__chip {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		margin: 0 0 10px;
		padding: 5px 11px 5px 9px;
		border: 1px solid rgba(255, 138, 30, 0.4);
		border-radius: 999px;
		color: #b85000;
		background: linear-gradient(180deg, rgba(255, 245, 232, 0.95), rgba(255, 228, 200, 0.75));
		box-shadow:
			0 2px 6px rgba(255, 122, 30, 0.14),
			inset 0 1px 0 rgba(255, 255, 255, 0.95);
		font-size: 11px;
		font-weight: 800;
		line-height: 1;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.kmae-browse-rotate__chip-dot {
		width: 7px;
		height: 7px;
		border-radius: 50%;
		background: #ff7a1e;
		box-shadow: 0 0 0 0 rgba(255, 122, 30, 0.6);
		animation: kmae-browse-rotate-ping 1.8s ease-out infinite;
	}

	.kmae-browse-rotate__title {
		margin: 0 0 6px;
		color: #0b3a66;
		background: linear-gradient(95deg, #0b3a66 10%, #0a6fa8 60%, #0096c8);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		font-size: 27px;
		font-weight: 850;
		line-height: 1.12;
		letter-spacing: -0.025em;
	}

	.kmae-browse-rotate__lead {
		margin: 0;
		color: #2c5679;
		font-size: 16px;
		font-weight: 500;
		line-height: 1.38;
	}

	.kmae-browse-rotate__steps {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-top: 14px;
	}

	.kmae-browse-rotate__step {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 40px;
		border: 1px solid rgba(255, 255, 255, 0.85);
		border-radius: 14px;
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 255, 0.8));
		box-shadow:
			0 1px 3px rgba(11, 58, 102, 0.08),
			0 6px 14px rgba(11, 58, 102, 0.1),
			inset 0 1px 0 #fff;
	}

	.kmae-browse-rotate__step svg {
		display: block;
	}

	.kmae-browse-rotate__step--from {
		color: #8aa6bf;
	}

	.kmae-browse-rotate__step--from svg {
		width: 26px;
		height: auto;
	}

	.kmae-browse-rotate__step--to {
		color: #0088c0;
		border-color: rgba(0, 170, 220, 0.45);
		box-shadow:
			0 1px 3px rgba(0, 120, 180, 0.1),
			0 6px 16px rgba(0, 150, 200, 0.22),
			0 0 0 4px rgba(0, 170, 220, 0.08),
			inset 0 1px 0 #fff;
	}

	.kmae-browse-rotate__step--to svg {
		width: auto;
		height: 24px;
	}

	.kmae-browse-rotate__check {
		position: absolute;
		top: -6px;
		right: -6px;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 18px;
		height: 18px;
		border: 2px solid #fff;
		border-radius: 50%;
		background: linear-gradient(135deg, #00c7f7, #007fb8);
		box-shadow: 0 2px 6px rgba(0, 127, 184, 0.4);
	}

	.kmae-browse-rotate__check svg {
		width: 10px;
		height: 10px;
	}

	.kmae-browse-rotate__step-arrow {
		display: inline-flex;
		color: #ff8a1e;
		animation: kmae-browse-rotate-nudge 1.6s ease-in-out infinite;
	}

	.kmae-browse-rotate__step-arrow svg {
		display: block;
		width: 30px;
		height: auto;
	}

	@media (max-height: 360px) {
		.kmae-browse-rotate {
			padding:
				calc(8px + env(safe-area-inset-top, 0px))
				calc(12px + env(safe-area-inset-right, 0px))
				calc(8px + env(safe-area-inset-bottom, 0px))
				calc(12px + env(safe-area-inset-left, 0px));
		}

		.kmae-browse-rotate__card {
			gap: 16px;
			padding: 12px 20px 12px 12px;
			border-radius: 24px;
		}

		.kmae-browse-rotate__art {
			width: min(128px, 40vh);
			height: min(128px, 40vh);
		}

		.kmae-browse-rotate__chip {
			margin-bottom: 7px;
			padding: 4px 9px 4px 7px;
			font-size: 10px;
		}

		.kmae-browse-rotate__title {
			margin-bottom: 4px;
			font-size: 21px;
		}

		.kmae-browse-rotate__lead {
			font-size: 14px;
		}

		.kmae-browse-rotate__steps {
			margin-top: 9px;
		}

		.kmae-browse-rotate__step {
			width: 40px;
			height: 32px;
			border-radius: 11px;
		}
	}

	@media (max-height: 290px) {
		.kmae-browse-rotate__steps {
			display: none;
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.kmae-browse-rotate__aura span,
		.kmae-browse-rotate__card,
		.kmae-browse-rotate__card::before,
		.kmae-browse-rotate__halo,
		.kmae-browse-rotate__ring--outer,
		.kmae-browse-rotate__orbit,
		.kmae-browse-rotate__arrows,
		.kmae-browse-rotate__phone,
		.kmae-browse-rotate__chip-dot,
		.kmae-browse-rotate__step-arrow {
			animation: none;
		}
	}
}

@keyframes kmae-browse-rotate-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes kmae-browse-rotate-tilt {
	0%,
	15% {
		transform: translate(-50%, -50%) rotate(-90deg);
	}

	55%,
	85% {
		transform: translate(-50%, -50%) rotate(0deg);
	}

	100% {
		transform: translate(-50%, -50%) rotate(-90deg);
	}
}

@keyframes kmae-browse-rotate-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.96);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes kmae-browse-rotate-flow {
	to {
		background-position: -200% 0;
	}
}

@keyframes kmae-browse-rotate-pulse {
	0%,
	100% {
		transform: scale(0.96);
		opacity: 0.85;
	}

	50% {
		transform: scale(1.04);
		opacity: 1;
	}
}

@keyframes kmae-browse-rotate-drift {
	from {
		transform: translate(0, 0) scale(1);
	}

	to {
		transform: translate(40px, 24px) scale(1.15);
	}
}

@keyframes kmae-browse-rotate-ping {
	0% {
		box-shadow: 0 0 0 0 rgba(255, 122, 30, 0.6);
	}

	80%,
	100% {
		box-shadow: 0 0 0 7px rgba(255, 122, 30, 0);
	}
}

@keyframes kmae-browse-rotate-nudge {
	0%,
	100% {
		transform: translateX(-2px);
		opacity: 0.7;
	}

	50% {
		transform: translateX(3px);
		opacity: 1;
	}
}
