/* Reset e stili di base */
* {
/*  margin: 0;
  padding: 0;
  box-sizing: border-box;*/
}

.hidden {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}


input, select {
  font: inherit;
}


/* Header e Container */
/*.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 15px;
}

header {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px 0;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

  header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  header h1 {
    font-size: 1.8em;
    color: #2c3e50;
    margin: 0;
  }

.main-content {
  min-height: calc(100vh - 100px);
  padding: 20px 0;
}

*/

/* Sezione Filtri */
.filtri {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.filtri-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}


/* Target the collapse content when it's shown */
#prezzocollapse.show {
  position: relative; /* Or fixed, depending on desired behavior */
  /* Adjust top/left/right/bottom as needed for positioning */
  top: 100%; /* Example: Position below the button/trigger */
  left: 0;   /* Example: Align to the left of the button/trigger */
  z-index: 1000; /* Set a high z-index to appear above other content */
  background-color: white; /* Or your desired background */
  /* Add padding, borders, box-shadow for visual appearance */
  padding: 15px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* If you need the parent <p> to allow for absolute positioning */
/* This might be necessary if #prezzocollapse needs to be positioned relative to the <p> */
/* <p id="parent-p-of-prezzocollapse" style="position: relative;"> */
/*   <button id="btnprezzo" data-bs-toggle="collapse" data-bs-target="#prezzocollapse"></button> */
/*   <div id="prezzocollapse" class="collapse">...</div> */
/* </p> */
/* If the <p> needs a position context, add it like this: */
/*

*/
#parent-p-of-prezzocollapse {
  position: relative;
}

@media (min-width: 768px) {
  .filtri-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .filtri-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  /*
  2025.05.01
  gap: 8px; */
}

  .form-group label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
  }

  .form-group select,
  .form-group input[type="range"] {
    width: 100%;
    /* 2025.04.22
    padding: 8px; */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
  }

  .form-group input[type="range"] {
    padding: 0;
  }

.azioni-controlli {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: #fff;
  color: #333;
  font-weight: 500;
  transition: all 0.2s ease;
}

  .btn:hover {
    font-weight: bold;
    color: black;
    background-color: #f5f5f5;
    border-color: #ccc;
  }

/* Stile mobile-first per i filtri */
@media (max-width: 767px) {
  .filtri {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -15px -15px 20px -15px;
    border-radius: 0;
  }

  .azioni-controlli {
    flex-direction: column;
    display: contents;
  }

  .btn {
    width: 100%;
  }
}



/* Layout principale (mappa e lista) */
.contenuto {
  display: flex;
  gap: 20px;
  min-height: 600px;
}

  .contenuto.vista-mappa {
    flex-direction: row-reverse;
  }

  .contenuto.vista-lista {
    flex-direction: column;
  }

.mappa {
  flex: 2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: 600px;
}

.lista-annunci {
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
  padding-right: 10px;
}

  /* Scrollbar personalizzata per la lista */
  .lista-annunci::-webkit-scrollbar {
    width: 8px;
  }

  .lista-annunci::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .lista-annunci::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }

    .lista-annunci::-webkit-scrollbar-thumb:hover {
      background: #666;
    }

/* Responsive layout */
@media (max-width: 768px) {
  .contenuto {
    flex-direction: column !important;
    gap: 15px;
  }

  .mappa {
    height: 400px;
    width: 100%;
  }

  .lista-annunci {
    max-height: none;
    padding-right: 0;
  }
}

/* Stili per il cambio vista */
.vista-lista .mappa {
  display: none;
}

.vista-mappa .lista-annunci {
  display: block;
}


/* Layout griglia per gli annunci */
.vista-griglia #mappa {
  display: none;
}

