/* ============================================================
   FONT + PALETTE
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
  --primary-dark: #051c2c;
  --white: #ffffff;
  --gold: #be964f;
}

/* ============================================================
   GLOBAL
============================================================ */
html, body {
  margin: 0;
  padding: 0;
  background: var(--primary-dark);
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5 {
  font-family: "Playfair Display", serif;
  letter-spacing: .4px;
}

a, button {
  transition: .3s ease;
}

/* ============================================================
   NAVBAR TRASPARENTE + HAMBURGER BIANCO
============================================================ */
.navbar-transparent {
  background: transparent !important;
  backdrop-filter: blur(2px);
  box-shadow: none !important;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 50;
  padding-top: 15px;
}

.navbar-transparent .nav-link {
  color: var(--white) !important;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar-toggler {
  border-color: #fff !important;
}

.navbar-toggler-icon {
  filter: invert(100%) brightness(200%);
}

.logo-navbar {
  height: 55px;
  object-fit: contain;
}

/* ============================================================
   HERO FULLSCREEN + VIDEO
============================================================ */
.hero {
  position: relative;
  height: 100vh !important;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
}

/* wrapper video */
.video-background {
  position: absolute;
  inset: 0;
  z-index: 0;          /* NON negativo, così resta visibile */
  overflow: hidden;
}

/* video */
.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  filter: brightness(55%);
  z-index: 0;
}

/* logo centrale in alto */
.hero-overlay-logo {
  position: absolute;
  top: 30px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.hero-main-logo {
  width: 180px;
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.5));
}

/* ============================================================
   SEARCH BAR TRASPARENTE + ORIZZONTALE (DESKTOP)
============================================================ */
.hero-search-container {
  position: absolute;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20;
}

.search-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 95%;
  max-width: 1200px;
}

/* contenitore interno */
.search-bar {
  background: rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
}

.search-bar .row {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  width: 100%;
}

/* campi */
.search-bar input,
.search-bar select {
  height: 56px;
  font-size: 1.05rem;
  white-space: nowrap;
  background: rgba(255,255,255,0.2) !important;
  color: var(--white) !important;
  border: 1px solid rgba(255,255,255,0.3);
}

.search-bar input::placeholder {
  color: #eee !important;
}

/* forza orizzontalità e proporzioni desktop */
.search-bar .col-12,
.search-bar .col-md-4,
.search-bar .col-md-2,
.search-bar .col-md-3 {
  min-width: 0 !important;
  flex: 1 !important;
}

#filterKeyword { flex: 2.2 !important; }
#filterTipologia { flex: 1 !important; }
#filterPrezzoMin { flex: 1 !important; }
#filterPrezzoMax { flex: 1 !important; }

/* pulsanti */
.search-bar button {
  height: 56px !important;
  font-size: 1.05rem;
  background: var(--gold) !important;
  border: none !important;
  color: var(--primary-dark) !important;
  font-weight: 600;
  border-radius: 50px !important;
  white-space: nowrap;
}

/* filtri avanzati */
#advancedFilters .row {
  flex-wrap: wrap !important;
}

/* ============================================================
   SERVIZI – IMMAGINI RIDIMENSIONATE
============================================================ */
.servizi-img-box {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.servizi-img-box img {
  width: 80%;
  height: auto;
  object-fit: contain;
}

/* ============================================================
   CARD IMMOBILI
============================================================ */
.property-card,
.card {
  background: #072236 !important;
  border: none !important;
  border-radius: 14px !important;
  color: var(--white) !important;
}

.card-img-top {
  height: 220px;
  object-fit: cover;
}

.icons-feature {
  display: flex;
  gap: 16px;
  margin: 10px 0;
}

.icon-imm {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.badge-luxury {
  background: var(--gold) !important;
  color: var(--primary-dark) !important;
}

/* ============================================================
   DETTAGLIO IMMOBILE FULLSCREEN
============================================================ */
body.show-details #dettaglio {
  background: var(--primary-dark);
  padding: 30px;
  border-radius: 0 !important;
  width: 100vw;
  max-width: 100vw;
  color: var(--white);
  display: block !important;
}

body.show-details nav,
body.show-details .hero,
body.show-details #immobili,
body.show-details #servizi,
body.show-details #agenzia,
body.show-details #vendi,
body.show-details #googleReviews,
body.show-details footer,
body.show-details .btn-contact {
  display: none !important;
}

#carouselDettagli img,
#carouselDettagli video {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 14px;
}

.tech-box {
  background: rgba(255,255,255,0.12);
  padding: 12px;
  border-radius: 10px;
  font-size: .9rem;
}

/* ============================================================
   MAPPA
============================================================ */
#mapDettaglio {
  border-radius: 10px;
  background: #ccc;
}

