/* =====================================================================
   HA-EFFECTS — limbajul de efecte „Reflex indigo" (VN House Avantaj)
   Sursa deciziilor: LTS-Core10\docs\RAPORT-CONSILIU-efecte-imobiliara-2026-07-18.md

   REGULI DE AUR (nu se negociază):
   1. TOATE regulile de efect stau sub `body.fx-on` — flag-ul Ui:EfectePremium
      din appsettings pune clasa pe <body>; cu flag-ul off, acest fișier e inert.
   2. Fișier ADITIV: nu se ating app_1/app_2.min.css și nici blocurile <style>
      inline din _PublicLayout — câștigăm doar prin ordine-sursă și specificitate.
   3. Registrul cromatic: pe suprafețe ALBE accentul e indigo (--ha-accent);
      pe suprafețe INDIGO (header/topbar/footer) accentul e auriul cald (--ha-warm).
      Auriul NU devine text/glow pe alb (contrast slab, citește „promo").
   4. Se animă DOAR opacity/transform/box-shadow/border-color (compositor-friendly).
      Interzis: margin/height/top animate, will-change suplimentar, pulsuri
      infinite pe carduri (bugetul de puls per pagină e consumat de FAB-ul WhatsApp).
   5. Orice hover nou primește resetul lui în blocul TOUCH de la finalul
      fișierului, ÎN ACELAȘI COMMIT (definition-of-done).
   6. Clasa de reveal (.ha-reveal) se pune EXCLUSIV din JS, doar sub fold —
      niciodată în Razor; fără JS site-ul rămâne integral vizibil.
   ===================================================================== */

/* ---------- Design tokens (Faza 0) — singura sursă de valori ---------- */
:root {
	--ha-accent: #3949ab;
	--ha-accent-deep: #283593;
	--ha-accent-rgb: 57, 73, 171;
	--ha-accent-glow: rgba(41, 53, 147, .16);
	--ha-accent-soft: rgba(57, 73, 171, .10);
	--ha-ring: rgba(57, 73, 171, .14);
	--ha-warm: #f5a623;
	--ha-warm-hover: #ffd87a;
	--ha-ink: #1a2233;

	/* durate & curbe — semnătura existentă a cardului se PĂSTREAZĂ (.28s) */
	--ha-t-card: .28s cubic-bezier(.2, .7, .3, 1);
	--ha-t-ui: .22s ease;
	--ha-t-shine: .7s ease;
	--ha-t-reveal: .6s ease;
}

/* =====================================================================
   FAZA 1 — pastila CTA · underline nav · glow butoane/formulare ·
            baleiaj pe butoanele pline · încălzirea bordurii cardului
   ===================================================================== */

/* ---------- 1.1 Butoanele pline indigo: baleiaj de lumină + glow ----------
   Țintele (toate au deja fundal #3949ab și hover #283593 — le păstrăm):
   .vn-inq-submit (Detail) · .vn-cform__submit (Contact/Evaluare) ·
   .lst-filter__apply (filtre listare, Bootstrap cu !important) · .vn-seeall */
body.fx-on .vn-inq-submit,
body.fx-on .vn-cform__submit,
body.fx-on .lst-filter__apply,
body.fx-on .vn-seeall {
	overflow: hidden;
	position: relative;
	transition: background var(--ha-t-ui), box-shadow var(--ha-t-ui);
}

body.fx-on .vn-inq-submit::after,
body.fx-on .vn-cform__submit::after,
body.fx-on .lst-filter__apply::after,
body.fx-on .vn-seeall::after {
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .30), transparent);
	bottom: -30%;
	content: "";
	left: -70%;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: -30%;
	transform: skewX(-18deg);
	width: 38%;
}

body.fx-on .vn-inq-submit:hover::after,
body.fx-on .vn-cform__submit:hover::after,
body.fx-on .lst-filter__apply:hover::after,
body.fx-on .vn-seeall:hover::after {
	animation: ha-shine var(--ha-t-shine) forwards;
}

@keyframes ha-shine {
	from {
		left: -70%;
		opacity: 1;
	}

	to {
		left: 135%;
		opacity: 1;
	}
}

