/*
 * GeoSciencesIR Hub - Stili Consolidati e Migliorati
 # Edit by Carlo Cipolloni ISPRA
 * Questo file combina e ottimizza le regole CSS dai precedenti vocabolary.css e geosciences.css
 */

/* ========================================= */
/* 1. Stili Base e Layout Principale */
/* ========================================= */

body {
    background-color: #f8f9fa;
    color: #343a40;
    margin: 0;
    padding-top: 10rem; /* Regola questo valore in base all'altezza effettiva combinata di banner e nav */
}

.banner {
    background-color: #DACA8E;
    padding: 1px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 900;
    border-bottom: 1px solid #5D7A65;
    height: auto;
}

.banner h1 {
    margin-right: 45%;
    float: right;
}

.navtop {
    background-color: #5D7A65;
    position: fixed;
    top: 5.5rem;
    width: 100%;
    justify-content: center;
    z-index: 899;
}

.containermain {
    max-width: 960px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #666;
    box-shadow: 0 0 15px #5D7A65;
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.container {
    max-width: 960px;
}

.container h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    padding-top: 20px;
}

.container h2 {
    font-size: 1.6rem;
    font-weight: bold;
    padding: 20px;
}

.it-footer-main {
    background: #5D7A65;
    color: #fff;
}

.it-footer-main a {
    color: #fff;
}

.ftpcon {
    padding-top: 0.8rem;
}

.it-footer-small-prints {
    background: #036;
}

.it-footer-note {
    text-align: center;
}

ul.it-footer-small-prints-list a {
    color: #fff;
}

ul.it-footer-small-prints-list a:hover {
    color: #fff;
}

/* ========================================= */
/* 2. Componenti Specifici e UI */
/* ========================================= */

.btn img {
    width: 30px;
    left: 10px;
    fill: #DACA8E;
    color: #DACA8E;
}

.mframe {
    color: #000;
    text-align: justify;
    font-size: 1rem;
}

.mframe a {
    color: #5D7A65;
    text-decoration: none;
    font-weight: bolder;
}

.mframe a:hover {
    color: #746CA8;
}

.accordion-button {
    font-weight: bold;
    background-color: #fff;
    color: #5d7a65;
}

.accordion-button:not(.collapsed) {
    color: #000;
    background-color: #d9ca8e;
}

.geo-button {
    display: flex;
    justify-content: center;
    box-sizing: content-box;
    border: none;
    border-radius: 0.38rem;
    background-color: #B2980F;
    color: #fff;
    line-height: 1.5em;
    text-decoration: none;
}

.geo-button:hover {
    background-color: #DACA8E;
    color: #000;
}

.list-group-item {
    word-wrap: break-word;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    position: relative;
    margin-bottom: 5px;
}

.list-group-item p {
    margin-bottom: 0;
}

.list-group-item small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

.list-group-item.concept-item {
    border-left: 3px solid #007bff;
    border-radius: 4px;
}

.list-group-item.concept-item:first-child {
    margin-top: 0;
}

.list-group-item.concept-item .list-group-item {
    border-top: none;
    border-bottom: none;
    background-color: #f8f9fa;
}

.list-group-item > div.concept-label,
.list-group-item > div.concept-definition {
    flex-grow: 1;
}

.lang-switch-btn {
    cursor: pointer;
    font-size: 0.75em;
    padding: 0.25em 0.5em;
    vertical-align: middle;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.lang-switchable-text,
.concept-label-container,
.concept-definition-container,
.metadata-title-container,
.metadata-description-container,
.metadata-keywords-container {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    width: 100%;
}

.lang-switchable-text small span,
.concept-definition-container small span {
    display: inline;
}

.nested-concepts {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
}

/* ========================================= */
/* 3. Stili di Immagini e Citazioni */
/* ========================================= */

.img-brand {
    margin-bottom: 1em;
    max-height: 3.0rem;
    line-height: 2.5;
    left: 0;
    margin-left: 0.5rem;
    margin-top: 0.5rem;
}

.citation {
    margin-left: 0;
    margin-right: 0;
    width: 70%;
    float: right;
    margin-bottom: 0.8rem;
}

.citation-lg {
    width: 25%;
    max-height: 100%;
    float: left;
    position: relative;
}

.citation-lg img {
    width: 100%;
}

/* ========================================= */
/* 4. Schede (Cards) */
/* ========================================= */

.cartTitle {
    text-align: center;
    color: #5D7A65;
    font-weight: bold;
    font-size: 90%;
}

.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px;
    padding: 15px;
    text-align: center;
    max-width: 200px;
    min-width: 200px;
    max-height: 180px;
    min-height: 180px;
    background-color: #fff;
    box-shadow: 0.2rem 0.2rem #5D7A65;
}

