/* ==========================================================================
   TUR VIRTUAL — stiluri proprii paginii (restul vine din style.css)
   ========================================================================== */

/* ---------- Două variante de text: cu tur (.when-on) și fără tur (.when-off) ----------
   <main class="vt-off"> = niciun tur 360° configurat; tur-virtual.js comută clasa. */
main.vt-off .when-on,
main:not(.vt-off) .when-off { display: none; }
main.vt-off .vt-how { display: none; }

/* ---------- Hero: butoanele de tur ---------- */
.vt-hero .page-hero__row > :first-child { flex: 1 1 520px; min-width: 0; }
.vt-hero .page-hero__ctas { gap: 12px; }
.vt-hero .tour__btn { padding-right: 24px; }
.vt-hero .tour__play .ic.when-off { margin-left: 0; }
main.vt-off .vt-hero .tour__play::before { display: none; }
.vt-hero .page-hero__facts dd { white-space: nowrap; }
.vt-hero .page-hero__facts dd small { font-size: .52em; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .72); }

/* ---------- Taburi + panouri ---------- */
.vt .sec-head__aside .more-link { margin-top: 18px; }
.vt-panel { animation: panelIn .6s var(--ease); scroll-margin-top: 104px; }
.vt-panel[hidden] { display: none; }

/* ---------- Player 360° ---------- */
.vt-player {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; aspect-ratio: 16 / 9; min-height: 440px; max-height: min(80svh, 780px);
  border-radius: var(--r-lg);
  background: var(--ink); color: var(--white);
}
.vt-player__frame, .vt-player__poster, .vt-player__ui, .vt-player__fallback { position: absolute; inset: 0; }
.vt-player__frame { z-index: 0; }
.vt-player__frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* posterul „se uită în jur” cât timp turul nu rulează */
.vt-player__poster {
  z-index: 1; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.14); filter: brightness(1.18);
  animation: vtLook 28s ease-in-out infinite alternate;
  transition: opacity .9s var(--ease), filter .9s var(--ease);
}
@keyframes vtLook { from { transform: scale(1.14) translateX(-4%); } to { transform: scale(1.14) translateX(4%); } }
.vt-player::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 52%, rgba(10, 10, 9, 0) 0%, rgba(10, 10, 9, .45) 100%),
    linear-gradient(180deg, rgba(10, 10, 9, .4) 0%, rgba(10, 10, 9, 0) 26%, rgba(10, 10, 9, 0) 70%, rgba(10, 10, 9, .5) 100%);
  transition: opacity .9s var(--ease);
}

.vt-player__ui {
  z-index: 2; pointer-events: none;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center;
  padding: clamp(14px, 2vw, 24px);
}
.vt-player__ui > * { pointer-events: auto; }
.vt-player__top { justify-self: stretch; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vt-player__top .pill .ic { width: 18px; height: 18px; color: var(--yellow); }
.vt-player__fs {
  width: 46px; height: 46px; margin-left: auto;
  background: rgba(15, 15, 14, .4); border-color: rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s, background .3s, color .3s, border-color .3s;
}
.vt-player__fs .ic { width: 18px; height: 18px; }
.vt-player[data-state="ready"] .vt-player__fs,
.vt-player[data-state="live"] .vt-player__fs { opacity: 1; visibility: visible; }

/* butonul de start: cerc galben + inel 360° */
.vt-player__start { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.vt-player__play {
  position: relative; display: grid; place-items: center;
  width: clamp(78px, 7.4vw, 104px); aspect-ratio: 1; border-radius: 50%;
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 20px 44px -14px rgba(250, 196, 29, .7);
  transition: transform .5s var(--ease), background .3s;
}
.vt-player__play .ic { width: 30px; height: 30px; margin-left: 4px; }
.vt-player__play::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, .5);
  animation: vtSpin 18s linear infinite;
}
.vt-player__play::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--yellow); animation: ping 2.2s var(--ease) infinite; }
.vt-player__start:hover .vt-player__play { transform: scale(1.06); background: var(--yellow-hi); }
@keyframes vtSpin { to { transform: rotate(360deg); } }
.vt-player__txt b { display: block; font: 600 clamp(1.3rem, 2vw, 1.75rem)/1.1 var(--f-display); letter-spacing: -.025em; }
.vt-player__txt small { display: block; margin-top: 8px; font: 500 .74rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }

.vt-player__hint {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(15, 15, 14, .45); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 500 .88rem/1 var(--f-display); color: rgba(255, 255, 255, .88);
  transition: opacity .5s var(--ease);
}
.vt-player__hint .ic { width: 18px; height: 18px; color: var(--yellow); animation: vtSway 2.4s var(--ease-io) infinite; }
@keyframes vtSway { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

/* stări */
.vt-player[data-state="loading"] .vt-player__play::before { inset: -12px; border: 2px solid rgba(255, 255, 255, .16); border-top-color: var(--yellow); animation-duration: .9s; }
.vt-player[data-state="loading"] .vt-player__play::after,
.vt-player[data-state="ready"] .vt-player__play::before { animation-duration: 1.4s; }
.vt-player[data-state="live"] .vt-player__poster { opacity: 0; animation: none; filter: blur(6px); }
.vt-player[data-state="live"]::after { opacity: 0; }
.vt-player[data-state="live"] .vt-player__ui { pointer-events: none; }
.vt-player[data-state="live"] .vt-player__ui > :not(.vt-player__top),
.vt-player[data-state="live"] .vt-player__top .pill { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.96); }
.vt-player[data-state="live"] .vt-player__top { pointer-events: none; }
.vt-player[data-state="live"] .vt-player__fs { pointer-events: auto; }
.vt-player.is-fs { max-height: none; border-radius: 0; }

/* varianta de rezervă: „error” = turul configurat nu se încarcă (card mare peste poster) */
.vt-player__fallback { z-index: 3; display: none; place-items: center; padding: clamp(14px, 3vw, 32px); }
.vt-player[data-state="error"] .vt-player__fallback,
html:not(.js) .vt-player__fallback { display: grid; animation: fadeIn .6s var(--ease); }
.vt-player[data-state="error"] .vt-player__ui > :not(.vt-player__top),
html:not(.js) .vt-player__ui > :not(.vt-player__top) { display: none; }
.vt-player[data-state="error"] .vt-player__poster { filter: brightness(1.3) saturate(.9); }
.vt-player:not([data-state="error"]) [data-when="error"],
.vt-player[data-state="error"] [data-when="off"] { display: none; }
.vt-fb {
  width: min(100%, 540px);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: var(--r);
  background: rgba(15, 15, 14, .6); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.vt-fb__ic {
  display: grid; place-items: center; flex: none;
  width: 58px; height: 58px; margin-bottom: 4px; border-radius: 50%;
  background: rgba(250, 196, 29, .14); color: var(--yellow);
  font: 700 1rem/1 var(--f-display); letter-spacing: -.02em;
}
.vt-fb h3 { font: 600 clamp(1.35rem, 2.1vw, 1.75rem)/1.1 var(--f-display); letter-spacing: -.03em; text-wrap: balance; }
.vt-fb p { max-width: 42ch; margin: 10px auto 0; color: rgba(255, 255, 255, .74); font-size: .97rem; }
.vt-fb__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.vt-fb__btns .ic { width: 18px; height: 18px; }
.vt-fb__btns [hidden] { display: none; }

/* „off” = niciun tur configurat: în loc de player, o bandă compactă și neutră deasupra planului */
.vt-player[data-state="off"] { aspect-ratio: auto; min-height: 0; max-height: none; }
.vt-player[data-state="off"] .vt-player__ui { display: none; }
.vt-player[data-state="off"] .vt-player__poster { animation: none; transform: scale(1.06); filter: blur(3px) saturate(.8); }
.vt-player[data-state="off"]::after { background: linear-gradient(90deg, rgba(15, 15, 14, .94) 0%, rgba(15, 15, 14, .86) 50%, rgba(15, 15, 14, .64) 100%); }
.vt-player[data-state="off"] .vt-player__fallback { position: relative; inset: auto; display: block; padding: 0; animation: none; }
.vt-player[data-state="off"] .vt-fb {
  width: 100%;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 24px;
  text-align: left;
  padding: clamp(22px, 2.6vw, 34px) clamp(22px, 3vw, 40px);
  background: none; border: 0; border-radius: 0; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.vt-player[data-state="off"] .vt-fb__ic { margin: 0; }
.vt-player[data-state="off"] .vt-fb h3 { font-size: clamp(1.25rem, 1.7vw, 1.5rem); }
.vt-player[data-state="off"] .vt-fb p { max-width: 62ch; margin: 8px 0 0; font-size: .95rem; }
.vt-player[data-state="off"] .vt-fb__btns { margin-top: 0; flex-wrap: nowrap; justify-content: flex-end; }

/* ---------- Plan + specificații sub player ---------- */
.vt-detail { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-top: 14px; }
/* planul 3 camere e decupat strâns pe model: doar puțin aer în jur */
.vt-plan-crop { padding: clamp(16px, 2.4vw, 34px); }
.vt-plan-crop img { max-height: 560px; }

/* ---------- Cum explorezi turul ---------- */
.vt-how__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vt-tip { padding: 14px 14px 26px; gap: 10px; }
.vt-tip .card__k, .vt-tip h3, .vt-tip p { padding-inline: 10px; }
.vt-tip .card__k { margin-top: 8px; }

.vt-demo {
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(150px, 13vw, 190px); margin-bottom: 6px;
  border-radius: var(--r-sm); background: var(--ink-3);
}
.vt-demo::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(15, 15, 14, .05), rgba(15, 15, 14, .5)); pointer-events: none; }
.vt-demo__img { position: absolute; inset: 0 -25%; z-index: -1; background: url("../../img/living-panorama.webp") 50% 50% / cover no-repeat; }
.vt-demo__finger {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(255, 255, 255, .28); border: 2px solid var(--white);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .14), 0 8px 18px rgba(0, 0, 0, .3);
}