body.fx-on .vn-inq-submit:hover,
body.fx-on .vn-cform__submit:hover,
body.fx-on .vn-seeall:hover {
	box-shadow: 0 12px 30px rgba(var(--ha-accent-rgb), .30);
}

/* filtrul folosește !important în stilurile existente — răspundem cu aceeași monedă, doar aici */
body.fx-on .lst-filter__apply:hover {
	box-shadow: 0 12px 30px rgba(var(--ha-accent-rgb), .30) !important;
}

/* ---------- 1.2 Cardul de anunț: încălzirea bordurii + glow discret ----------
   Liftul existent (-6px), umbra și zoomul pozei se PĂSTREAZĂ — doar le îmbogățim.
   Re-declarăm umbra existentă + adăugăm componenta de glow indigo. */
body.fx-on .property-card:hover {
	border-color: rgba(var(--ha-accent-rgb), .35);
	box-shadow: 0 18px 38px var(--ha-accent-glow), 0 0 24px rgba(var(--ha-accent-rgb), .10);
}

/* ---------- 1.3 Pastila CTA pe „Detalii" (property-card__more) ----------
   Padding compensat cu margin negativ → zero layout shift; margin-left:auto se păstrează.
   Pastila se aprinde și la hoverul întregului card (invitație spre click). */
body.fx-on .property-card__more {
	border-radius: 999px;
	margin: -6px -12px -6px auto;
	padding: 6px 12px;
	transition: background var(--ha-t-ui), box-shadow var(--ha-t-ui), color var(--ha-t-ui);
}

body.fx-on .property-card__more:hover,
body.fx-on .property-card:hover .property-card__more {
	background: var(--ha-accent-soft);
	box-shadow: inset 0 0 0 1px rgba(var(--ha-accent-rgb), .30);
	color: var(--ha-accent-deep);
}

/* ---------- 1.4 Nav public: underline auriu animat (registrul indigo → accent cald) ---------- */
body.fx-on .vn-nav__item > a {
	position: relative;
}

body.fx-on .vn-nav__item > a::after {
	background: var(--ha-warm-hover);
	border-radius: 1px;
	bottom: 8px;
	content: "";
	height: 2px;
	left: 14px;
	position: absolute;
	right: 14px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--ha-t-ui);
}

body.fx-on .vn-nav__item > a:hover::after,
body.fx-on .vn-nav__item > a:focus-visible::after {
	transform: scaleX(1);
}

/* ---------- 1.5 Formulare: hover discret (focusul existent rămâne mai puternic) ---------- */
body.fx-on .vn-cform input,
body.fx-on .vn-cform textarea,
body.fx-on .vn-inq-field,
body.fx-on .lst-filter .form-control {
	transition: border-color var(--ha-t-ui), box-shadow var(--ha-t-ui);
}

body.fx-on .vn-cform input:hover:not(:focus),
body.fx-on .vn-cform textarea:hover:not(:focus),
body.fx-on .vn-inq-field:hover:not(:focus),
body.fx-on .lst-filter .form-control:hover:not(:focus) {
	border-color: rgba(var(--ha-accent-rgb), .40);
	box-shadow: 0 0 0 3px rgba(var(--ha-accent-rgb), .10);
}

/* .vn-inq-field nu avea inel de focus (doar vn-cform avea) — îl aliniem la același limbaj */
body.fx-on .vn-inq-field:focus {
	border-color: var(--ha-accent);
	box-shadow: 0 0 0 3px var(--ha-ring);
	outline: none;
}

/* căutarea din hero (registru indigo → accent cald): hover blând; focusul auriu existent rămâne */
body.fx-on .vn-search__field select:hover:not(:focus),
body.fx-on .vn-search__field input:hover:not(:focus) {
	border-color: rgba(245, 166, 35, .55);
}

/* ---------- 1.6 „Te-ar putea interesa și…": chenar subtil pe rândul activ (xviii1) ----------
   Inel interior (inset) → zero deplasare de layout, indiferent de bordurile Bootstrap ale listei. */
