* {
    padding: 0;
    border: 0;
    margin: 0;
    vertical-align: baseline;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.layout {
    display: grid;
    grid-template-rows: 100px 150px auto 100px;
    grid-template-areas:
        "menu"
        "sidebar"
        "main"
        "footer";
    height: 100vh;
}

.headerdesktop ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.headerdesktop li {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem; 
    transition: background-color 0.3s; 
    border-radius: 4px; 
}

.headerdesktop li:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.main-nav, .main-nav nav {
    grid-area: menu;
    background-color: #01579b;
    color: white;
    padding: 10px;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 5px;
}

aside {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
    color: gray;
    padding: 10px;
    align-items: center;
    justify-content: center;
    align-items: stretch;
}



label.form-label {
    width: 100%;
    text-align: center;
    padding: 0 10px 0 10px;
}

main {
    grid-area: main;
    padding: 10px;
}

main .card {
    margin: 10px;
    box-sizing: border-box;
}

footer {
    grid-area: footer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #002f6c;
    color: white;
    padding: 10px;
}

.icons {
    display: flex;
    gap: 10px;
}

.textfooter p {
    max-width: 150px; 
    text-align: center;
}

.bg-primary-custom {
    background-color: #01579b !important; 
}

.btn-custom {
    background-color: #01579b;
    color: #fff;
    border: none;
    border-radius: 5px; 
}

.btn-custom:hover {
    background-color: #014c8c;
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
}

.headerdesktop {
    display: none;
}

@media (min-width: 576px) {
    .layout {
        grid-template-columns: 1fr 5fr;
        grid-template-rows: 100px auto 150px;
        grid-template-areas:
            "menu sidebar"
            "menu main"
            "menu main"
            "footer main";
    }

    .headermobile {
        display: none;
    }

    .headerdesktop {
        display: block;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .layout {
        grid-template-columns: 1fr 3fr;
        grid-template-rows: 100px auto;
        grid-template-areas:
            "menu menu"
            "sidebar main"
            "sidebar main"
            "footer footer";
        height: auto;
    }

    .col-md-4, .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    aside {
        grid-area: sidebar;
        display: flex; 
        justify-content: flex-start; 
        flex-direction: column;
        background-color: #f0f0f0;
        color: gray;
        padding: 10px;
    }

    .main-nav {
        display: flex;
        align-items: center; 
        justify-content: center;
        height: 100px; 
    }

    .headerdesktop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        width: 100%;
        
    }

    .headerdesktop ul {
        display: flex;
        flex-direction: row;
        gap: 30px;
        margin: 0;
        padding: 0;
    }
    
    .headerdesktop .logo {
        display: flex;
        align-items: center;
        gap: 10px; 
    }

}

@media (min-width: 992px) and (max-width: 1400px) {
    .col-lg-3, .col-md-4, .col-sm-6 {
        flex: 0 0 33.33%; 
        max-width: 33.33%; 
    }
    
    .headerdesktop h2 {
        font-size: 1.5rem; 
        white-space: nowrap; 
    }
}