/* ============================================================
   FOOTER – COLORE #051c2c + TESTI BIANCHI GRASSETTO
============================================================ */
/* override di bg-dark di Bootstrap */
footer.bg-dark {
  background-color: var(--primary-dark) !important;
}

footer {
  background: var(--primary-dark) !important;
  color: #fff !important;
  padding-top: 70px;
  padding-bottom: 40px;
  border-top: 2px solid rgba(255,255,255,0.15);
}

footer h5,
footer strong,
footer p,
footer a,
footer .small {
  color: #fff !important;
  font-weight: 600 !important;
}

footer a:hover {
  color: var(--gold) !important;
}

footer .copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  opacity: .9;
}

/* ============================================================
   PULSANTI WHATSAPP + CHIAMA ORA
============================================================ */
.btn-contact {
  position: fixed;
  right: 20px;
  z-index: 999;
  width: 200px;
  padding: 12px 18px !important;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(4px);
}

/* WhatsApp */
.btn-contact.btn-success {
  bottom: 100px;
  background: #25D366 !important;
  border: none !important;
  color: #fff !important;
}

/* Chiama ora */
.btn-contact.btn-call-home {
  bottom: 40px;
  background: var(--gold) !important;
  border: none !important;
  color: var(--primary-dark) !important;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 992px) {
  /* a questa larghezza inizio a permettere il wrap */
  .search-bar .row {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 768px) {
  .hero-main-logo {
    width: 140px;
  }

  .hero-search-container {
    bottom: 20px;
  }

  .search-panel {
    width: 100%;
    max-width: none;
    padding: 0 10px !important;
  }

  .search-bar {
    padding: 12px 14px;
  }

  .search-bar .row {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  /* su mobile ogni campo occupa la riga intera */
  .search-bar .col-12,
  .search-bar .col-md-4,
  .search-bar .col-md-2,
  .search-bar .col-md-3 {
    flex: 0 0 100% !important;
  }

  #filterKeyword,
  #filterTipologia,
  #filterPrezzoMin,
  #filterPrezzoMax {
    flex: 0 0 100% !important;
  }

  .search-bar input,
  .search-bar select {
    font-size: 1rem;
    height: 50px;
  }

  .search-bar button {
    width: 100%;
  }

  .btn-contact {
    right: 10px;
    width: 180px;
    font-size: 0.9rem;
  }
}
/* ============================================================
   TESTO INTERNO SEARCH BAR — TUTTO BIANCO
============================================================ */

/* Label */
.search-panel label,
.search-panel .form-label {
  color: #ffffff !important;
  font-weight: 600;
}

/* Testo input e select */
.search-bar .form-control,
.search-bar .form-select {
  color: #ffffff !important;
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
}

/* Placeholder */
.search-bar .form-control::placeholder {
  color: rgba(255,255,255,0.75) !important;
}

.search-bar .form-select option {
  color: #000 !important; /* lista nera per leggibilità */
}

/* Fix definitivo per la freccia del SELECT che si ripete */
.search-bar .form-select {
  color: #ffffff !important;
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;

  /* Rimuove QUALSIASI freccia di Bootstrap */
  background-image: none !important;

  /* Aggiunge UNA SOLA freccia bianca */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 16 16'%3e%3cpath d='M3 6l5 5 5-5H3z'/%3e%3c/svg%3e") !important;

  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 18px !important;

  padding-right: 40px !important; /* spazio per la freccia */
}


/* Titoli barra di ricerca */
.section-title,
.search-panel .fw-semibold {
  color: #ffffff !important;
}

/* Bottoni */
.search-bar button.btn-dark {
  color: var(--primary-dark) !important;
  background: var(--gold) !important;
  border: none !important;
}

.search-bar button.btn-outline-secondary {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

.search-bar button.btn-outline-secondary:hover {
  background: rgba(255,255,255,0.25) !important;
}
/* ============================================================
   TESTO ANIMATO SOPRA IL VIDEO
============================================================ */

.hero-text-overlay {
  position: absolute;
  top: 45%;               /* posizione verticale elegante */
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 12;
  opacity: 0;
  animation: fadeUp 2.7s ease forwards;
  pointer-events: none;  /* non interferisce con clic */
}

/* Titolo principale */
.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 4px 14px rgba(0,0,0,0.45);
  margin-bottom: 10px;
}

/* Sottotitolo */
.hero-subtitle {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* Animazione */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate(-75%, -30%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Responsività */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
}
/* ============================================================
   SEZIONE AGENZIA — TESTO COMPLETAMENTE BIANCO
============================================================ */

#agenzia,
#agenzia p,
#agenzia h2,
#agenzia h5,
#agenzia .section-title,
#agenzia .section-heading,
#agenzia .text-muted,
#agenzia .small {
  color: #ffffff !important;
}

/* Rimuove il grigio "muted" di Bootstrap */
#agenzia .text-muted {
  opacity: 1 !important;
}
/* ============================================================
   SEZIONE SERVIZI — TESTI NERI E IN GRASSETTO
============================================================ */