body.fx-on .vn-related .list-group-item {
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px transparent;
	transition: box-shadow var(--ha-t-ui), background var(--ha-t-ui);
}

body.fx-on .vn-related .list-group-item:hover,
body.fx-on .vn-related .list-group-item:focus-visible {
	background: var(--ha-accent-soft);
	box-shadow: inset 0 0 0 1px rgba(var(--ha-accent-rgb), .35);
}

/* =====================================================================
   FAZA 2 — igienă generală și accesibilitate transversală
   ===================================================================== */

/* Derulare lină la ancore DOAR cu acordul utilizatorului (o singură declarație pe site).
   :has() e progressive enhancement: fără suport, ancorele sar instant — comportament corect. */
@media (prefers-reduced-motion: no-preference) {
	html:has(> body.fx-on) {
		scroll-behavior: smooth;
	}
}

/* Aterizarea ancorelor sub headerul lipicios */
body.fx-on [id] {
	scroll-margin-top: 90px;
}

/* Săgețile mini-caruselului (opacity 0 până la hover) — vizibile și la navigarea cu tastatura */
body.fx-on .property-card:focus-within .pc-nav {
	opacity: 1;
}


/* =====================================================================
   FAZA 3 — reveal la scroll (.ha-reveal / .ha-in)
   Clasa se aplică DOAR din JS (IntersectionObserver în _PublicLayout),
   doar sub fold; JS-ul scoate clasele după ~820ms ca tranziția de reveal
   să nu „plutească" peste lift-ul de hover al cardurilor.
   Ținte (decizia consiliului): rândurile ÎNTREGI de pe Home (.vn-hrow-wrap),
   secțiunile statice (grila contact/evaluare), coloanele footerului.
   NU pe grila de listare (utilizatorul care paginează vrea inventarul instant).
   ===================================================================== */
body.fx-on .ha-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity var(--ha-t-reveal), transform var(--ha-t-reveal);
}

body.fx-on .ha-reveal.ha-in {
	opacity: 1;
	transform: none;
}

/* =====================================================================
   FAZA 5 — „Parcursul vânzătorului" (partialul _ParcursVanzator.cshtml)
   5 pași pe o linie indigo; „Te afli aici" cu puls discret (SINGURUL puls
   permis — și cedează pe mobil, unde pulsează FAB-ul WhatsApp).
   Cifra bulinei stă pe fontul temei, bold (decizia consiliului — fără
   fonturi noi). Cardurile au fundal opac: linia trece PE SUB ele.
   ===================================================================== */
.ha-journey {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	list-style: none;
	margin: 26px 0 34px;
	padding: 14px 0 0;
	position: relative;
}

.ha-journey::before {
	background: linear-gradient(90deg, transparent, rgba(var(--ha-accent-rgb), .30) 10%, rgba(var(--ha-accent-rgb), .30) 90%, transparent);
	content: "";
	height: 2px;
	left: 24px;
	position: absolute;
	right: 24px;
	top: 55px;
	z-index: 0;
}

.ha-jstep {
	background: #fff;
	border: 1px solid #e6e9f0;
	border-radius: 10px;
	padding: 18px 14px 16px;
	position: relative;
	text-align: center;
	transition: border-color var(--ha-t-ui), box-shadow var(--ha-t-ui), transform var(--ha-t-ui);
	z-index: 1;
}

@media (hover: hover) {
	body.fx-on .ha-jstep:hover {
		border-color: rgba(var(--ha-accent-rgb), .35);
		box-shadow: 0 10px 26px var(--ha-accent-glow);
		transform: translateY(-3px);
	}
}

/* navigare cu tastatura: inelul de focus pe TOT cardul (linkul întins e invizibil) */
body.fx-on .ha-jstep:focus-within {
	border-color: var(--ha-accent);
	box-shadow: 0 0 0 3px var(--ha-ring);
}

.ha-jstep__top {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-bottom: 10px;
}

