/* ============================================================================
 * TASK-04: Stili Slide 1 - Hero Video & Selettori Rapidi di Ricerca (Coastal Luxury)
 * ============================================================================ */

/* Header Trasparente Sovrapposto all'Immagine/Video (senza barra piena in alto) */
.pathos-hero-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(
    180deg,
    rgba(15, 25, 42, 0.62) 0%,
    rgba(15, 25, 42, 0.25) 62%,
    rgba(15, 25, 42, 0) 100%
  );
  border: none;
  box-shadow: none;
  padding: 1.35rem 0 1.5rem;
}

.pathos-hero-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

/* Logo Trasparente Molto Grande a Sinistra + Tagline Sottostante */
.pathos-hero-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: transparent;
  padding: 0;
  margin-left: 0.5rem;
}

.pathos-hero-brand-img {
  height: clamp(135px, 16.5vw, 215px);
  width: auto;
  max-width: min(380px, 72vw);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 18px rgba(10, 18, 32, 0.45));
}

.pathos-hero-brand-tagline {
  margin-top: 0.45rem;
  font-family: var(--font-sans);
  font-size: clamp(0.62rem, 0.82vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFBF6;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

/* Menu di Navigazione Orizzontale Sovrapposto all'Immagine + Bottone Pill "Contattaci →" */
.pathos-hero-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.65rem, 1.25vw, 1.5rem);
  margin-top: 2.15rem;
}

.pathos-hero-nav-link {
  position: relative;
  color: #FFFBF6 !important;
  font-family: var(--font-sans);
  font-size: clamp(0.86rem, 0.95vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.35rem 0;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.58);
  transition: color 180ms ease, opacity 180ms ease;
}

.pathos-hero-nav-link:hover {
  color: #E7D9BF !important;
}

.pathos-hero-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 34px;
  height: 2px;
  background-color: #CBA86B;
  border-radius: 2px;
}

/* Bottone Pill "Contattaci →" alla fine del menu */
.pathos-hero-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.68rem 1.5rem;
  border-radius: 9999px;
  background: rgba(182, 148, 94, 0.88);
  border: 1px solid rgba(255, 251, 246, 0.65);
  color: #FFFBF6 !important;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 0.92vw, 0.95rem);
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}

.pathos-hero-cta-pill:hover {
  background: rgba(203, 168, 107, 0.96);
  color: #1E2D3D !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.42);
}

.pathos-hero-header .pathos-hamburger-btn {
  border-color: rgba(203, 168, 107, 0.85);
  background-color: rgba(15, 23, 42, 0.72);
  color: #FFFBF6;
}

.pathos-hero-header .pathos-hamburger-btn .hamburger-bar {
  background-color: #FFFBF6;
}

.pathos-hero-header .pathos-hamburger-btn.is-open {
  background-color: #CBA86B !important;
  border-color: #FFFBF6 !important;
}

.pathos-hero-header .pathos-hamburger-btn.is-open .hamburger-bar {
  background-color: #1E2D3D !important;
}