.card h2 {
    font-size: 1.5rem;
}

.card img {
    max-height: 80px;
    max-width: 80px;
    align-self: center;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.card .cover {
    position: absolute;
    bottom: 0;
    left: 0;
    min-width: 200px;
    background-color: #DACA8E;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    transition: opacity 0.15s ease-in;
    opacity: 0;
    padding-top: 0.4rem;
    color: #000;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
}

.card:hover .cover {
    opacity: 1;
}

.card .card-text {
    font-size: 0.9rem;
}

/* ========================================= */
/* 5. Altri Stili */
/* ========================================= */

.it-header-slim-wrapper {
    background: #839781;
}

.bg-cookies-dr {
    background: #839781;
}

.frameMain {
    align-content: center;
}

.frame {
    width: 880px;
    height: 612px;
}

.overlay-panel {
    background: #036;
}

.logo-h {
    max-height: 50px;
}

.Info h4 {
    padding-left: 0.75rem;
}

.Info p {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    text-align: justify;
}

/* ========================================= */
/* 6. Media Queries (Responsive) */
/* ========================================= */

/* --- Mobile (Default Styles) --- */
/* Le regole senza media query sono per schermi piccoli (< 576px, 'xs' di Bootstrap)
   o per stili che devono essere applicati a tutte le dimensioni e poi sovrascritti. */

/* --- Small devices (landscape phones, 576px and up) --- */
/* Questa media query non è strettamente necessaria se le tue regole base sono già per mobile-first,
   ma utile se vuoi specificare qualcosa solo per questi schermi. */
@media (min-width: 576px) {
    /* Esempio: il banner potrebbe iniziare a comportarsi diversamente */
    .banner {
        /* max-width: none; */ /* Assicurati che non ci siano limiti se non necessari */
    }
}

/* --- Medium devices (tablets, 768px and up) --- */
@media (min-width: 768px) {
    .banner {
        /* Il banner non ha più una max-width limitata a 768px */
        /* width: 100%; è già impostato, non serve sovrascrivere max-width */
    }
    .citation {
        width: 70%; /* Il comportamento originale della citation su schermi più grandi */
        float: right;
        margin-left: 0;
        margin-right: 0;
    }
    .citation-lg {
        position: relative; /* Ritorna alla posizione relativa su schermi medi */
        width: 25%;
        float: left;
    }
    .navtop {
        /* Il top della navtop potrebbe dover essere riadattato se il banner cambia altezza */
        top: 5.5rem; /* Mantiene la posizione sotto il banner standard */
    }
    .card {
        width: 200px; /* Le card riprendono la loro larghezza fissa */
    }
    .containermain {
        /* Assicurati che il margine superiore sia coerente */
        margin-top: 2rem; /* Adatta se il top del navtop cambia */
    }
    /* .jumbotron era un'eccezione, assicurarsi se è rilevante o rimuovere */
    /* .jumbotron { top: auto; } */
    /* .nav-bar a { float: none; display: inline-block; text-align: center; } */ /* Ripristina il comportamento normale della nav se non è .navtop */
}

/* --- Large devices (desktops, 992px and up) --- */
@media (min-width: 992px) {
    .containermain {
        max-width: 960px; /* Valore standard per il contenitore principale */
    }
    body {
        padding-top: 10rem; /* Regola se il layout del banner/nav cambia */
    }
    /* Esempio: più colonne per le schede */
    .card-container {
        justify-content: space-around; /* O space-between per allargare */
    }
    .card {
        margin: 20px; /* Più spazio tra le card */
    }
}

/* --- Extra large devices (large desktops, 1200px and up) --- */
@media (min-width: 1200px) {
    .containermain {
        max-width: 1140px; /* Un contenitore più largo per widescreen */
    }
    /* Adattamenti per layout ancora più ampi */
}

/* --- Very large devices (widescreen, 1400px and up) --- */
@media (min-width: 1400px) {
    .containermain {
        max-width: 1320px; /* Ancora più largo per schermi molto grandi */
    }
    /* Ulteriori ottimizzazioni per spazi ampi */
}