/* =========================================
   LAYOUT.CSS - Navbar, Menu e Footer
   ========================================= */

/* --- NAVBAR BASE --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    padding: 15px 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* LOGO */
.logo {
    display: flex; 
    align-items: center; 
    gap: 15px;
    font-size: 24px; 
    font-weight: bold; 
    color: var(--csi-blue);
    line-height: 1;
}
.logo-img { height: 60px; width: auto; }
.logo span { color: var(--csi-orange); }

/* LISTA MENU GENERALE */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links a, .menu-row a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: color 0.3s;
    text-transform: uppercase;
    display: block;
}
.nav-links a:hover, .menu-row a:hover { color: var(--csi-blue); }

/* HAMBURGER */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--csi-blue);
    z-index: 10001;
    transition: 0.3s;
}
.hamburger.active i { color: white; }

/* --- REGOLE NAVBAR DESKTOP (> 900px) --- */
@media (min-width: 901px) {
    .nav-links li { margin-left: 25px; }
    .dropdown { position: relative; height: 100%; }
    
    .menu-row { display: flex; align-items: center; }
    .arrow-btn { 
        margin-left: 8px; 
        font-size: 0.8em;
        pointer-events: none; 
        color: #333;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        min-width: 250px;
        background-color: var(--csi-blue);
        top: 100%; right: 0;
        margin-top: 15px;
        box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
        border-top: 4px solid var(--csi-orange);
        z-index: 99999;
    }

    .dropdown-content::before {
        content: "";
        display: block;
        position: absolute;
        bottom: 100%; 
        left: 0;
        width: 100%;
        height: 20px; 
        background: transparent; 
    }    
    
    .dropdown-content a {
        color: white !important;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-transform: none;
    }
    .dropdown-content a:hover { background-color: var(--csi-orange); }
    .dropdown:hover .dropdown-content { display: block; }
}

/* --- REGOLE NAVBAR MOBILE (< 900px) --- */
@media (max-width: 900px) {
    .hamburger { display: block; }

    .nav-links {
        display: none;
        position: fixed; 
        top: 0; right: 0;
        height: 100vh; 
        width: 85%;    
        background-color: var(--csi-blue);
        flex-direction: column; 
        align-items: flex-start;
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .nav-links.active { display: flex; }

    .nav-links li { width: 100%; margin: 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-links > li > a { color: white; padding: 15px 20px; font-size: 18px; display: block; width: 100%;}
    
    .menu-row { display: flex; width: 100%; }
    .menu-row a { color: white; padding: 15px 20px; font-size: 18px; flex-grow: 1; }
    
    .arrow-btn {
        width: 60px;
        display: flex; align-items: center; justify-content: center;
        border-left: 1px solid rgba(255,255,255,0.1);
        color: white;
        cursor: pointer;
        background-color: rgba(0,0,0,0.1);
    }
    .arrow-btn.active-arrow { background-color: var(--csi-orange); }

    .dropdown-content {
        display: none;
        width: 100%;
        background-color: #0d3275; 
        box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    }
    .dropdown-content.open { display: block; }
    
    .dropdown-content a { 
        padding: 12px 20px 12px 40px; 
        color: #ccc !important; 
        text-transform: none;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}

/* --- FOOTER --- */
footer {
    background-color: var(--csi-blue);
    color: white;
    padding: 40px 5% 10px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-col h4 {
    color: var(--csi-orange);
    margin-bottom: 15px;
}

.social-icons a {
    color: white;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.3s;
    text-decoration: none; 
    display: inline-block;
}
.social-icons a:hover { color: var(--csi-orange); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #ffffff6c;
}