html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* .d-md-block {
    display: block!important;
} */

.sottolinato {
    font-weight: 700;
}

.popup {
    font-size: 1.1rem;
    max-height: 40px;
}


/* 1. CONTENITORE MAPPA CON IMMAGINE DI BACKGROUND */
.map-container {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;

    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 650px;
    max-height: 750px;
    min-width: 320px;
    overflow: hidden;
    padding: 10px 40px 10px 40px;
    
    /* Immagine di sfondo */
    background-image: url("/media/files/Matteo-Ruggeri-settembre-2023-29.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 2. Rende trasparente la mappa per far vedere lo sfondo sotto */
#map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: transparent !important;
}

.container-fluid{
    box-sizing: border-box;
}

.navbar {
    width: 100%;
    box-sizing: border-box;
    background-color: #9abf4b;
    padding: 20px 40px !important;
    
}

a.nav-link.active {
    color: var(--bs-light)!important;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.733) !important;
}

.text-social{
    color: #e0e0e0;
}

.navbar-light{
    background-color: #9abf4b !important;
    
}

.colonna-nascosta {
    display: none; /* Nascosto di default */
    flex: 1;
    background-color: #e0e0e0;
    padding: 15px;
}

/* Classe attivata da JavaScript */
.colonna-visibile {
    display: block !important; 
}

body > #sidebar {
    display: none;
            
}

.leaflet-sidebar.left.visible {
    z-index: auto;
}

/*carousel*/
.carousel-wrapper{
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

/* Popup fluttuante in alto a destra */
.map-info-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000; /* Lo mantiene sopra i layer della mappa */
    max-width: 350px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px); /* Effetto vetro sfocato */
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Stile dell'immagine circolare */
.popup-avatar {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #0d6efd;
}

.container-obiettivi{
    margin: 20px;
}

/*bootstrap icons*/
/* Stile personalizzato per i pin con Bootstrap Icons */
    .custom-bootstrap-marker {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% 50% 50% 0; /* Forma a goccia/pin */
        transform: rotate(-45deg);     /* Ruota per creare la punta in basso */
        box-shadow: 0px 3px 6px rgba(0,0,0,0.3);
        border: 2px solid white;
    }

    /* Raddrizza l'icona al centro (altrimenti sarebbe ruotata di -45 deg) */
    .custom-bootstrap-marker i {
        transform: rotate(45deg);
        font-size: 18px;
        color: white;
    }

    /* Colori specifici per tipologia */
    .marker-cultura {
        background-color: #e44151; /* Rosso Bootstrap (danger) */
    }

    .marker-urbanistica {
        background-color: #0d6efd; /* Blu Bootstrap (primary) */
    }

    /* .marker-rifiuti{
        background-color: rgb(64, 170, 64);
    } */

    .marker-ambiente {
        background-color: rgb(7, 158, 105);
    }

    .marker-scuola {
        background-color: rgb(126, 0, 51);
    }

    /* .marker-territorio {
        background-color: rgb(25, 73, 48);
    } */

    .marker-turismo {
        background-color: rgb(187, 182, 36);
    }

    .marker-sport {
        background-color: rgb(45, 114, 235);
    }

    .marker-partecipazione {
        background-color: rgb(187, 4, 31);
    }

    /* .marker-legalita {
        background-color: rgb(184, 66, 105);
    } */

    .marker-welfare {
        background-color: rgb(39, 208, 95);
    }

    .marker-default {
        background-color: #6c757d; /* Grigio Bootstrap (secondary) */
    }


.risultati {
    display: grid;
    /* grid-template-columns: repeat(4,minmax(0,1fr)); */
    border-radius: 24px;
    border: 1px solid #eaeaea;
    background: rgba(255,255,255,.24);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(4px);
    padding: 32px 24px;
    gap: 16px;
    z-index: 1;
    position: relative;
    margin: auto;

    color: var(--bs-white);
}

#contatore{
    color: var(--bs-yellow) !important;
}

.legenda {
    grid-template-columns: repeat(3,minmax(0,1fr));
    border-radius: 12px;
    border: 1px solid #eaeaea;
    background: rgba(255,255,255,.24);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(10px);

    padding: 20px;
    margin: 10px;
    gap: 10px;

    z-index: 1;
    position: absolute;
    
    bottom: 0;
    color: #e0e0e0;
}

/* Stile per i cerchi o quadrati colorati */
.legend-color {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  opacity: 0.7;
}

#legend-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne di uguale larghezza */
    gap: 10px 15px;                        /* Spaziatura: 10px verticale, 15px orizzontale */
    align-items: center;
}

/* Modifica facoltativa se usi la struttura modificata nello step precedente */
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.middle {
    padding: 40px;
    color: var(--bs-white);

    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);

    background-image: url("/media/files/chiusa-filtered.jpeg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



.footer-wrapper{
    background-image: linear-gradient(to left , rgb(242, 140, 15) , rgb(154, 191, 75) 100%);
    padding: 0px 40px 0px 40px;
}

#footer-text {
    color: var(--bs-light)!important;
}


b#tipologia {
    color: #9abf4b;
}

p#descrizione {
    font-size: 1.2em;
}

h4#titolo {
    color: rgb(242, 140, 15);
}
