.clickable {
    fill: transparent;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .cls-4, .cls-1 {
    fill: none;
    stroke: rgb(32, 33, 34);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
  
    /* Serve per l'effetto di disegno */
    stroke-dasharray: 300;        /* Lunghezza totale della linea o un valore abbastanza grande */
    stroke-dashoffset: 300;       /* Parte inizialmente nascosta */
  
    animation: draw 2s linear forwards;
  }
  
  @keyframes draw {
    to {
      stroke-dashoffset: 0;       /* Disegna tutto progressivamente */
    }
  }
  
  
  path.clickable:hover {
    fill: red;
    opacity: 0.8;
  }
  polygon.clickable {
    fill: transparent;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  /* Effetto al caricamento */
  .app.clickable {
    cursor: pointer;
    transition: fill 0.3s ease;
  }
  
  .app.clickable.animate {
    animation: pulse 1.2s ease-out;
  }
  
  @keyframes pulse {
    0% { fill: #ffcc00; }
    50% { fill: #fff899; }
    100% { fill: inherit; }
  }

  /* TOOLTIP*/
  .tooltip-inner {
    background-color: #1a1a1a; /* sfondo */
    color: #fff;              /* testo */
    font-size: 18px;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    max-width: 250px;
  }
  .tooltip.bs-tooltip-top .tooltip-arrow::before,
  .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #1a1a1a;
  }
  .tooltip-inner img {
  max-width: 100% !important; /* regola qui la dimensione */
  height: auto !important;
  display: block;
  margin-bottom: 5px;
}

/* =========================================
   MAPPA APPARTAMENTI - COLORI + CONTORNI
   ========================================= */ 

/* Contorni sempre visibili sopra */
.cls-4 {
  stroke: rgb(32, 33, 34);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

/* Area cliccabile invisibile ma attiva */
.hit-area {
  fill: transparent;
  stroke: transparent;
  stroke-width: 20px;
  cursor: pointer;
  pointer-events: all;
}

/* Appartamenti: livello sotto i contorni */
.app.main {
  fill: transparent;
  stroke: none;
  pointer-events: none;
  transition: fill 0.25s ease;
  mix-blend-mode: multiply; /* serve a "fondare" il colore nel disegno */
}

/* Contenitore SVG in stacking context isolato */
#svg-map-container svg {
  isolation: isolate;
}

/* ==========================
   COLORI PERSONALIZZATI HOVER
   ========================== */
a:hover .app-1.main  { fill: #d5c1c7!important; }  
a:hover .app-2.main  { fill: #d5c1c7!important; }  
a:hover .app-3.main  { fill: #a4b6b9!important; }  
a:hover .app-4.main  { fill: #a4b6b9!important; } 
a:hover .app-5.main  { fill: #d5c1c7!important; } 
a:hover .app-6.main  { fill: #e6ac7d!important; } 
a:hover .app-7.main  { fill: #aadedc!important; } 
a:hover .app-8.main  { fill: #a4b6b9!important; } 
a:hover .app-9.main  { fill: #e6ac7d!important; }  
a:hover .app-10.main { fill: #d5c1c7!important; }  
a:hover .app-11.main { fill: #e6ac7d!important; }

/* =========================================
   Rimuove il bordo di focus
   ========================================= */
#svg-map-container a:focus,
#svg-map-container a:focus-visible,
#svg-map-container a:active {
  outline: none !important;
  border: none !important;
}