@media (min-width: 768px) {
  .vista-griglia .lista-annunci {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .vista-griglia .lista-annunci {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .vista-griglia .lista-annunci {
    grid-template-columns: repeat(4, 1fr);
  }
}


.contenuto-card{
  width: 100%;
}
/* Card degli annunci */
.card-annuncio {
  display: flex;
  /* width: 100%;     */
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  overflow: hidden;
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  /*border-color: black;*/
  border-color: darkgrey;
}

  .card-annuncio:hover * {
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.2); */
    /*transform: scale(1.02);*/
    transform: scale(1.0);
    transition: all 0.2s ease;
    cursor: pointer;
    /*background-color: #f5f5f5;*/
    color: white !important;
    background-color: midnightblue;
  }

  .card-annuncio .immagine {
    flex-shrink: 0;
    width: 180px;
    height: auto;
  }

    .card-annuncio .immagine img {
      /*position: absolute;*/
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

  .card-annuncio .contenuto-card {
    padding: 15px;
  }

  .card-annuncio .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .card-annuncio .colonna-sx {
    text-align: left;
  }

  .card-annuncio .colonna-dx {
    text-align: right;
  }

  .card-annuncio .colonna-cn {
    text-align: center;
  }


  .card-annuncio .titolo {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
  }

  .card-annuncio .prezzo {
    font-size: 1.3em;
    font-weight: 400;
    line-height: 1.5rem;
    color: #2ecc71;
  }

  .card-annuncio .superficie {
    color: #666;
    font-size: 0.9em;
  }

  .card-annuncio .descrizione {
    color: #666;
    margin: 10px 0;
    font-size: 0.9em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-annuncio .link-mappa {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
    margin-top: 10px;
  }

    .card-annuncio .link-mappa:hover {
      text-decoration: underline;
    }

/* Responsive per le card */
@media (max-width: 480px) {
  .card-annuncio .info-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .card-annuncio .colonna-dx {
    text-align: left;
  }
}

.w-6 {
  width: 1.5rem;
}

.h-6 {
  height: 1.5rem;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(.4,0,.2,1);
  transition-duration: .15s;
}

.bg-casaitalia-blue {
  --tw-bg-opacity: 1;
  background-color: rgb(51 50 144 / var(--tw-bg-opacity, 1));
}

.bg-casaitaliaBlue-50 {
  --tw-bg-opacity: 1;
  background-color: rgb(239 243 254 / var(--tw-bg-opacity, 1));
}

.border-casaitaliaBlue-400 {
  --tw-border-opacity: 1;
  border-color: rgb(136 150 241 / var(--tw-border-opacity, 1));
}

.text-casaitaliaGreen-600 {
  --tw-text-opacity: 1;
  color: rgb(0 191 97 / var(--tw-text-opacity, 1));
}

.uppercase {
  text-transform: uppercase;
}

.text-xs {
  font-size: .75rem;
  line-height: 1rem;
}

.leading-tight {
  line-height: 1.25;
}

.font-bold {
  font-weight: 700;
}

/* Stili Leaflet personalizzati */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  width: 280px !important;
}

.popup-content {
  padding: 15px;
}

.popup-header {
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.popup-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.popup-body {
  padding: 15px;
}

.popup-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

  .popup-info .info-left {
    text-align: left;
  }

  .popup-info .info-right {
    text-align: right;
  }

.popup-price {
  color: #2ecc71;
  font-weight: 600;
  font-size: 1.1em;
}

.popup-surface {
  color: #666;
  font-size: 0.9em;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-popup-close-button {
  padding: 8px !important;
}

.marker-cluster {
  background-clip: padding-box;
  border-radius: 20px;
  font-family: inherit;
}

  .marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

/* Colori personalizzati per i cluster */
.marker-cluster-small {
  background-color: rgba(181, 226, 140, 0.6);
}

  .marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.6);
  }

.marker-cluster-medium {
  background-color: rgba(241, 211, 87, 0.6);
}

  .marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.6);
  }

.marker-cluster-large {
  background-color: rgba(253, 156, 115, 0.6);
}

  .marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.6);
  }

  .azioni-controlli{
    /*display: none;*/
  }

  .container {
    padding-left: 0px;
    padding-right: 0px;
  }
  .sito-annunci-prezzo-width {
    width: 100%;
    min-width: 300px;
  }
