@font-face {
    font-family: 'Amadi Demo';
    src: url('fonts/AmadiDemo-Regular.woff2') format('woff2'),
        url('fonts/AmadiDemo-Regular.woff') format('woff'),
        url('fonts/Amadi-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Brogi FREE';
    src: url('fonts/BrogiFREE.woff2') format('woff2'),
        url('fonts/BrogiFREE.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /*default*/  
        --text-color: white;
        --secondary-text-color: #dee2ec;
        --bg-color: #0c1e35;
        --secondary-bg-color: #0b1a2c;
        --border-color: rgba(83, 93, 125, 0.3);
        --accent-color: #76c1d7;
        --sidebar-header-height: 100px;
        --sidebar-footer-height: 100px;
    }
    
    /* Light theme variables */
    [data-theme="light"] {
        --text-color: black;
        --secondary-text-color: #1a1f25;
        --bg-color: #f0f2f5;
        --secondary-bg-color: #e0e2e5;
        --border-color: rgba(83, 93, 125, 0.2);
        --accent-color: #76c1d7;
    }
    
    /* Dark theme variables */
    [data-theme="dark"] {
        --text-color: white;
        --secondary-text-color: white;
        --bg-color: #121212;
        --secondary-bg-color: #1e1e1e;
        --border-color: rgba(255, 255, 255, 0.1);
        --accent-color: #76c1d7;
    }
    
    
    .layout.sidebar-collapsed {
        margin-left: 60px;
    }
    
    .header { 
        grid-area: header;
        background-color: rgb(112, 180, 209); /*si potrebbe inserire un linear gradient linear-gradient(45deg, #76c1d7, #5aacc1, #3b96ab);*/
        height: 150px; 
        position: relative;
        margin-bottom: 30px;
        font-size: 20px;
     }
    
    .header h1 {
        font-family: 'Amadi Demo', sans-serif;
        font-size: 100px;
        text-align:center;
        margin: 50px auto;   
        display: block;  
        position: absolute;    
    }
    
    .header h5 {
        font-weight: bold;
        font-family: 'Times New Roman', Times, serif;
        font-size: 25px;
        margin: 120px auto auto 425px;
        text-align: center;
        display: block;
        position: absolute;
    }
    
    .main {
        padding: 20px;
        flex-grow: 1;
    }
    
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        font-family: 'Poppins', sans-serif;
        color: var(--text-color);
        font-size: 0.9rem;
        transition: background-color 0.3s ease;
        background-color: #f4f7fa;
    }
    
    a {
        text-decoration: none;
        color: var(--text-color);
    }
    
    .layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        margin-left: 260px;
        transition: margin-left 0.3s ease;
    }
    
    .layout.sidebar-collapsed {
        margin-left: 60px;
    }
    /* Footer styling */
    footer {
        background-color: white;
        padding: 20px;
        text-align: center;
        border-top: 1px solid #e0e0e0;
        transition: margin-left 0.3s ease;
        color: black;
    }
    
    footer.sidebar-collapsed {
        margin-left: 60px;
    }
    
    footer a {
        color: var(--accent-color);
    }
    
    /* Toggle button styling */
    .toggle-btn {
        position: fixed;
        left: 270px;
        top: 20px;
        background-color: var(--accent-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5em;
        cursor: pointer;
        transition: all 0.3s;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    .toggle-btn.collapsed {
        left: 70px;
    }
    
    /* Sidebar styling */
    .sidebar {
        width: 260px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        background-color: var(--bg-color);
        color: var(--text-color);
        transition: all 0.3s;
        z-index: 999;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        padding-top: 20px;
    }
    
    .sidebar.collapsed {
        width: 60px;
        overflow: visible;
    }
    
    /* Dropdown container DATA */
    .dropdown-container {
        position: relative;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .dropdown-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 10px;
        background-color: var(--secondary-bg-color);
        color: var(--secondary-text-color);
        border: none;
        border-radius: 4px;
        cursor: pointer;
        text-align: left;
        font-size: 16px;
        transition: all 0.3s;
    }
    
    .dropdown-btn:hover {
        background-color: rgba(255, 129, 0, 0.1);
    }
    
    .sidebar.collapsed .dropdown-btn {
        padding: 12px 5px;
        justify-content: center;
    }
    
    .sidebar.collapsed .dropdown-btn span {
        display: none;
    }
    
    .dropdown {
        display: none;
        background-color: var(--secondary-bg-color);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 5px;
        max-height: 300px;
        overflow-y: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown a {
        display: block;
        padding: 10px;
        color: var(--text-color);
        transition: all 0.3s;
    }
    
    .dropdown a:hover {
        background-color: rgba(255, 129, 0, 0.1);
        color: var(--secondary-text-color);
    }
    
    .sidebar.collapsed .dropdown {
        position: absolute;
        left: 60px;
        top: 0;
        width: 250px;
        z-index: 1000;
    }
    
    /* Sidebar links */
    .sidebar a:not(.dropdown a) {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: var(--text-color);
        transition: all 0.3s;
        white-space: nowrap;
    }
    
    .sidebar a:not(.dropdown a):hover {
        background-color: rgba(255, 129, 0, 0.1);
        color: var(--secondary-text-color);
    }
    
    .sidebar.collapsed a:not(.dropdown a) {
        padding: 12px 0;
        justify-content: center;
    }
    
    .sidebar.collapsed a:not(.dropdown a) span {
        display: none;
    }
    
    /* opzioni dropdown REFERENCES*/
    .dropdown-container {
        position: relative;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .dropdown-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 10px;
        background-color: var(--secondary-bg-color);
        color: var(--secondary-text-color);
        border: none;
        border-radius: 4px;
        cursor: pointer;
        text-align: left;
        font-size: 16px;
        transition: all 0.3s;
    }
    
    .dropdown-btn:hover {
        background-color: rgba(255, 129, 0, 0.1);
    }
    
    .dropdown {
        display: none;
        background-color: var(--secondary-bg-color);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 5px;
        max-height: 300px;
        overflow-y: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown a {
        display: block;
        padding: 10px;
        color: var(--text-color);
        text-decoration: none;
        transition: all 0.3s;
    }
    
    .dropdown a:hover {
        background-color: rgba(255, 129, 0, 0.1);
        color: var(--secondary-text-color);
    }
    
    
    /* Theme options */
    .theme-options {
        padding: 0 20px;
        margin-top: auto;
        margin-bottom: 20px;
    }
    
    .color-scheme {
        display: flex;
        align-items: center;
        background-color: var(--secondary-bg-color);
        padding: 10px;
        border-radius: 4px;
    }
    
    .color-scheme label {
        margin-right: 10px;
        white-space: nowrap;
    }
    
    .color-scheme select {
        flex: 1;
        padding: 5px;
        border-radius: 3px;
        border: 1px solid var(--border-color);
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .sidebar.collapsed .theme-options {
        display: none;
    }
    
    /* Scrollbar styling */
    .sidebar::-webkit-scrollbar {
        width: 6px;
        background-color: var(--bg-color);
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .sidebar:hover::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .dropdown::-webkit-scrollbar {
        width: 4px;
        background-color: var(--secondary-bg-color);
    }
    
    .dropdown::-webkit-scrollbar-thumb {
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .layout, footer {
            margin-left: 0;
        }
        
        .sidebar {
            transform: translateX(-100%);
        }
        
        .sidebar.mobile-visible {
            transform: translateX(0);
        }
        
        .toggle-btn {
            left: 20px;
        }
        
        .toggle-btn.sidebar-visible {
            left: 270px;
        }
    }

/*BOX */
.container {
    display: flex;
    max-width: 95%; 
}

.box {
    background-color: #ffffff;
    color: var(--bg-color);
    margin: 10px; 
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 30px;

}
.container .box:first-child {
    flex: 60%;
}
.container .box:last-child {
    flex: 40%;
}
.box-content {
    padding: 10px;
}

.home-link {
    text-decoration: none;
    background-color: white;
    color: #2a5885;
    font-weight: bold;
    padding: 10px;
    border: 1px solid #2a5885;
    border-radius: 5px;
    display: flex;
    transition: background-color 0.3s, color 0.3s;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    margin-left: 10px; 
    max-width: 125px;
    left: 2rem;
    
}

.home-link:hover {
    background-color: #2a5885 !important;
    color: white !important;
}