@media (max-width: 1120px) {
  .pathos-hero-brand-img {
    height: clamp(95px, 13vw, 135px);
  }
  .pathos-hero-brand-tagline {
    font-size: 0.54rem;
    letter-spacing: 0.14em;
  }
  .pathos-hero-nav {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 980px) {
  .pathos-hero-header {
    padding: 0.45rem 0 0.5rem;
  }
  .pathos-hero-header-inner {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
  }
  .pathos-hero-brand {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    flex: 0 0 auto;
  }
  .pathos-hero-brand-img {
    height: clamp(88px, 20.8vw, 130px);
    max-width: min(338px, 78vw);
    margin-left: auto;
    margin-right: auto;
  }
  .pathos-hero-brand-tagline {
    margin-top: 0.15rem;
    font-size: 0.48rem;
    letter-spacing: 0.11em;
    white-space: nowrap;
    text-align: center;
    max-width: none;
    line-height: 1.25;
  }
  .pathos-hero-header .pathos-hamburger-btn {
    position: relative;
    top: auto;
    right: auto;
    align-self: flex-end;
    margin-top: 0.15rem;
  }
  .pathos-hero-nav {
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    margin-top: 0 !important;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    padding: 1rem !important;
    background-color: rgba(15, 23, 42, 0.97) !important;
    border: 1px solid rgba(203, 168, 107, 0.55) !important;
    border-bottom: 2px solid #CBA86B !important;
    border-radius: 0.85rem;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55) !important;
  }
  .pathos-hero-nav.is-open {
    display: flex !important;
  }
  .pathos-hero-nav-link.is-active::after {
    display: none !important;
  }
  .pathos-hero-nav a {
    width: 100%;
    background-color: rgba(255, 251, 246, 0.08) !important;
    color: #FFFBF6 !important;
    border: 1px solid rgba(203, 168, 107, 0.28) !important;
    text-shadow: none;
  }
  .pathos-hero-nav a.is-active {
    background-color: rgba(203, 168, 107, 0.22) !important;
    border-color: #CBA86B !important;
    color: #FFFBF6 !important;
  }
  .pathos-hero-nav a:hover {
    background-color: rgba(203, 168, 107, 0.28) !important;
    border-color: #CBA86B !important;
  }
  .pathos-hero-nav a.pathos-hero-cta-pill {
    justify-content: center !important;
    background: #CBA86B !important;
    color: #1E2D3D !important;
    border-color: #CBA86B !important;
    font-weight: 700;
    margin-top: 0.25rem;
  }
}

.hero-slide {
  position: relative;
  width: 100%;
  max-width: 1920px;
  min-height: clamp(680px, 100vh, 1080px);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-deep-navy); /* #1E2D3D fallback per video hero */
  padding: clamp(235px, 28vh, 305px) 0 4.5rem;
}

@media (min-width: 1920px) {
  .hero-slide {
    width: 1920px;
    min-height: 1080px;
  }
}

/* Video Background a tutto schermo (1920 × 1080 Full HD) */
.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-deep-navy);
}

.hero-video-bg,
.hero-photo-bg {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.04);
}

/* Overlay Gradiente Deep Navy (#1E2D3D ad alto contrasto per leggibilità sul video) */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    165deg,
    rgba(30, 45, 61, 0.88) 0%,
    rgba(30, 45, 61, 0.78) 50%,
    rgba(30, 45, 61, 0.92) 100%
  );
}

/* 3 Frasi e Bottone a Sinistra Sotto il Logo sulla Prima Slide (Hero) */
.hero-left-phrases-container {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  pointer-events: none;
}

.hero-left-phrases-block {
  pointer-events: auto;
  max-width: 580px;
  margin-left: 0.5rem;
  margin-top: 2cm;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Frase 1: Carattere Serif Elegante Bianco ("More than properties,") */
.hero-phrase-serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 4.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #FFFBF6;
  text-shadow: 0 4px 18px rgba(10, 18, 32, 0.52);
  white-space: pre-line;
  margin: 0;
}

/* Frase 2: Carattere Corsivo Calligrafico Oro ("we create experiences.") */
.hero-phrase-script {
  font-family: "Allura", "Alex Brush", cursive;
  font-size: clamp(3rem, 5.4vw, 5.1rem);
  font-weight: 400;
  line-height: 0.88;
  color: #DFC394;
  text-shadow: 0 3px 16px rgba(10, 18, 32, 0.55);
  white-space: pre-line;
  margin: 0.15rem 0 1.35rem;
}

/* Frase 3: Carattere Sans-Serif Descrittivo Bianco */
.hero-phrase-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.15vw, 1.14rem);
  font-weight: 400;
  line-height: 1.48;
  color: #FFFBF6;
  text-shadow: 0 2px 12px rgba(10, 18, 32, 0.65);
  white-space: pre-line;
  margin: 0 0 1.65rem;
  max-width: 490px;
}

