html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #eee;
}

/* NAVBAR TOP */
.navbar-top {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    z-index: 10000;
    overflow: hidden;
}

/* NAVBAR BOTTOM */
.navbar-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 70px;
    z-index: 10000;
    overflow: hidden;
}

/* CAROUSEL INSIDE NAVBAR */
.navbar-top .carousel,
.navbar-bottom .carousel {
    height: 40px;
}

.navbar-top .carousel img,
.navbar-bottom .carousel img {
    height: 40px;
    object-fit: contain;;
}

/* AREA CENTRALE SCROLLABILE */
.scroll-area {
    position: absolute;
    top: 60px;
    bottom: 70px;
    left: 0;
    right: 0;
    overflow-y: auto;
    padding: 20px;
    background-color: white;
}





/* ===============================
   CARD PRINCIPALI
   =============================== */
.card-main-nome {
    background-color: #0275d8 !important;
    color: white !important;
}
.card-main-specialita {
    background-color: #5cb85c !important;
    color: white !important;
}
.card-main-citta {
    background-color: #f0ad4e !important;
    color: #333 !important;
}
.card-main-keyword {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* ===============================
   CARD DERIVATE (SFUMATE)
   =============================== */
.card-derivata-nome {
    background-color: #cfe2ff !important;
}
.card-derivata-specialita {
    background-color: #d4edda !important;
}
.card-derivata-citta {
    background-color: #ffe5c6 !important;
}
.card-derivata-keyword {
    background-color: #e2d4f7 !important;
}

/* List-group inside cards */
.card-derivata-nome .list-group-item,
.card-derivata-specialita .list-group-item,
.card-derivata-citta .list-group-item,
.card-derivata-keyword .list-group-item {
    background: transparent !important;
}


.badge-nome {
    background-color: #c565e2;
    color: #000;   /* testo leggibile */
}




.modal-body {
    padding-top: var(--navbar-top-height, 70px) !important;
    /*padding-bottom: var(--navbar-bottom-height, 70px) !important;*/
    padding-bottom: 0 !important;
    position: relative;
}





.no-wrap {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .navbar-title {
        font-size: 0.85rem;
        white-space: nowrap;
    }
}








/* Immagini responsive senza tagli */
#workCarouselInner img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 200px); /* lascia spazio al titolo */
    object-fit: contain;
    background: black;
}


/* Sostituisce completamente le icone Bootstrap */
.carousel-control-prev-icon {
    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='M11.354 1.646a.5.5 0 0 0-.708 0L4.5 7.793 10.646 13.94a.5.5 0 0 0 .708-.707L6.207 7.793l5.147-5.146a.5.5 0 0 0 0-.707z'/%3E%3C/svg%3E");
    width: 60px;
    height: 6dvb;
}

.carousel-control-next-icon {
    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='M4.646 1.646a.5.5 0 0 1 .708 0l6.146 6.147-6.146 6.146a.5.5 0 1 1-.708-.707L10.293 7.793 4.646 2.146a.5.5 0 0 1 0-.707z'/%3E%3C/svg%3E");
    width: 60px;
    height: 60px;
}



#workModal .carousel-item img {
    position: relative;
    z-index: 1;
}
#workModalTitleBox {
    position: absolute !important;
    bottom: 90px !important;   /* altezza navbar bottom */
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 10px;
    z-index: 20000 !important;
}





/* La modale deve essere il contenitore relativo */
#workModal .modal-body {
    position: relative;
}

/* Le immagini del carosello devono stare SOTTO al titolo */
#workModal .carousel-item img {
    position: relative;
    z-index: 1;
}

/* Il riquadro del titolo sta sopra a tutto */
#workModalTitleBox {
    position: absolute !important;
    z-index: 9999 !important;
}

/* Forza a stare sopra anche la navbar bottom */
.modal.show #workModalTitleBox {
    z-index: 20000 !important;
}













