:root {
    --bs-body-line-height: 1.75;
}

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

body {
    text-align: justify;
}

.card {
    background: rgba(var(--bs-primary-rgb), 0.05);
}

.card-line {
    border-left: 3px solid var(--bs-primary);
}

.card ul, .card ul li {
    background: transparent;
}

.card a {
    text-decoration: none;
}

.navbar {
    border-bottom: 3px solid var(--bs-secondary);
}

.navbar-toggler {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 32px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f4a7d' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:focus {
    box-shadow: none
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.navbar .nav-link {
    color: var(--bs-primary);
    font-weight: bold;
}

.navbar .nav-link:hover {
    color: var(--bs-secondary);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

h1, h2, h3, h4, h5:not(.card h5):not(.modal h5), h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-top: 1.5rem !important; /* my-4 */
    margin-bottom: 1.5rem !important; /* my-4 */
}

h1, .h1 {
    color: var(--bs-primary);
}

h2, .h2 {
    color: var(--bs-secondary);
}

body > div > footer {
    font-size: 12px;
}

.text-white h1, .text-white h2 {
    color: white !important;
}

section {
    margin-top: 1.5rem !important; /* my-4 */
    margin-bottom: 1.5rem !important; /* my-4 */
}

/* I titoli delle card sono heading reali (<h2>/<h3>): danno a motori di ricerca e
   IA una gerarchia leggibile del contenuto. Qui si annulla la spaziatura e il
   colore dei titoli di sezione, cosi' la resa visiva resta quella delle card. */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card .h1, .card .h2, .card .h3, .card .h4, .card .h5, .card .h6 {
    color: inherit;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6 {
    margin-bottom: 0 !important;
}

/* Fasce a tutta larghezza che restano DENTRO <main>.
   Prima venivano rese chiudendo e riaprendo <main>, producendo <main> multipli
   e HTML non valido: qui si ottiene lo stesso effetto visivo senza spezzare la
   struttura del documento. */
html {
    overflow-x: hidden;
}

.fascia-full {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Numeri della fascia statistiche: elementi tipografici, non titoli di sezione.
   Replicano esattamente la resa dei vecchi <h1 style="font-size:60px"> */
.stat-numero {
    font-size: 60px;
}

.text-white .stat-numero,
.text-white .h5 {
    color: #fff;
}

/* Galleria progetto: lightbox a tutto schermo */
/* Anteprime tutte quadrate e della stessa dimensione: il ritaglio non perde
   nulla, perche' cliccando si apre il lightbox con la foto intera */
.galleria-thumb {
    cursor: pointer;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
}

.galleria-lightbox .modal-content {
    background: rgba(0, 0, 0, 0.92);
}

/* La X sta sopra l'immagine: fuori dal flusso, cosi' il corpo del modal
   occupa tutta l'altezza e la foto resta centrata nello schermo */
.galleria-lightbox .galleria-lightbox-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.galleria-lightbox .modal-body {
    min-height: 100%;
}

.galleria-lightbox .carousel-item img {
    max-height: 85vh;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.galleria-lightbox .carousel-control-prev,
.galleria-lightbox .carousel-control-next {
    width: 12%;
}

/* Filtro a tag nella pagina progetti */
.filtro-tag {
    cursor: pointer;
    border: 1px solid var(--bs-primary);
    background-color: transparent;
    color: var(--bs-primary);
    margin: 0 0.25rem 0.5rem 0;
}

.filtro-tag[aria-pressed="true"] {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.filtro-tag:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
}

.filtro-tag[aria-pressed="true"]:hover {
    background-color: var(--bs-primary-darken);
}

.progetto-item .badge {
    margin: 0 0.15rem;
}

/* Segnaposto della mappa: mostrato finche' l'utente non carica Google Maps */
.mappa-placeholder {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
    text-align: center;
}

/* Video hero self-hosted */
#hero-video video {
    object-fit: cover;
    background-color: #000;
}

/* Icone social del team (pagina Chi Siamo).
   Da 992px in su compaiono in sovrimpressione sulla foto al passaggio del mouse;
   sotto i 992px, dove l'hover non esiste, restano sempre visibili sotto al testo. */
.team-foto {
    position: relative;
    overflow: hidden;
}

.team-foto .card-img-top {
    display: block;
    transition: filter .25s ease;
}

.team-social a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin: 0 .5rem;
    font-size: 1.25rem;
    line-height: 1;
}

.team-social a:hover,
.team-social a:focus-visible {
    color: var(--bs-secondary);
}

.team-social-fisso {
    margin-top: .5rem;
}

.team-social-hover {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .5rem 0;
    background: rgba(var(--bs-primary-rgb), 0.75);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.rounded-pill {
    border-radius: 0.25rem !important;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {}

@media (max-width: 991px) {
    #main {
        margin-top: 85px;
    }
    .navbar {
        position: absolute;
        top: 0;
        width: 100%;
        font-size: 30px;
        z-index: 9999;
    }
    .nav-item {
        margin-top: 8px;
        margin-bottom: 8px;
    }
    .nav-item a {
        font-weight: normal !important;
    }
    /* Su mobile l'overlay non serve: le icone stanno sotto al testo */
    .team-social-hover {
        display: none;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Su desktop le icone compaiono solo in hover (o navigando da tastiera) */
    .team-social-fisso {
        display: none;
    }
    .team-foto:hover .team-social-hover,
    .team-foto:focus-within .team-social-hover {
        opacity: 1;
        visibility: visible;
    }
    .team-foto:hover .card-img-top,
    .team-foto:focus-within .card-img-top {
        filter: brightness(1.15);
    }
}

/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {}