/*!
 * ISPRA elaboration for URBES project
 * Code licensed under the Apache License v2.0.
 */

/* =============================
   RESET & BASE
   ============================= */
html,
body {
    height: 100%;
    margin: 0;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

body {
    padding-top: 70px;
    /* Evita che il contenuto finisca sotto la navbar fixed */
}

.container {
    padding: 0;
    font-size: 16px;
}

/* =============================
   NAVBAR (FIXED & FLEX)
   ============================= */
.navbar-fixed-top {
    z-index: 9999 !important;
    background-color: #516C7E !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 70px;
}

/* Allineamento Flex per evitare sovrapposizioni tra logo e menu */
.navbar-fixed-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-header {
    display: flex;
    align-items: center;
    float: none !important;
    /* Rimuove il float di Bootstrap */
}

.navbar-brand {
    display: flex !important;
    align-items: center;
    height: 70px !important;
    padding: 0 15px !important;
    margin: 0 !important;
    float: none !important;
}

.navbar-brand img {
    height: 50px !important;
    width: auto;
    display: block !important;
}

.navbar-collapse {
    float: none !important;
    display: flex !important;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    margin: 0;
}

.navbar-inverse .navbar-nav>li>a {
    color: #fff;
    padding-top: 25px;
    padding-bottom: 25px;
    transition: background-color 0.3s ease;
}

.navbar-inverse .navbar-nav>li>a:hover {
    background-color: #000 !important;
}

.navbar-inverse .navbar-nav>.active>a {
    background-color: #67695b !important;
}

/* Lingua */
.lang-switch {
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
}

.lang-active {
    background-color: #67695b !important;
}

/* =============================
   SEZIONI URBES (FULL HEIGHT)
   ============================= */
.urbes-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    width: 100%;
    padding: 60px 0;
    /* Padding interno per respirare */
}

.section-intro {
    background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5)), url('../img/fondo1.png');
    background-size: cover;
    background-position: center;
}

.section-alt {
    background-color: #C1CDD8;
}

.section-data {
    background-color: #E6E7E9;
}

.section-data2 {
    background-color: #AFB3B0;
}

.section-footer {
    min-height: 100px;
}
.rightLogo {
    max-height: 40px;

}
.rigthSoft {
    list-style: none;
}

/* Testi */
.PageText {
    text-align: justify;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-weight: 300;
    font-family: Arial, Helvetica, sans-serif;
}

/* =============================
   BOTTONI & LISTE
   ============================= */
.btnContainer {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.urbesBtn {
    background-color: #516C7E;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.urbesBtn:hover {
    background-color: #67695b;
    color: #fff;
    text-decoration: none;
}

.urbes-list {
    list-style: none;
    padding-left: 0;
}

.urbes-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.urbes-list li::before {
    content: "•";
    color: #516C7E;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.document-section {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
    background-color: #999b8d;
}

.document-section h2 {
    color: var(--text-main);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.document-section2 {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
    background-color: #e5e6e4;
}

.document-section2 h2 {
    color: var(--text-main);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* Griglia Responsiva */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Card Style */
.document-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Icone del file */
.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-icon svg {
    width: 30px;
    height: 30px;
}

.category-label {
    font-size: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Logica dei Colori per Categoria */
.scientifico .file-icon {
    color: #ac3434;
}

.scientifico .category-label {
    font-size: small;
    color: #ac3434;
}

.tecnico .file-icon {
    color: #373737;
}

.tecnico .category-label {
    font-size: small;
    color: #373737;
}

.normativo .file-icon {
    color: #3639dd;
}

.normativo .category-label {
    font-size: small;
    color: #3639dd;
}

/* Testi */

.document-info p {
    margin: 0;
    line-height: 1.4;
    font-size: 1.3rem;
    text-align: justify;
    width: 100%;
    max-width: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.document-info span {
    display: inline-block;
    width: 100%;
    word-break: break-word;
    /* Spezza le parole lunghe o gli URL se necessario */
}

/* Bottone Apri documento */
.Linkopen-btn {
    text-decoration: none;
    color: #f4f6f7;
    font-weight: 600;
    font-size: small;
    padding: 5px 12px;
    background-color: #516C7E;
    border-radius: 6px;
    transition: all 0.2s;
}

.Linkopen-btn:hover {
    background-color: #67695b;
    color: #fff;
    font-size: small;
}

.Linkopen-btn:visited {
    color: #f4f6f7;
}

/* =============================
   FOOTER
   ============================= */
.footer {
    background: #999b8d;
    width: 100%;
    padding: 40px 0;
    color: #080808;
}

.footer-note {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.footer-note a {
    color: #000;
    text-decoration: none;
}

.foundNote {
    height: 60px;
    gap: 50px;
    object-fit: contain;
}

.ftpcon h3 {
    text-align: center;
    color: #fff;
    font-size: 1.8rem;
}

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 767px) {
    .navbar-fixed-top .container {
        display: block;
        /* Torna a block per il toggle mobile */
    }

    .navbar-header {
        justify-content: space-between;
        width: 100%;
    }

    .urbes-section {
        height: auto;
        min-height: 100vh;
        scroll-snap-align: none;
    }

    .btnContainer {
        flex-direction: column;
        align-items: center;
    }

    .urbesBtn {
        width: 100%;
        text-align: center;
    }
}