.ha-jstep__dot {
	align-items: center;
	background: #f4f6fb;
	border: 2px solid rgba(var(--ha-accent-rgb), .45);
	border-radius: 50%;
	color: var(--ha-accent);
	display: flex;
	flex: none;
	font-size: 18px;
	font-weight: 800;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.ha-jstep--here .ha-jstep__dot,
.ha-jstep--final .ha-jstep__dot {
	background: var(--ha-accent);
	border-color: transparent;
	color: #fff;
}

.ha-jstep__ic {
	color: var(--ha-accent);
	font-size: 24px;
	opacity: .85;
}

.ha-jstep h3 {
	color: var(--ha-ink);
	font-size: 15.5px;
	font-weight: 700;
	margin: 0 0 6px;
}

.ha-jstep p {
	color: #5b6b80;
	font-size: 13px;
	line-height: 1.55;
	margin: 0;
}

.ha-jstep--here {
	border-color: rgba(var(--ha-accent-rgb), .55);
	box-shadow: 0 8px 26px var(--ha-accent-glow);
}

.ha-jstep__badge {
	animation: ha-aici 2.4s ease-in-out infinite;
	background: var(--ha-accent);
	border-radius: 999px;
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	left: 50%;
	letter-spacing: .12em;
	padding: 4px 12px;
	position: absolute;
	text-transform: uppercase;
	top: -12px;
	transform: translateX(-50%);
	white-space: nowrap;
	z-index: 3;
}

@keyframes ha-aici {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(var(--ha-accent-rgb), .45);
	}

	50% {
		box-shadow: 0 0 0 8px rgba(var(--ha-accent-rgb), 0);
	}
}

/* stretched-link: UN singur link per pas (F1–F7); peste el nu există alte ținte interactive */
.ha-jstep__link {
	border-radius: inherit;
	inset: 0;
	position: absolute;
	z-index: 2;
}

/* Mobil/tabletă: traseu vertical; pulsul insignei CEDEAZĂ (FAB-ul WhatsApp pulsează acolo) */
@media (max-width: 991px) {
	.ha-journey {
		gap: 12px;
		grid-template-columns: 1fr;
	}

	.ha-journey::before {
		display: none;
	}

	.ha-jstep {
		padding: 16px;
		text-align: left;
	}

	.ha-jstep__top {
		justify-content: flex-start;
		margin-bottom: 8px;
	}

	.ha-jstep__badge {
		animation: none;
		left: auto;
		right: 12px;
		top: -10px;
		transform: none;
	}
}


/* =====================================================================
   IGIENĂ — blocurile rămân ULTIMELE din fișier (câștigă cascada).
   Conțin: resetul TUTUROR hover-urilor noastre (definition-of-done: fiecare
   hover nou intră aici ÎN ACELAȘI COMMIT), țintele de atingere ≥44px (F2)
   și gardarea reduced-motion — inclusiv a animațiilor TEMEI negardate
   (vn-pulse pe .vn-callbtn, vn-fabpulse pe .vn-fab__toggle, intro-ul vni*).
   ===================================================================== */

