﻿/* ── Vision Immobiliare — Hero ──────────────── */

.vi-hero {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 480px;
  overflow: hidden;
}

/* Slide */
.vi-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 0;
}

.vi-hero__slide.active {
  opacity: 1;
  z-index: 1;
}

/* Immagine sfondo */
.vi-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease-out;
}

.vi-hero__slide.active .vi-hero__bg {
  transform: scale(1);
}

/* Overlay gradient */
.vi-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(31, 31, 31, 0.75) 0%,
    rgba(31, 31, 31, 0.4) 50%,
    rgba(31, 31, 31, 0.2) 100%
  );
}

/* Contenuto */
.vi-hero__content {
  max-width: 620px;
  padding-top: 80px;
}

.vi-hero__badge {
  display: inline-block;
  background: rgba(var(--bs-primary-rgb), 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.vi-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.vi-hero__body {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 28px;
}

.vi-hero__cta {
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.vi-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb), 0.35);
}

/* ── Frecce navigazione ─────────────────────── */

.vi-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vi-hero__arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

.vi-hero__arrow--prev { left: 24px; }
.vi-hero__arrow--next { right: 24px; }

/* ── Indicatori ─────────────────────────────── */

.vi-hero__indicators {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.vi-hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.vi-hero__dot.active {
  background: rgb(var(--bs-primary-rgb));
  border-color: rgb(var(--bs-primary-rgb));
  transform: scale(1.2);
}

.vi-hero__dot:hover {
  border-color: #fff;
}

/* ── Reveal animation ───────────────────────── */

.vi-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.vi-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vi-reveal--delay-1 { transition-delay: 0.15s; }
.vi-reveal--delay-2 { transition-delay: 0.3s; }
.vi-reveal--delay-3 { transition-delay: 0.45s; }

/* ── Responsive ─────────────────────────────── */

@media (max-width: 767.98px) {
  .vi-hero { height: auto; min-height: 440px; }
  .vi-hero__content { padding-top: 100px; }
  .vi-hero__arrow { display: none; }
  .vi-hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(31, 31, 31, 0.3) 0%,
      rgba(31, 31, 31, 0.8) 100%
    );
  }
  .vi-hero__content {
    align-self: flex-end;
    padding-bottom: 80px;
  }
}


.vi-search-hero {
  position: relative;
  z-index: 5;
  margin-top: -80px;          /* sporge dal fondo dell'hero, resta sopra il fold */
  margin-bottom: 48px;
  padding: 0 16px;
}

.vi-search-hero__form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;  /* 5 campi + submit */
  gap: 14px 14px;
  align-items: end;
}

.vi-search-hero__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vi-search-hero__field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(31, 31, 31, 0.55);
  margin: 0;
}

.vi-search-hero__field select,
.vi-search-hero__field input {
  width: 100%;
  height: 44px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  font-size: 14px;
  padding: 0 12px;
  background: #fff;
  color: #1F1F1F;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.vi-search-hero__field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231F1F1F'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 30px;
}

.vi-search-hero__field select:focus,
.vi-search-hero__field input:focus {
  border-color: rgb(var(--bs-primary-rgb));
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.12);
  outline: none;
}

.vi-search-hero__submit {
  background: rgb(var(--bs-primary-rgb));
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 24px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  height: 44px;
  cursor: pointer;
  white-space: nowrap;
}

.vi-search-hero__submit:hover {
  background: #a81a22;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.35);
}

/* ── Responsive ───────────────────────────────── */

/* 5 campi + submit ci stanno larghi solo su schermi ≥ 1200px.
   Tra 992 e 1199 mettiamo i campi su 3 colonne (= 2 righe) e
   il submit full-width sotto. */
@media (max-width: 1199.98px) and (min-width: 992px) {
  .vi-search-hero__form {
    grid-template-columns: repeat(3, 1fr);
  }
  .vi-search-hero__submit {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 991.98px) {
  .vi-search-hero {
    margin-top: -50px;
  }
  .vi-search-hero__form {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }
  .vi-search-hero__submit {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .vi-search-hero__form {
    grid-template-columns: 1fr;
  }
}

.vi-stats {
  padding: 56px 0 32px;
  background: #fff;
}

.vi-stat {
  padding: 16px 8px;
}

.vi-stat__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: rgb(var(--bs-primary-rgb));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: all 0.3s ease;
}

.vi-stat:hover .vi-stat__icon {
  background: rgb(var(--bs-primary-rgb));
  color: #fff;
  transform: translateY(-3px);
}

.vi-stat__value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--bs-dark);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.vi-stat__value::after {
  content: '+';
  color: rgb(var(--bs-primary-rgb));
  margin-left: 2px;
}

.vi-stat__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(31, 31, 31, 0.65);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 575.98px) {
  .vi-stats {
    padding: 40px 0 16px;
  }
  .vi-stat__icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}