#servizi,
#servizi h2,
#servizi h5,
#servizi p,
#servizi .section-title,
#servizi .section-heading,
#servizi .text-muted,
#servizi .small {
  color: #000000 !important;
  font-weight: 700 !important;
}

/* Assicurati che bg-light rimanga chiaro e non venga scurito dai tuoi override */
#servizi.bg-light {
  background-color: #f8f9fa !important;
}
/* ============================================================
   DETTAGLIO IMMOBILE — LAYOUT BASE
============================================================ */

#dettaglio {
  background: var(--primary-dark);
  padding: 40px 20px;
  border-radius: 14px;
  color: #ffffff;
  display: none;
}

body.show-details #dettaglio {
  display: block !important;
}

body.show-details main,
body.show-details nav,
body.show-details footer,
body.show-details .hero,
body.show-details #immobili,
body.show-details #servizi,
body.show-details #agenzia,
body.show-details #googleReviews,
body.show-details .btn-contact {
  display: none !important;
}

/* Titolo dell'immobile */
#dettaglio .dettaglio-title {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
}

/* Prezzo */
#dettaglio .dettaglio-prezzo {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold);
}

/* Località */
#dettaglio .dettaglio-localita {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 15px;
}

/* ============================================================
   CAROSELLO FOTO
============================================================ */

#carouselDettagli {
  border-radius: 14px;
  overflow: hidden;
}

#carouselDettagli img,
#carouselDettagli video {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* Frecce */
#carouselDettagli .carousel-control-prev-icon,
#carouselDettagli .carousel-control-next-icon {
  filter: invert(100%) brightness(200%);
}

/* ============================================================
   SEZIONE CARATTERISTICHE / ICONS
============================================================ */

.features-box {
  background: rgba(255,255,255,0.08);
  padding: 20px;
  border-radius: 14px;
  margin-top: 25px;
}

.features-box h5 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}

.features-box .feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.features-box .feature-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-right: 10px;
}

.features-box span {
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================================
   DESCRIZIONE IMMOBILE
============================================================ */

#dettaglio .descrizione {
  margin-top: 25px;
  line-height: 1.6;
  font-size: 1.05rem;
  opacity: 0.95;
}

/* ============================================================
   MAPPA
============================================================ */

#mapDettaglio {
  width: 100%;
  height: 350px;
  border-radius: 14px;
  margin-top: 25px;
  background: #ccc;
}

/* ============================================================
   TABELLA DATI TECNICI
============================================================ */

.tech-box {
  background: rgba(255,255,255,0.08);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tech-box strong {
  color: var(--gold);
  font-family: "Playfair Display", serif;
}

/* ============================================================
   PULSANTI CONTATTO
============================================================ */

#dettaglio .btn-contact-dettaglio {
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
}

#dettaglio .btn-whatsapp {
  background: #25D366 !important;
  border: none;
  color: #fff !important;
}

#dettaglio .btn-call {
  background: var(--gold) !important;
  border: none;
  color: var(--primary-dark) !important;
}

/* ============================================================
   TORNA INDIETRO
============================================================ */

#dettaglio .back-to-list {
  margin-top: 30px;
  display: inline-block;
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

#dettaglio .back-to-list:hover {
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 768px) {
  #carouselDettagli img,
  #carouselDettagli video {
    height: 280px;
  }

  .dettaglio-title {
    font-size: 1.8rem !important;
  }

  .dettaglio-prezzo {
    font-size: 1.4rem !important;
  }
}
/* ============================================================
   CARD IMMOBILE — VERSIONE PER TEMPLATE #immobileCardTemplate
============================================================ */

.property-card {
  background: #fff!important;        /* Blu notte */
  border: none !important;
  border-radius: 18px !important;
  overflow: hidden;
  color: #ffffff !important;
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
}

/* Hover */
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.35);
}

/* Immagine principale */
.property-card .immagine-principale {
  width: 100%;
  height: 240px;
  object-fit: cover;
  filter: brightness(90%);
  transition: .3s ease;
}

.property-card:hover .immagine-principale {
  filter: brightness(100%);
}

/* Badge categoria */
.property-card .badge-luxury {
  background: #fff!important;
  color: var(--primary-dark) !important;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  display: inline-block;
}

/* Titolo */
.property-card .titolo {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 6px;
}