/* Bottone Rettangolare "SCOPRI DI PIÙ →" */
.hero-phrase-discover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.82rem 2.15rem;
  border: 1.25px solid rgba(255, 251, 246, 0.88);
  border-radius: 3px;
  background: rgba(15, 25, 42, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFBF6 !important;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(10, 18, 32, 0.28);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.hero-phrase-discover-btn:hover {
  background: rgba(203, 168, 107, 0.92);
  border-color: #CBA86B;
  color: #1E2D3D !important;
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .hero-slide {
    aspect-ratio: auto;
    min-height: clamp(540px, 84svh, 760px);
    padding: 8.75rem 0 3.25rem;
    align-items: center;
  }
  .hero-left-phrases-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 0 1.25rem;
  }
  .hero-left-phrases-block {
    margin-left: 0;
    margin-top: 2cm;
    max-width: 100%;
  }
  .hero-phrase-serif {
    font-size: clamp(2rem, 6.8vw, 2.85rem);
  }
  .hero-phrase-script {
    font-size: clamp(2.4rem, 8.2vw, 3.4rem);
    margin: 0.1rem 0 1rem;
  }
  .hero-phrase-desc {
    font-size: 0.9rem;
    margin-bottom: 1.15rem;
    max-width: 100%;
  }
  .hero-phrase-discover-btn {
    padding: 0.72rem 1.55rem;
    font-size: 0.74rem;
  }
}

/* Contenuto principale Hero (logo centrale sulla prima slide) */
.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.hero-brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.hero-brand-logo-img {
  width: auto;
  height: clamp(115px, 16vh, 175px);
  max-width: min(320px, 78vw);
  object-fit: contain;
  display: block;
}

.hero-copy {
  max-width: 560px;
  margin: 0 auto;
  background-color: rgba(30, 45, 61, 0.78); /* Deep Navy #1E2D3D compatto e leggibile */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(203, 168, 107, 0.45);
  border-radius: 0.95rem;
  padding: 1.05rem 1.35rem;
  box-shadow: 0 14px 34px rgba(30, 45, 61, 0.48);
}

.hero-copy .badge-accent {
  background-color: #7FBBD6; /* Coastal Blue solido */
  color: #1E2D3D;            /* Deep Navy ad alto contrasto */
  border-color: #FFFBF6;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 0.2rem 0.65rem;
  letter-spacing: 0.04em;
}

.hero-headline {
  font-size: clamp(1.3rem, 2.6vw, 2.15rem);
  font-weight: 800;
  color: #FFFBF6 !important; /* Ivory White garantito contro regole globali h1 */
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.55rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.42);
}

.hero-headline-accent {
  color: #CBA86B !important; /* Warm Gold */
}

.hero-payoff {
  font-size: clamp(0.8rem, 1.05vw, 0.92rem);
  color: #FFFBF6 !important; /* Ivory White ad alto contrasto */
  line-height: 1.45;
  max-width: 490px;
  margin: 0 auto;
  opacity: 0.95;
}

/* ============================================================================
 * Selettori Rapidi di Ricerca (Frosted Glass Box in Ivory White #FFFBF6)
 * Ridotti del ~40% e ottimizzati per schermi Mobile / Tablet
 * ============================================================================ */
.hero-search-card {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  background-color: rgba(255, 251, 246, 0.94); /* Ivory White */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-sand-beige);   /* #E7D9BF */
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 40px -10px rgba(30, 45, 61, 0.42),
              0 0 0 1px rgba(203, 168, 107, 0.25);
  text-align: left;
  color: var(--color-deep-navy);
}