#superficiecollapse {
  border: 0px transparent !important;
  background-color: rgb(248, 248, 248) !important;
}

#prezzocollapse {
  border: 0px transparent !important;
  background-color: rgb(248, 248, 248) !important;
}
  .sito-annunci-filtro-btn * {
    background-color: #fff !important;
    color: black !important;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    overflow-wrap: break-word;
    transition: none !important;
  }

   .sito-annunci-filtro-btn:active * {
    /* background-color: fff !important;
    color: black !important; */
  /* Remove or change styles that cause the flash */
  background-color: #fff !important;
  box-shadow: none !important; /* Example */
  /* ...other properties you find in DevTools */
  transition: none !important;

   }

   .sito-annunci-filtro-btn:hover {
    font-weight: bold !important;
    transition: none !important;
  }
  .sito-annunci-filtro-btn:focus {
    outline: none !important;
    transition: none !important;
  }

  /* Using :focus-visible is generally preferred for accessibility */
  /* It shows the outline only when the element is focused via keyboard navigation */
  .sito-annunci-filtro-btn:focus-visible {
    outline: none !important;
    transition: none !important;
  }
  .irs--flat .irs-bar {
    top: 25px;
    height: 12px;
    background-color: #ed5565 !important;
}

.annuncio-card-camere {
  font-size: .975rem;
  line-height: 1rem;
}

.annuncio-card-bagni {
  font-size: .975rem;
  line-height: 1rem;
}