/* ---------- TOUCH: fără stări lipite după tap + feedback la apăsare ---------- */
@media (hover: none), (pointer: coarse) {
	/* baleiajul și underline-ul nu au sens fără cursor */
	body.fx-on .vn-inq-submit::after,
	body.fx-on .vn-cform__submit::after,
	body.fx-on .lst-filter__apply::after,
	body.fx-on .vn-seeall::after,
	body.fx-on .vn-nav__item > a::after {
		display: none;
	}

	/* cardul: rămâne comportamentul temei (fără glow-ul nostru lipit după tap) */
	body.fx-on .property-card:hover {
		border-color: #ccd4ef;
		box-shadow: 0 18px 38px rgba(41, 53, 147, .16);
	}

	/* pastila: nu se aprinde la hover fantomă; țintă de atingere mărită (≥44px) */
	body.fx-on .property-card__more:hover,
	body.fx-on .property-card:hover .property-card__more {
		background: transparent;
		box-shadow: none;
		color: #3949ab;
	}

	body.fx-on .property-card__more {
		margin: -10px -14px -10px auto;
		padding: 10px 14px;
	}

	/* glow-ul butoanelor nu rămâne lipit după tap */
	body.fx-on .vn-inq-submit:hover,
	body.fx-on .vn-cform__submit:hover,
	body.fx-on .vn-seeall:hover {
		box-shadow: none;
	}

	body.fx-on .lst-filter__apply:hover {
		box-shadow: 0 2px 8px rgba(40, 53, 147, .22) !important;
	}

	/* inelul de hover pe câmpuri nu rămâne lipit (focusul își păstrează inelul propriu) */
	body.fx-on .vn-cform input:hover:not(:focus),
	body.fx-on .vn-cform textarea:hover:not(:focus),
	body.fx-on .vn-inq-field:hover:not(:focus),
	body.fx-on .lst-filter .form-control:hover:not(:focus) {
		border-color: #ccd2dd;
		box-shadow: none;
	}

	body.fx-on .vn-search__field select:hover:not(:focus),
	body.fx-on .vn-search__field input:hover:not(:focus) {
		border-color: rgba(255, 255, 255, .25);
	}

	/* chenarul rândurilor „similare" nu rămâne lipit după tap */
	body.fx-on .vn-related .list-group-item:hover {
		background: transparent;
		box-shadow: inset 0 0 0 1px transparent;
	}

	/* Faza 2: ținte de atingere ≥44px pe comenzile mici ale cardului — zonă de lovire
	   extinsă cu pseudo-element transparent, FĂRĂ să mărim desenul (34px/30px rămân). */
	body.fx-on .pc-fav::after,
	body.fx-on .pc-nav::after {
		bottom: -7px;
		content: "";
		left: -7px;
		position: absolute;
		right: -7px;
		top: -7px;
	}

	/* feedback tactil la apăsare */
	body.fx-on .vn-inq-submit:active,
	body.fx-on .vn-cform__submit:active,
	body.fx-on .lst-filter__apply:active,
	body.fx-on .vn-seeall:active {
		transform: scale(.985);
	}

	body.fx-on .property-card:active {
		transform: scale(.99);
	}

	/* parcursul vânzătorului: fără puls pe insignă (FAB-ul pulsează aici) + feedback la apăsare */
	.ha-jstep__badge {
		animation: none;
	}

	.ha-jstep:active {
		transform: scale(.99);
	}
}

/* ---------- REDUCED-MOTION: efectele noastre + animațiile TEMEI negardate până acum ---------- */
@media (prefers-reduced-motion: reduce) {
	body.fx-on .vn-inq-submit:hover::after,
	body.fx-on .vn-cform__submit:hover::after,
	body.fx-on .lst-filter__apply:hover::after,
	body.fx-on .vn-seeall:hover::after {
		animation: none;
	}

	body.fx-on .vn-nav__item > a::after,
	body.fx-on .property-card__more,
	body.fx-on .vn-cform input,
	body.fx-on .vn-cform textarea,
	body.fx-on .vn-inq-field,
	body.fx-on .lst-filter .form-control,
	body.fx-on .vn-related .list-group-item {
		transition: none;
	}

	/* reveal-ul: fără JS-ul care pune clasa nu există; centura de siguranță = totul vizibil */
	body.fx-on .ha-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	/* parcursul vânzătorului: insigna nu pulsează, cardurile nu tranzitează */
	.ha-jstep__badge {
		animation: none;
	}

	.ha-jstep {
		transition: none;
	}

	/* Faza 2: pulsurile infinite ale temei (butonul roșu de apel + FAB-ul WhatsApp) se opresc */
	body.fx-on .vn-callbtn,
	body.fx-on .vn-fab__toggle {
		animation: none;
	}

	/* Intro-ul „brand reveal": JS-ul deja nu-l pornește la reduced-motion; centura de siguranță
	   CSS trebuie să lase cardul VIZIBIL (animația forwards e cea care îl aduce la opacity 1). */
	body.fx-on .vn-intro__card {
		animation: none;
		filter: none;
		opacity: 1;
		transform: none;
	}

	body.fx-on .vn-intro__card::after {
		animation: none;
		display: none;
	}

	body.fx-on .vn-intro__tag {
		animation: none;
		opacity: 1;
	}
}