/* Tab di selezione contratto: [Vendita] | [Affitto] | [Short Rent] */
.contract-tabs-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background-color: rgba(231, 217, 191, 0.55); /* Sand Beige */
  border: 1px solid var(--color-sand-beige);
  padding: 0.2rem;
  border-radius: 0.55rem;
  margin-bottom: 0.6rem;
}

.contract-tab {
  appearance: none;
  background: transparent;
  color: var(--color-deep-navy); /* #1E2D3D */
  border: 1px solid transparent;
  border-radius: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.contract-tab:hover {
  color: var(--color-deep-navy);
  background-color: rgba(255, 251, 246, 0.75);
}

.contract-tab.is-active,
.contract-tab[aria-selected="true"] {
  background-color: var(--color-warm-gold); /* #CBA86B */
  color: var(--color-deep-navy);            /* #1E2D3D */
  box-shadow: 0 2px 8px rgba(203, 168, 107, 0.38);
}

#hero-active-filter-summary {
  font-size: 0.66rem;
  padding: 0.16rem 0.55rem;
  margin-bottom: 0.6rem;
}

/* Barra filtri: orizzontale compatta su desktop, griglia ultracompatta su mobile */
.hero-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr auto;
  gap: 0.55rem;
  align-items: stretch;
}

/* Singolo campo filtro */
.search-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  background-color: #FFFFFF;
  border: 1px solid var(--color-sand-beige); /* #E7D9BF */
  border-radius: 0.55rem;
  padding: 0.42rem 0.65rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-field:focus-within {
  border-color: var(--color-warm-gold);
  box-shadow: 0 0 0 2px rgba(203, 168, 107, 0.22);
}

.search-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.search-field-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-warm-gold-dark); /* #9B783B */
}

.search-budget-output {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-deep-navy);
  font-variant-numeric: tabular-nums;
}

.search-select {
  width: 100%;
  background: transparent;
  color: var(--color-deep-navy);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.05rem 0;
  outline: none;
  cursor: pointer;
}

.search-select option {
  background-color: var(--color-ivory-white); /* #FFFBF6 */
  color: var(--color-deep-navy);
}

/* Range Slider Budget/Prezzo */
.search-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #CBA86B 0%,
    #CBA86B var(--range-progress, 50%),
    #E7D9BF var(--range-progress, 50%),
    #E7D9BF 100%
  );
  outline: none;
  margin: 0.2rem 0 0.08rem;
  cursor: pointer;
}

.search-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-warm-gold); /* #CBA86B */
  border: 2px solid var(--color-deep-navy); /* #1E2D3D */
  box-shadow: 0 2px 6px rgba(203, 168, 107, 0.6);
  cursor: pointer;
  transition: transform 150ms ease;
}

.search-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.search-range-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-warm-gold);
  border: 2px solid var(--color-deep-navy);
  box-shadow: 0 2px 6px rgba(203, 168, 107, 0.6);
  cursor: pointer;
}

.hero-cta-btn {
  height: 100%;
  min-height: 40px;
  padding: 0.45rem 1.05rem;
  font-size: 0.8rem;
  border-radius: 0.55rem;
  white-space: nowrap;
  width: 100%;
}