/* Descrizione */
.property-card .descrizione {
  font-size: .9rem;
  color: rgba(255,255,255,0.75) !important;
  margin-bottom: 10px;
}

/* Icone caratteristiche */
.icons-feature {
  display: flex !important;
  gap: 16px !important;
  margin: 12px 0 !important;
}

.icons-feature img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Prezzo */
.property-card .prezzo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold) !important;
}

/* Bottone “Dettagli” */
.property-card .dettagli-btn {
  color: var(--gold) !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: .3s ease;
}

.property-card .dettagli-btn:hover {
  color: #d4b06a !important;
  text-decoration: underline !important;
}

/* Padding interno */
.property-card .card-body {
  padding: 18px 20px 22px 20px !important;
}
.property-card, .card {
    background: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    color: black !important;
}
#chiudiMappaCompleta {
  background: #ffffff !important;
  color: var(--primary-dark) !important;
  border: 2px solid #ffffff !important;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 50px;
  transition: .3s ease;
}

#chiudiMappaCompleta:hover {
  background: rgba(255,255,255,0.85) !important;
  border-color: #ffffff !important;
  color: var(--primary-dark) !important;
}

.navbar-transparent {
    background: transparent !important;
    box-shadow: none !important;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 50;
    padding-top: 15px;
}
.hero-main-logo
 {
    width: 180px;
    filter: drop-shadow(rgba(0, 0, 0, 0.5) 0px 0px 12px);
    margin-top: 30px;
}
/* ============================================================
   SEZIONE VENDI — TESTO COMPLETAMENTE NERO
============================================================ */

#vendi,
#vendi h2,
#vendi h5,
#vendi p,
#vendi .section-title,
#vendi .section-heading,
#vendi .text-muted,
#vendi .small {
  color: #000000 !important;
  font-weight: 700 !important;
}

/* Garantisce sfondo chiaro */
#vendi.bg-light {
  background-color: #f8f9fa !important;
}
/* ============================================================
   FOOTER — SOCIAL ICONS
============================================================ */

.footer-social h5 {
  font-weight: 700;
  color: #ffffff;
}

.footer-social .social-icons .social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  transition: .3s ease;
}

.footer-social .social-icons .social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary-dark);
  transform: translateY(-4px);
}
/* ============================================================
   SEARCH BAR – PIÙ A SINISTRA SU DESKTOP
============================================================ */

@media (min-width: 992px) {
  .search-panel {
    margin-left: 0 !important;    /* assicura allineamento naturale */
    margin-right: auto !important; /* spinge verso sinistra */
    max-width: 900px !important;  /* restringe leggermente per bilanciare */
  }

  /* Spinge l'intera row verso sinistra invece che a destra */
  .hero + .row {
    justify-content: flex-start !important;
  }
  /* Aumenta lo spazio tra i pulsanti */
  .search-bar .col-12.col-md-3 {
    gap: 20px !important;
  }

}
.search-bar .col-12.col-md-3 {
  gap: 30px !important;
}
#heroVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: black;
}
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider {
  display: none !important;
}
html, body {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
}
body {
  overscroll-behavior-x: none;
}
* {
  box-sizing: border-box;
}

img, video {
  max-width: 100%;
  height: auto;
}
/* ============================================================
   FIX DEFINITIVO: i campi restano in fila, il pulsante va sotto
   ============================================================ */

@media (min-width: 992px) {

  /* Campi input */
  #filterKeyword,
  #filterPrezzoMin,
  #filterPrezzoMax {
    flex: 1 1 auto !important;
    min-width: 180px !important;
  }

  /* Pulsanti */
  .search-bar .btn {
    flex: 0 0 150px !important;
    white-space: nowrap !important;
  }

  /* La row può andare a capo quando serve */
  .search-bar .row {
    flex-wrap: wrap !important;
    gap: 16px !important;
  }

  /* Colonne degli input */
  .search-bar .col-md-4,
  .search-bar .col-md-2 {
    flex: 1 1 auto !important;
  }

  /* Colonna dei pulsanti: va a capo quando serve */
  .search-bar .col-md-auto {
    flex: 0 0 auto !important;
  }

  /* Quando va a capo deve occupare tutta la larghezza */
  .search-bar .col-12.col-md-auto {
    width: 100% !important;
  }
}
body.show-details #filterForm,
body.show-details .search-panel {
    display: none !important;
}
.property-card .prezzo {
    white-space: nowrap !important;
    overflow: visible !important;
    display: inline-block !important;
    max-width: none !important;
}
#immobiliListing .card p strong {
    white-space: nowrap !important;
    overflow: visible !important;
    display: inline-block !important;
    max-width: none !important;
}
.search-bar select option {
  color: #000 !important;
  background: #fff !important;
}

