/* ========================================================================
   NIERUCHOMOŚCI — EXTRAS (Hero overhaul + section visual upgrades)
   Loaded after nieruchomosci.css. Overrides via specificity.
   ======================================================================== */

/* ========== HERO: dark background + canvas layers ========== */
.re-hero {
	background:
		radial-gradient(ellipse at 20% 30%, rgba(16,185,129,0.18), transparent 55%),
		radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.12), transparent 55%),
		radial-gradient(ellipse at 50% 100%, rgba(16,185,129,0.10), transparent 60%),
		linear-gradient(180deg, #050B17 0%, #0A1628 45%, #0E1B30 100%);
	color: #E2E8F0;
	isolation: isolate;
}

/* Hide the legacy <video> background completely */
.re-hero .re-hero__video {
	display: none !important;
}

/* Soft starfield grid behind everything */
.re-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(16,185,129,0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(16,185,129,0.06) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	pointer-events: none;
	z-index: 0;
}

/* Override existing overlay → softer, dark */
.re-hero .re-hero__overlay {
	background: linear-gradient(180deg, rgba(5,11,23,0.0) 0%, rgba(5,11,23,0.65) 100%);
	z-index: 2;
}

/* ----- Canvas layers ----- */
.re-hero__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

#reHeroSkyline   { z-index: 1; opacity: 0.95; }
#reHeroMap       { z-index: 1; opacity: 0.55; }
#reHeroBlueprint { z-index: 1; opacity: 0.40; }
#reParticlesCanvas { z-index: 3; opacity: 0.85; }