.hero-cta-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1023px) {
  .hero-slide {
    aspect-ratio: auto;
    min-height: clamp(580px, 84vh, 860px);
    min-height: clamp(580px, 84svh, 860px);
    padding: clamp(185px, 24vh, 245px) 0 3.5rem;
  }
  .hero-copy {
    max-width: 500px;
    padding: 0.9rem 1.15rem;
  }
  .hero-headline {
    font-size: clamp(1.22rem, 2.8vw, 1.75rem);
    margin: 0.4rem 0 0.45rem;
  }
  .hero-payoff {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .hero-search-card {
    max-width: 640px;
    padding: 0.75rem 0.85rem;
  }
  .hero-search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .hero-search-cta-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .pathos-hero-brand-img {
    height: clamp(146px, 34.3vw, 215px);
    max-width: min(442px, 84vw);
    margin-left: auto;
    margin-right: auto;
  }
  .pathos-hero-brand-tagline {
    margin-top: 0.12rem;
    font-size: clamp(0.45rem, 2.05vw, 0.5rem);
    letter-spacing: 0.11em;
    white-space: nowrap;
    text-align: center;
    max-width: none;
  }
  .hero-brand-logo-wrap {
    padding: 0;
  }
  .hero-brand-logo-img {
    height: clamp(161px, 22.5vh, 244px);
    max-width: min(446px, 86vw);
  }
  .hero-search-card {
    max-width: min(68vw, 340px);
    padding: 0.38rem 0.45rem;
    border-radius: 0.5rem;
  }
  .contract-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    padding: 0.1rem;
    gap: 0.12rem;
    margin-bottom: 0.28rem;
  }
  .contract-tab {
    padding: 0.18rem 0.14rem;
    font-size: 0.5rem;
    text-align: center;
  }
  #hero-active-filter-summary {
    display: none;
  }
  .hero-search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.28rem;
  }
  .hero-search-grid > .search-field:nth-child(3) {
    grid-column: 1 / -1;
  }
  .hero-search-cta-col {
    grid-column: 1 / -1;
  }
  .search-field {
    padding: 0.22rem 0.35rem;
    gap: 0.08rem;
    border-radius: 0.35rem;
  }
  .search-field-label {
    font-size: 0.42rem;
    letter-spacing: 0.02em;
  }
  .search-budget-output {
    font-size: 0.48rem;
  }
  .search-select {
    font-size: 0.54rem;
    padding: 0;
    background-size: 10px;
  }
  .search-range-input {
    height: 3px;
    margin: 0.08rem 0 0.02rem;
  }
  .hero-cta-btn {
    min-height: 24px;
    padding: 0.26rem 0.6rem;
    font-size: 0.55rem;
    border-radius: 0.35rem;
  }
}

@media (max-width: 639px) {
  .pathos-hero-brand-img {
    height: clamp(146px, 34.3vw, 215px);
    max-width: min(442px, 84vw);
    margin-left: auto;
    margin-right: auto;
  }
  .pathos-hero-brand-tagline {
    margin-top: 0.12rem;
    font-size: clamp(0.45rem, 2.05vw, 0.5rem);
    letter-spacing: 0.11em;
    white-space: nowrap;
    text-align: center;
    max-width: none;
  }
  .hero-slide {
    aspect-ratio: auto;
    min-height: clamp(540px, 82vh, 760px);
    min-height: clamp(540px, 82svh, 760px);
    padding: 10.5rem 0 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-video-wrapper,
  .hero-video-bg,
  .hero-photo-bg {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .hero-content {
    gap: 0.7rem;
  }
  .hero-brand-logo-wrap {
    padding: 0;
  }
  .hero-brand-logo-img {
    height: clamp(156px, 22.5vh, 240px);
    max-width: min(446px, 86vw);
  }
  .hero-copy {
    max-width: 94%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.7rem;
    background-color: rgba(30, 45, 61, 0.76);
  }
  .hero-copy .badge-accent {
    font-size: 0.56rem;
    padding: 0.12rem 0.45rem;
    letter-spacing: 0.03em;
  }
  .hero-headline {
    font-size: clamp(1.05rem, 4.2vw, 1.28rem);
    line-height: 1.16;
    margin: 0.3rem 0 0.3rem;
  }
  .hero-payoff {
    font-size: 0.7rem;
    line-height: 1.32;
    max-width: 100%;
  }
  .hero-search-card {
    max-width: min(68vw, 310px);
    padding: 0.38rem 0.45rem;
    border-radius: 0.5rem;
  }
  .contract-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    padding: 0.1rem;
    gap: 0.12rem;
    margin-bottom: 0.28rem;
  }
  .contract-tab {
    padding: 0.18rem 0.14rem;
    font-size: 0.5rem;
    text-align: center;
  }
  #hero-active-filter-summary {
    display: none;
  }
  .hero-search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.28rem;
  }
  .hero-search-grid > .search-field:nth-child(3) {
    grid-column: 1 / -1;
  }
  .hero-search-cta-col {
    grid-column: 1 / -1;
  }
  .search-field {
    padding: 0.22rem 0.35rem;
    gap: 0.08rem;
    border-radius: 0.35rem;
  }
  .search-field-label {
    font-size: 0.42rem;
    letter-spacing: 0.02em;
  }
  .search-budget-output {
    font-size: 0.48rem;
  }
  .search-select {
    font-size: 0.54rem;
    padding: 0;
    background-size: 10px;
  }
  .search-range-input {
    height: 3px;
    margin: 0.08rem 0 0.02rem;
  }
  .hero-cta-btn {
    min-height: 24px;
    padding: 0.26rem 0.6rem;
    font-size: 0.55rem;
    border-radius: 0.35rem;
  }
}