@media (min-width: 390px) {

  .annuncio-card-camere {
    font-size: .505rem;
    line-height: 1rem;
  }

  .annuncio-card-bagni {
    font-size: .505rem;
    line-height: 1rem;
  }
}

  @media (min-width: 430px) {
    .container {
      padding-left: 0px;
      padding-right: 0px;
    }

    .grid-filter-font-size {
      font-size: 0.900rem;
    }

    .lista-annunci {
      padding-left: 8px;
      padding-right: 8px;
      padding-top: 8px;
    }

    .annuncio-card-text {
      font-size: .975rem;
      line-height: 1rem;
    }

    .annuncio-card-camere {
      font-size: .675rem;
      line-height: 1rem;
    }

    .annuncio-card-bagni {
      font-size: .675rem;
      line-height: 1rem;
    }

    .sito-annunci-prezzo-width {
      width: 100%;
      min-width: 300px;
    }

    .sito-annunci-filtro-hidden {
      display: none;
    }
  }


  @media (min-width: 768px) {
    .md\:aspect-square {
      aspect-ratio: 1 / 1;
    }

    .grid-filter-font-size {
      font-size: smaller;
    }

    .azioni-controlli {
      display: inline-flex;
    }

    .annuncio-card-text {
      font-size: .975rem;
      line-height: 1rem;
    }


    .annuncio-card-camere {
      font-size: .975rem;
      line-height: 1rem;
    }

    .annuncio-card-bagni {
      font-size: .975rem;
      line-height: 1rem;
    }

  }

  .object-cover {
    -o-object-fit: cover;
    object-fit: cover;
  }

  .w-full {
    /*width: 100%;*/
  }

  /*.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}


@media (min-width: 768px) {
  .md\:bg-transparent {
    background-color: transparent;
  }
}*/

  .annuncio-card-text-small {
    font-size: 0.605rem;
    line-height: 1rem;
  }

  @media (min-width: 820px) {
    .container {
      max-width: 820px;
    }

    .mappa {
      height: 600px;
      max-width: 300px;
    }

    .annuncio-card-text {
      font-size: .975rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.545rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.405rem;
      line-height: 1rem;
    }
  }

  @media (min-width: 932px) {
    .container {
      max-width: 900px;
    }

    .sito-annunci-grid-filter {
      max-width: 600px;
    }

    .grid-filter-font-size {
      font-size: 0.875rem;
    }

    .mappa {
      height: 600px;
      max-width: 400px;
    }

    .annuncio-card-text {
      font-size: .675rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.405rem;
      line-height: 1rem;
    }
  }


  @media (min-width: 1024px) {
    .container {
      max-width: 1000px;
    }

    .sito-annunci-grid-filter {
      max-width: 730px;
      grid-template-columns: repeat(2, 1fr);
    }

    .grid-filter-item {
      width: 200px;
    }

    .mappa {
      height: 600px;
      max-width: 500px;
    }

    .annuncio-card-text {
      font-size: .975rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.405rem;
      line-height: 1rem;
    }
  }

  @media (min-width: 1180px) {
    .container {
      max-width: 1140px;
    }

    .sito-annunci-grid-filter {
      max-width: 830px;
      grid-template-columns: repeat(2, 1fr);
    }

    .grid-filter-item {
      width: 200px;
    }

    .mappa {
      height: 600px;
      max-width: 500px;
    }

    .annuncio-card-text {
      font-size: 1.0rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.645rem;
      line-height: 1rem;
    }
  }

  @media (min-width: 1366px) {
    .container {
      max-width: 1300px;
    }

    .sito-annunci-grid-filter {
      max-width: 1000px;
    }

    .mappa {
      max-width: 700px;
    }

    .annuncio-card-text {
      font-size: 1.0rem;
      line-height: 1.2rem;
    }

    .annuncio-card-text-small {
      font-size: 0.645rem;
      line-height: 1rem;
    }
  }

  @media (min-width: 1600px) {
    .container {
      max-width: 1560px;
    }

    .sito-annunci-grid-filter {
      max-width: 1400px;
    }

    .mappa {
      max-width: 800px;
    }

    .annuncio-card-text {
      font-size: 1.0rem;
      line-height: 1.2rem;
    }

    .annuncio-card-text-small {
      font-size: 0.845rem;
      line-height: 1rem;
    }
  }

  @media (min-width: 1920px) {
    .container {
      max-width: 1880px;
    }

    .sito-annunci-grid-filter {
      max-width: 1600px;
    }

    .lista-annunci {
      max-height: 800px;
    }

    .mappa {
      max-width: 1200px;
      height: 800px;
    }

    .annuncio-card-text {
      font-size: 1.045rem;
      line-height: 1rem;
    }

    .annuncio-card-text-small {
      font-size: 0.845rem;
      line-height: 1rem;
    }
  }



  .map_tendina {
    position: absolute;
    top: 2rem;
    right: 0;
    left: 0;
    z-index: 20;
    max-width: 200px;
    border-radius: .25rem;
    --tw-border-opacity: 1;
    border-color: rgb(51 50 144 / var(--tw-border-opacity, 1));
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
    padding: .5rem;
    font-size: .875rem;
    line-height: 1.25rem;
    --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
    --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  }

  .map_filter_label {
    display: flex;
    width: 100%;
    cursor: pointer;
    justify-content: space-between;
  }

  .map_filter_label_text {
    margin-right: .5rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .grid-cols-1 {
    /* 2025.05.01
    per risolvere il problema in servizi-immobiliari/valutazione-immobile
    grid-template-columns: repeat(1,minmax(0,1fr))
    */
  }

  .grid-cols-2 {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }

  .grid-cols-3 {
    grid-template-columns: repeat(3,minmax(0,1fr))
  }

  .btn-casaitalia-outline {
    border-radius: .5rem !important;
    border-width: 1px !important;
    --tw-bg-opacity: 1 !important;
    background-color: rgb(255 255 255 / 1 !important) !important;
    padding: .75rem 1.5rem !important;
    --tw-text-opacity: 1 !important;
    color: rgb(67 64 194 / var(--tw-text-opacity)) !important;
    transition-property: all !important;
    transition-timing-function: cubic-bezier(.4,0,.2,1) !important;
    transition-duration: .15s !important;
  }