/* ----- Floating decorative pins (CSS-only) ----- */
.re-hero__pins {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.re-hero__pin {
	position: absolute;
	width: 14px;
	height: 14px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	background: linear-gradient(135deg, #34D399, #10B981);
	box-shadow: 0 0 24px rgba(16,185,129,0.65), 0 0 4px rgba(255,255,255,0.6) inset;
	animation: rePinFloat 6s ease-in-out infinite;
}
.re-hero__pin::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: #FFFFFF;
}
.re-hero__pin--1 { top: 22%; left: 18%; animation-delay: 0s; }
.re-hero__pin--2 { top: 55%; left: 9%;  animation-delay: 1.2s; background: linear-gradient(135deg,#FBBF24,#F59E0B); box-shadow: 0 0 24px rgba(245,158,11,0.65); }
.re-hero__pin--3 { top: 70%; left: 30%; animation-delay: 2.4s; }
.re-hero__pin--4 { top: 18%; right: 32%; animation-delay: 0.8s; }
.re-hero__pin--5 { top: 60%; right: 14%; animation-delay: 2s; background: linear-gradient(135deg,#FBBF24,#F59E0B); box-shadow: 0 0 24px rgba(245,158,11,0.65); }
.re-hero__pin--6 { top: 35%; right: 6%;  animation-delay: 3s; }
@keyframes rePinFloat {
	0%, 100% { transform: rotate(-45deg) translateY(0); }
	50%      { transform: rotate(-45deg) translateY(-10px); }
}

/* ----- Pulse rings around two pins ----- */
.re-hero__pin::before {
	content: "";
	position: absolute;
	inset: -8px;
	border-radius: 50%;
	border: 1.5px solid rgba(52,211,153,0.55);
	animation: rePinPulse 2.6s ease-out infinite;
}
.re-hero__pin--2::before, .re-hero__pin--5::before { border-color: rgba(251,191,36,0.55); }
@keyframes rePinPulse {
	0%   { transform: scale(0.7); opacity: 0.9; }
	100% { transform: scale(2.2); opacity: 0; }
}

/* ----- Hero title shimmer + gradient upgrade ----- */
.re-hero__title { position: relative; }
.re-hero .re-gradient-text {
	background: linear-gradient(110deg, #34D399 0%, #FBBF24 50%, #34D399 100%);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: reTitleShimmer 8s linear infinite;
}
@keyframes reTitleShimmer {
	0%   { background-position: 0% 50%; }
	100% { background-position: 200% 50%; }
}

/* ----- Stat number glow + bar accent ----- */
.re-hero__stat {
	position: relative;
	padding: 14px 8px 12px;
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(16,185,129,0.06), rgba(16,185,129,0.0));
	border: 1px solid rgba(16,185,129,0.18);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.re-hero__stat:hover {
	transform: translateY(-4px);
	border-color: rgba(52,211,153,0.45);
	background: linear-gradient(180deg, rgba(16,185,129,0.12), rgba(16,185,129,0.02));
}
.re-hero__stat-number {
	text-shadow: 0 0 24px rgba(52,211,153,0.45);
}
.re-hero__stat::after {
	content: "";
	position: absolute;
	left: 20%; right: 20%; bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, #34D399, transparent);
	opacity: 0.7;
}

/* ----- Agency mockup glow upgrade ----- */
.re-agency-mockup {
	box-shadow:
		0 30px 80px rgba(0,0,0,0.55),
		0 0 0 1px rgba(52,211,153,0.25),
		0 0 60px -10px rgba(16,185,129,0.45);
	transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
	transition: transform .6s ease;
}
.re-agency-mockup:hover {
	transform: perspective(1400px) rotateY(-2deg) rotateX(0deg);
}

/* ========== TRUST BAR upgrade ========== */
.re-trust-bar {
	background: linear-gradient(180deg, #050B17 0%, #0A1628 100%);
	border-top: 1px solid rgba(16,185,129,0.2);
	border-bottom: 1px solid rgba(16,185,129,0.2);
	position: relative;
	overflow: hidden;
}
.re-trust-bar::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(52,211,153,0.08), transparent);
	background-size: 200% 100%;
	animation: reTrustSweep 8s linear infinite;
}
@keyframes reTrustSweep {
	0%   { background-position: -100% 0; }
	100% { background-position: 200% 0; }
}
.re-trust-item {
	position: relative;
	transition: transform .3s ease;
}
.re-trust-item:hover { transform: translateY(-3px); }
.re-trust-item__icon {
	color: #34D399 !important;
	filter: drop-shadow(0 0 8px rgba(52,211,153,0.55));
}

/* ========== SECTION cards: shared upgrades ========== */
.section--dark { position: relative; }
.section--dark::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(16,185,129,0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(16,185,129,0.04) 1px, transparent 1px);
	background-size: 80px 80px;
	mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
	pointer-events: none;
}
.section--dark .container { position: relative; z-index: 1; }

/* Service cards: animated border + lift */
.re-service-card {
	position: relative;
	overflow: hidden;
	transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.re-service-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(16,185,129,0.18), transparent 40%);
	opacity: 0;
	transition: opacity .4s ease;
	pointer-events: none;
}
.re-service-card:hover::before { opacity: 1; }
.re-service-card:hover {
	transform: translateY(-8px);
	border-color: rgba(52,211,153,0.55) !important;
	box-shadow: 0 25px 60px -20px rgba(16,185,129,0.4), 0 0 0 1px rgba(52,211,153,0.25);
}
.re-service-card__icon {
	position: relative;
	transition: transform .4s ease;
}
.re-service-card:hover .re-service-card__icon {
	transform: scale(1.08) rotate(-4deg);
	filter: drop-shadow(0 0 16px rgba(52,211,153,0.6));
}

/* Process steps: glowing connectors + hover lift */
.re-process__step,
.re-process__list > * {
	position: relative;
	transition: transform .35s ease;
}
.re-process__step:hover,
.re-process__list > *:hover { transform: translateY(-4px); }

/* Result cards: subtle shimmer */
.re-result-card {
	position: relative;
	overflow: hidden;
	transition: transform .4s ease, box-shadow .4s ease;
}
.re-result-card::after {
	content: "";
	position: absolute;
	top: -50%; left: -60%;
	width: 50%; height: 200%;
	background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
	transform: skewX(-20deg);
	transition: left 1.1s ease;
	pointer-events: none;
}
.re-result-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 25px 60px -20px rgba(16,185,129,0.45);
}
.re-result-card:hover::after { left: 130%; }

/* Problem cards: animated border tinted */
.re-problem__card {
	position: relative;
	transition: transform .4s ease, box-shadow .4s ease;
}
.re-problem__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 25px 50px -20px rgba(0,0,0,0.18);
}
.re-problem__card--good {
	background: linear-gradient(180deg, #FFFFFF 0%, rgba(16,185,129,0.05) 100%);
	border: 1px solid rgba(16,185,129,0.25);
}
.re-problem__card--bad {
	background: linear-gradient(180deg, #FFFFFF 0%, rgba(248,113,113,0.05) 100%);
	border: 1px solid rgba(248,113,113,0.18);
}

/* FAQ items: hover glow */
.re-faq__item {
	transition: border-color .3s ease, box-shadow .3s ease;
}
.re-faq__item:hover {
	border-color: rgba(16,185,129,0.45) !important;
	box-shadow: 0 6px 20px -8px rgba(16,185,129,0.25);
}

/* CTA banner: floating glow ring */
.re-cta-banner {
	position: relative;
	overflow: hidden;
}
.re-cta-banner::before {
	content: "";
	position: absolute;
	width: 600px; height: 600px;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(16,185,129,0.25), transparent 60%);
	animation: reCtaPulse 6s ease-in-out infinite;
	pointer-events: none;
}
@keyframes reCtaPulse {
	0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
	50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

/* Ecosystem panel: glow tabs */
.re-eco__tab {
	position: relative;
	transition: color .3s ease, background .3s ease;
}
.re-eco__tab.is-active,
.re-eco__tab--active {
	box-shadow: 0 0 24px rgba(16,185,129,0.35);
}

/* ========== ECOSYSTEM FIX-PACK ==========
   1) Flow row: 4 cards + 3 arrows on a single row with auto-sized arrow tracks.
   2) Panel transition: opacity-only, fast crossfade — no visible overlap.
   3) Lock panel min-height so tab switching doesn't jump. */

.re-eco__flow {
	display: grid !important;
	grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr !important;
	gap: 16px !important;
	align-items: stretch !important;
}
.re-eco__flow-step {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.re-eco__flow-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	color: var(--emerald-light, #34D399);
	min-width: 24px;
	opacity: 0.8;
	animation: reFlowArrow 2.4s ease-in-out infinite;
}
.re-eco__flow-arrow:nth-child(4) { animation-delay: .3s; }
.re-eco__flow-arrow:nth-child(6) { animation-delay: .6s; }
@keyframes reFlowArrow {
	0%, 100% { transform: translateX(-3px); opacity: 0.6; }
	50%      { transform: translateX(3px); opacity: 1; }
}

/* Smooth, opacity-only crossfade for tab panels */
.re-eco__panels {
	min-height: 320px;
}
.re-eco__panel {
	transition: opacity .22s ease !important;
	transform: none !important;
}
.re-eco__panel:not(.re-eco__panel--active) {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}
.re-eco__panel--active {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Mobile: stack the flow vertically, rotate arrows */
@media (max-width: 900px) {
	.re-eco__flow {
		grid-template-columns: 1fr !important;
		gap: 12px !important;
	}
	.re-eco__flow-arrow {
		transform: rotate(90deg);
		animation: reFlowArrowV 2.4s ease-in-out infinite;
	}
	@keyframes reFlowArrowV {
		0%, 100% { transform: rotate(90deg) translateX(-3px); opacity: 0.6; }
		50%      { transform: rotate(90deg) translateX(3px); opacity: 1; }
	}
}

/* ========== CONTENT BLOCK (text + image, SEO) ========== */
.re-content-block { position: relative; overflow: hidden; }
.re-content-block::before {
	content: "";
	position: absolute;
	top: -120px; right: -120px;
	width: 480px; height: 480px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(16,185,129,0.10), transparent 70%);
	pointer-events: none;
	z-index: 0;
}
.re-content-block::after {
	content: "";
	position: absolute;
	bottom: -100px; left: -100px;
	width: 380px; height: 380px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(245,158,11,0.08), transparent 70%);
	pointer-events: none;
	z-index: 0;
}
.re-content-block .container { position: relative; z-index: 1; }

.re-content-block__grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 60px;
	align-items: center;
}
.re-content-block__text { color: #1A2744; }
.re-content-block__text h2 {
	margin-bottom: 18px;
	color: #0A1628;
}
.re-content-block__text h3 {
	margin-top: 28px;
	margin-bottom: 12px;
	color: #0A1628;
	font-size: 1.35rem;
	position: relative;
	padding-left: 18px;
}
.re-content-block__text h3::before {
	content: "";
	position: absolute;
	left: 0; top: 0.4em;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: linear-gradient(135deg, #10B981, #34D399);
	box-shadow: 0 0 10px rgba(16,185,129,0.6);
}
.re-content-block__text p {
	color: #334155;
	font-size: 1.02rem;
	line-height: 1.75;
}
.re-content-block__text strong { color: #0A1628; }
.re-content-block__list {
	list-style: none;
	padding: 0;
	margin: 18px 0 24px;
}
.re-content-block__list li {
	position: relative;
	padding: 10px 0 10px 36px;
	color: #334155;
	line-height: 1.65;
	border-bottom: 1px dashed rgba(16,185,129,0.18);
}
.re-content-block__list li:last-child { border-bottom: none; }
.re-content-block__list li::before {
	/* SVG checkmark — niezależne od Font Awesome */
	content: "";
	position: absolute;
	left: 0; top: 12px;
	width: 24px; height: 24px;
	background: linear-gradient(135deg, #10B981, #34D399);
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(16,185,129,0.35);
	background-image:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 8'/></svg>"),
		linear-gradient(135deg, #10B981, #34D399);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px, 100% 100%;
}
.re-content-block__cta {
	display: flex;
	gap: 14px;
	margin-top: 28px;
	flex-wrap: wrap;
}
.re-content-block__media {
	position: relative;
}
.re-content-block__figure {
	margin: 0;
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 80px -20px rgba(16,185,129,0.35), 0 20px 40px rgba(0,0,0,0.12);
	transform: perspective(1400px) rotateY(2deg) rotateX(-1deg);
	transition: transform .6s ease;
}
.re-content-block__figure:hover {
	transform: perspective(1400px) rotateY(0deg) rotateX(0deg);
}
.re-content-block__figure::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(16,185,129,0.08), transparent 50%, rgba(245,158,11,0.05));
	z-index: 2;
	pointer-events: none;
	mix-blend-mode: overlay;
}
.re-content-block__figure img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 18px;
}
.re-content-block__caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 16px 20px;
	background: linear-gradient(180deg, transparent, rgba(10,22,40,0.85));
	color: #E2E8F0;
	font-size: 0.85rem;
	z-index: 3;
}
.re-content-block__badges {
	display: flex;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
	justify-content: center;
}
.re-content-block__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: linear-gradient(180deg, #FFFFFF, #F1F5F9);
	border: 1px solid rgba(16,185,129,0.25);
	border-radius: 50px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #0A1628;
	box-shadow: 0 6px 20px -10px rgba(16,185,129,0.4);
}
.re-content-block__badge i { color: #10B981; }

@media (max-width: 900px) {
	.re-content-block__grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.re-content-block__figure {
		transform: none;
	}
	.re-content-block__cta { justify-content: center; }
	.re-content-block__text { text-align: center; }
	.re-content-block__list li { text-align: left; }
	.re-content-block__text h3 { display: inline-block; }
}

/* ========== Mobile tweaks ========== */
@media (max-width: 1024px) {
	.re-hero__inner {
		text-align: center;
	}
	.re-hero__content { text-align: center; }
	.re-hero__actions { justify-content: center; }
	.re-hero__stats { margin-left: auto; margin-right: auto; }
	.re-agency-mockup {
		transform: perspective(1400px) rotateY(0deg) rotateX(0deg);
	}
}
@media (max-width: 768px) {
	.re-hero__pins { display: none; }
	#reHeroBlueprint { display: none; }
	.re-hero::before { background-size: 48px 48px; }
}

/* ========== Reduced-motion ========== */
@media (prefers-reduced-motion: reduce) {
	.re-hero .re-gradient-text,
	.re-trust-bar::before,
	.re-cta-banner::before,
	.re-hero__pin,
	.re-hero__pin::before { animation: none !important; }
}

/* ========================================================================
   HEADER POLISH — fixed CTA button, logo sizing, mobile menu gap
   ======================================================================== */

:root {
	--cs-header-h: 64px;
	--cs-header-h-mobile: 56px;
}

/* Header — predictable height + subtle backdrop on top */
.header {
	height: var(--cs-header-h) !important;
	padding: 0 28px !important;
	background: linear-gradient(180deg, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0.55) 100%) !important;
	backdrop-filter: blur(8px) saturate(140%) !important;
	-webkit-backdrop-filter: blur(8px) saturate(140%) !important;
	border-bottom: 1px solid rgba(16, 185, 129, 0.12) !important;
}

.header.scrolled {
	height: var(--cs-header-h) !important;
	padding: 0 28px !important;
	background: rgba(10, 22, 40, 0.96) !important;
	border-bottom-color: rgba(16, 185, 129, 0.2) !important;
}

/* Logo — override inline 38px to match header height */
.header__logo {
	display: flex !important;
	align-items: center;
	height: 100%;
}

.header__logo img {
	height: 32px !important;
	width: auto !important;
	display: block !important;
	transition: transform 0.25s ease;
}

.header__logo:hover img {
	transform: scale(1.04);
}

/* Nav menu spacing tighter for cleaner look */
.nav {
	height: 100%;
}

.nav__menu {
	gap: 32px !important;
	height: 100%;
}

.nav__link {
	font-size: 0.93rem;
	letter-spacing: 0.01em;
	padding: 6px 0;
}

/* CTA button — proper pill with padding, glow, hover lift */
.nav__cta {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	padding: 10px 20px !important;
	border-radius: 999px !important;
	background: linear-gradient(135deg, #10B981 0%, #34D399 100%) !important;
	color: #fff !important;
	font-weight: 600 !important;
	font-size: 0.88rem !important;
	letter-spacing: 0.01em;
	box-shadow:
		0 6px 18px rgba(16, 185, 129, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
	border: none;
}

.nav__cta::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
	animation: re-cta-pulse 2.4s ease-in-out infinite;
}

@keyframes re-cta-pulse {
	0%, 100% { opacity: 0.6; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.25); }
}

.nav__cta:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow:
		0 10px 26px rgba(16, 185, 129, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* MOBILE — fix gap, sizing, CTA in menu */
@media (max-width: 768px) {
	.header {
		height: var(--cs-header-h-mobile) !important;
		padding: 0 16px !important;
	}

	.header.scrolled {
		height: var(--cs-header-h-mobile) !important;
		padding: 0 16px !important;
	}

	.header__logo img {
		height: 26px !important;
	}

	/* Nav menu starts EXACTLY at header bottom (no gap) */
	.nav__menu {
		top: var(--cs-header-h-mobile) !important;
		height: calc(100vh - var(--cs-header-h-mobile)) !important;
		padding: 24px 20px 32px !important;
		gap: 4px !important;
		background: linear-gradient(180deg, #0A1628 0%, #0A1628 100%) !important;
		border-top: 1px solid rgba(16, 185, 129, 0.18) !important;
	}

	.nav__menu .nav__link {
		font-size: 1.05rem;
		padding: 14px 4px !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
	}

	/* CTA button stands out in mobile menu — no border, centered, full width */
	.nav__menu .nav__cta {
		margin-top: 18px;
		width: 100%;
		justify-content: center;
		padding: 16px 20px !important;
		font-size: 1rem !important;
		border-bottom: none !important;
	}

	.nav__toggle {
		width: 32px;
		height: 32px;
		justify-content: center;
		align-items: center;
	}

	.nav__toggle span {
		width: 22px !important;
	}
}