/* Fallback CSS per ridotta animazione e dispositivi a risparmio energetico */
@media (prefers-reduced-motion: reduce) {
  .hero-video-bg {
    display: none;
  }
  .hero-fallback-poster {
    opacity: 1 !important;
  }
}

/* ============================================================================
 * Barra Controlli & Gestione Admin Video Hero (Slide 1)
 * ============================================================================ */
.hero-video-controls-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: rgba(30, 45, 61, 0.88);
  border: 1px solid #CBA86B;
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  box-shadow: 0 10px 28px rgba(30, 45, 61, 0.45);
}

.hero-video-status-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: #FFFBF6;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-video-ctrl-btn {
  appearance: none;
  background-color: rgba(255, 251, 246, 0.14);
  color: #FFFBF6;
  border: 1px solid rgba(231, 217, 191, 0.45);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-video-ctrl-btn:hover {
  background-color: #CBA86B;
  color: #1E2D3D;
  border-color: #CBA86B;
}

.hero-admin-trigger-btn {
  appearance: none;
  background-color: #CBA86B;
  color: #1E2D3D;
  border: 1px solid #FFFBF6;
  border-radius: 9999px;
  padding: 0.34rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(203, 168, 107, 0.45);
}

.hero-admin-trigger-btn:hover {
  background-color: #D7BA85;
  transform: translateY(-1px);
}

/* Modale Admin Gestione & Upload Video di Sfondo Slide 1 */
.hero-admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background-color: rgba(30, 45, 61, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.hero-admin-modal-backdrop.is-open {
  display: flex;
}

.hero-admin-modal-dialog {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #FFFBF6; /* Ivory White */
  color: #1E2D3D;            /* Deep Navy */
  border: 2px solid #CBA86B; /* Warm Gold */
  border-radius: 1.25rem;
  box-shadow: 0 28px 70px rgba(30, 45, 61, 0.65);
  text-align: left;
}

.hero-admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  background-color: #1E2D3D;
  color: #FFFBF6;
  border-bottom: 2px solid #CBA86B;
}

.hero-admin-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.hero-admin-box {
  background-color: #FFFFFF;
  border: 1px solid #E7D9BF;
  border-radius: 0.95rem;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 8px 24px -6px rgba(30, 45, 61, 0.06);
}

.hero-admin-dropzone {
  border: 2px dashed #CBA86B;
  background-color: rgba(231, 217, 191, 0.35);
  border-radius: 0.85rem;
  padding: 1.25rem;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.hero-admin-dropzone:hover {
  background-color: rgba(127, 187, 214, 0.18);
  border-color: #1E2D3D;
}

.hero-admin-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.65rem;
}

@media (max-width: 767px) {
  .hero-admin-presets-grid {
    grid-template-columns: 1fr;
  }
}

.hero-preset-card {
  background-color: #FFFBF6;
  border: 1px solid #E7D9BF;
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
}