/* 01 — privirea se rotește odată cu degetul */
.vt-demo--drag .vt-demo__img { animation: vtPanImg 5s var(--ease-io) infinite alternate; }
.vt-demo--drag .vt-demo__finger { animation: vtPanFinger 5s var(--ease-io) infinite alternate; }
@keyframes vtPanImg { from { transform: translateX(-9%); } to { transform: translateX(9%); } }
@keyframes vtPanFinger { from { transform: translateX(-46px); } to { transform: translateX(46px); } }

/* 02 — două degete se depărtează, imaginea se apropie */
.vt-demo--zoom .vt-demo__img { inset: 0; animation: vtZoomImg 4s var(--ease-io) infinite; }
.vt-demo--zoom .vt-demo__finger { width: 28px; height: 28px; margin: -14px 0 0 -14px; animation: vtPinchA 4s var(--ease-io) infinite; }
.vt-demo--zoom .vt-demo__finger--b { animation-name: vtPinchB; }
@keyframes vtZoomImg { 0%, 15% { transform: scale(1); } 55%, 70% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes vtPinchA { 0%, 15% { transform: translate(-12px, 10px); } 55%, 70% { transform: translate(-46px, 34px); } 100% { transform: translate(-12px, 10px); } }
@keyframes vtPinchB { 0%, 15% { transform: translate(12px, -10px); } 55%, 70% { transform: translate(46px, -34px); } 100% { transform: translate(12px, -10px); } }

/* 03 — un punct de navigare, apoi „pășești” în camera următoare */
.vt-demo--walk .vt-demo__img { inset: 0; transform-origin: 62% 70%; animation: vtWalk 5s var(--ease-io) infinite; }
.vt-demo__spot {
  position: absolute; left: 62%; top: 70%; z-index: 1;
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--white);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  animation: vtSpot 5s var(--ease-io) infinite;
}
.vt-demo__spot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--yellow); animation: ping 1.6s var(--ease) infinite; }
@keyframes vtWalk { 0%, 35% { transform: scale(1); opacity: 1; } 72% { transform: scale(1.7); opacity: 1; } 80% { transform: scale(1.8); opacity: 0; } 81% { transform: scale(1); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes vtSpot { 0%, 28% { transform: scale(1); opacity: 1; } 34% { transform: scale(.7); } 40% { transform: scale(1.1); opacity: 1; } 55%, 92% { transform: scale(1.1); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* 04 — fereastra crește până umple ecranul */
.vt-demo--full { display: grid; place-items: center; background: var(--ink-2); }
.vt-demo--full::after { display: none; }
.vt-demo__frame {
  position: absolute; inset: 10px; border-radius: 10px;
  background: url("../../img/living-panorama.webp") 50% 50% / cover no-repeat;
  outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px;
  transform: scale(.52); animation: vtFull 4.4s var(--ease-io) infinite;
}
.vt-demo--full .ic { position: relative; z-index: 1; width: 30px; height: 30px; color: var(--white); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); animation: vtFullIc 4.4s var(--ease-io) infinite; }
@keyframes vtFull { 0%, 20% { transform: scale(.52); } 55%, 80% { transform: scale(1); } 100% { transform: scale(.52); } }
@keyframes vtFullIc { 0%, 20% { opacity: 1; transform: scale(1); } 45%, 85% { opacity: 0; transform: scale(1.4); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .vt-detail { grid-template-columns: 1fr; }
  .vt-how__grid { grid-template-columns: repeat(2, 1fr); }
  .vt-player[data-state="off"] .vt-fb { grid-template-columns: auto minmax(0, 1fr); }
  .vt-player[data-state="off"] .vt-fb__btns { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
}
@media (max-width: 760px) {
  .vt-hero .page-hero__ctas { flex-wrap: nowrap; gap: 8px; }
  .vt-hero .tour__btn { width: auto; flex: 1 1 0; min-width: 0; gap: 10px; padding: 7px 14px 7px 7px; font-size: 1.05rem; }
  .vt-hero .tour__play { width: 44px; height: 44px; flex: none; }
  .vt-hero .tour__play .ic { width: 18px; height: 18px; margin-left: 2px; }
  .vt-hero .tour__btn small { font-size: .66rem; letter-spacing: .1em; }
  .vt-player { aspect-ratio: 4 / 5; min-height: 0; max-height: none; }
  .vt-player__top .pill { padding: 7px 12px 7px 10px; font-size: .82rem; }
  .vt-player__start { gap: 20px; }
  .vt-player__hint { font-size: .8rem; padding: 9px 14px; }
  .vt-player__fallback { padding: 12px; align-items: end; }
  .vt-fb { padding: 22px 18px 18px; gap: 10px; }
  .vt-fb__ic { width: 48px; height: 48px; margin-bottom: 0; }
  .vt-fb p { font-size: .9rem; }
  .vt-fb__btns { width: 100%; margin-top: 6px; }
  .vt-fb__btns .btn { flex: 1 1 100%; --h: 50px; }
  .vt-player[data-state="off"] .vt-fb { gap: 14px; padding: 20px 18px 18px; }
  .vt-player[data-state="off"] .vt-fb__ic { width: 48px; height: 48px; font-size: .9rem; }
  .vt-player[data-state="off"] .vt-fb h3 { font-size: 1.2rem; }
  .vt-player[data-state="off"] .vt-fb p { font-size: .9rem; }
  .vt-player[data-state="off"] .vt-fb__txt { display: contents; }
  .vt-player[data-state="off"] .vt-fb p { grid-column: 1 / -1; margin: -2px 0 0; }
  .vt-player[data-state="off"] .vt-fb__btns { grid-column: 1 / -1; margin-top: 4px; }
  .vt-detail .apt__ctas .btn { flex: 1 1 100%; }
  .vt-plan-crop { padding: 12px; }
  /* pe telefon, pașii devin un carusel orizontal cu snap */
  .vt-how__grid {
    display: flex; gap: 10px;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .vt-how__grid::-webkit-scrollbar { display: none; }
  .vt-tip { flex: 0 0 84%; scroll-snap-align: start; }
  .vt-demo { height: 160px; }
}