.hero-preset-card.is-active {
  border-color: #CBA86B;
  background-color: rgba(231, 217, 191, 0.45);
}

/* ============================================================================
   3ª SLIDE: IL TERRITORIO & I 5 PAESI PRINCIPALI DEL CATALOGO (#slide-4-territorio)
   ============================================================================ */
.territory-showcase-slide {
  position: relative;
  width: 100%;
  min-height: clamp(540px, 68vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0e2236;
  padding: 5.5rem 0;
}

.territory-bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.territory-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.territory-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 22, 38, 0.68) 0%,
    rgba(12, 31, 52, 0.28) 48%,
    rgba(8, 22, 38, 0.64) 100%
  );
  opacity: var(--territory-overlay-opacity, 0.65);
  pointer-events: none;
}

.territory-slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.territory-left-col {
  flex: 1 1 52%;
  max-width: 600px;
  text-align: left;
}

.territory-phrase-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.55rem, 4.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.06;
  color: #f4e2b8;
  letter-spacing: -0.01em;
  white-space: pre-line;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}

.territory-phrase-script {
  font-family: "Great Vibes", "Allura", cursive;
  font-size: clamp(3rem, 5.2vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  color: #dfb78c;
  margin: 0.1rem 0 2.15rem;
  white-space: pre-line;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.territory-discover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 2.25rem;
  border: 1.5px solid rgba(223, 183, 140, 0.82);
  background: rgba(11, 25, 42, 0.36);
  backdrop-filter: blur(4px);
  color: #fffbf6;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 220ms ease;
}

.territory-discover-btn:hover {
  background: rgba(223, 183, 140, 0.24);
  border-color: #f4e2b8;
  transform: translateY(-2px);
}

.territory-right-col {
  flex: 0 1 400px;
  display: flex;
  align-items: stretch;
  gap: 1.65rem;
}

.territory-vertical-axis {
  position: relative;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 251, 246, 0.15) 0%,
    rgba(255, 251, 246, 0.72) 15%,
    rgba(255, 251, 246, 0.72) 88%,
    rgba(255, 251, 246, 0.15) 100%
  );
  flex-shrink: 0;
}

.territory-axis-star {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fffbf6;
  font-size: 0.95rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.95), 0 0 22px rgba(223, 183, 140, 0.85);
}

.territory-locations-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.territory-location-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0.35rem;
  border-bottom: 1px solid rgba(255, 251, 246, 0.38);
  color: #fffbf6;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  transition: color 180ms ease, padding-left 180ms ease, border-color 180ms ease;
}

.territory-location-btn:last-child {
  border-bottom: none;
}

.territory-location-btn:hover {
  color: #f4e2b8;
  padding-left: 0.75rem;
  border-bottom-color: rgba(244, 226, 184, 0.75);
}

@media (max-width: 900px) {
  .territory-showcase-slide {
    min-height: auto;
    padding: 3.75rem 0;
  }

  .territory-slide-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.25rem;
  }

  .territory-right-col {
    flex: 1 1 auto;
    width: 100%;
    max-width: 440px;
  }
}

@media (max-width: 639px) {
  .territory-showcase-slide {
    padding: 3rem 0;
  }

  .territory-phrase-serif {
    font-size: clamp(2rem, 7.5vw, 2.6rem);
  }

  .territory-phrase-script {
    font-size: clamp(2.4rem, 8.5vw, 3.2rem);
    margin: 0.1rem 0 1.45rem;
  }

  .territory-discover-btn {
    width: 100%;
    padding: 0.85rem 1.35rem;
    font-size: 0.78rem;
  }

  .territory-right-col {
    gap: 1.1rem;
    max-width: 100%;
  }

  .territory-location-btn {
    padding: 0.85rem 0.25rem;
    font-size: 0.8rem;
    letter-spacing: 0.11em;
  }
}

