@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --maincolor: #2D336B;
    --subcolor: #7886C7;
    --backgroundcolor: #FFF2F2;
    --lightsubcolor: #7886C7;
    --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

body {
    margin: 0px;
    font-family: Roboto;
    font-weight: bold;
}

.container {
    display: grid;
    grid-template-columns: minmax(250px, 250px) minmax(100px,5fr); /*Make it responsive*/
    grid-template-rows: 1fr;
    

    .sidebar {
        display: grid;
        grid-template-rows: 10% 1fr 1fr;
        grid-template-columns: 1fr;
        background-color: var(--maincolor);
        color: white;
        
        span {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;

            i {
                font-size: larger;
                margin-right: 20px;
            }
        }

        ul {
            list-style-type: none;
            padding: 0px 0px 0px 0px;

            li {
                margin: 0px 0px 5px 20px;
                padding: 10px;
                font-size: large;
                color: white;
                transition-duration: 0.2s;

                * {
                    color: white;
                    padding: 0px 10px 0px 0px;
                }
            }

            li:hover {
                color: var(--subcolor);
                cursor: pointer;
                /* Hover stuff */
                * {
                    color: var(--subcolor);
                }
            }
        }

    }

    .dashboard_area {
        display: grid;
        background-color: var(--backgroundcolor);
        .header {
            background-color: white;
            .top {
                display: grid;
                grid-template-columns: 5fr 300px;

                form {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: start;
                    margin: 0px 50px;

                    input {
                        width: 50em;
                        height: 2.5em;
                        margin-left: 15px;
                        border-radius: 30px;
                        border: none;
                        background-color: lightgray;
                    }

                    button {
                        height: 2.5em;
                        width: 3em;
                        background-color: white;
                        border: none;
                        transition-duration: 0.2s;
                        i {
                            font-size: 20px;
                        }
                    }

                    button:hover {
                        color: var(--subcolor);
                        cursor: pointer;
                    }
                }

                .profile {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: space-evenly;

                    i {
                        font-size: 20px;
                        transition: 0.2s;
                    }

                    i:hover {
                        color: var(--subcolor);
                        cursor: pointer;
                    }

                    span {
                        display: flex;
                        flex-direction: row;
                        justify-content: center;
                        align-items: center;
                        a {
                            text-decoration: none;
                            color: black;
                        }
                        a:hover {
                            color: var(--subcolor)
                        }

                        img {
                            width: 40px;
                            height: 40px;
                            border-radius: 50%;
                            position: relative;
                            right: 20px;
                        }
                    }
                }
            }
            
            .bottom {
                display: grid;
                grid-template-columns: 2fr 1fr;
                padding: 10px 0px;

                .left {
                    display: flex;
                    flex-direction: row;
                    justify-content: flex-start;
                    align-items: center;
                    margin-left: 50px;

                    span {
                        display: block;
                        margin-left: 20px;
                        * {
                            margin:0px;
                        }
                    }

                    img {
                        width: 80px;
                    }
                }

                .right {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-evenly;
                    align-items: center;

                    button {
                        width: 120px;
                        height: 50px;
                        border-radius: 40px;
                        border: none;
                        background-color: var(--maincolor);
                        color: white;
                        font-weight: bold;
                        transition: 0.2s;
                    }

                    button:hover {
                        background-color: var(--subcolor);
                        cursor: pointer;
                    }
                }
            }
        }

        .work_area {
            display: grid;
            grid-template-columns: 4fr 1.5fr;

            /* Fix Scalability */
            .left {
                display: block;

                h2 {
                    margin-left: 30px;
                }
                .work {
                    display: grid;
                    padding: 0px 20px;
                    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
                    grid-template-rows: repeat(auto, 1fr);
                    
                    gap: 30px;
                    justify-content: center;
                    align-items: start;

                    .card {
                        display: flex;
                        background: white;
                        border-radius: 8px;
                        height: 50vh;
                        box-shadow: var(--box-shadow);
                        overflow: hidden;
                        height: auto;

                        .left-bar {
                            width: 40px;
                            background-color: var(--subcolor); /* yellow/orange bar */
                        }

                        .card-content {
                            padding: 16px;
                            flex-grow: 1;

                            h3 {
                                margin: 0;
                                font-size: 1.1em;
                            }

                            p {
                                color: #555;
                                font-size: 0.9em;
                                margin: 8px 0 16px;
                            }

                            .link_icons {
                                display: flex;
                                flex-direction: row;
                                justify-content: end;

                                i {
                                    font-size: 1.5rem;
                                    padding: 10px;
                                    transition: 0.2s;
                                }

                                i:hover {
                                    color: var(--subcolor);
                                    cursor: pointer;
                                }
                            }
                        }                        
                    }
                }
                
            }

            .right {
                display: block;
                position: sticky;

                .announcements {
                    background-color: white;
                    box-shadow: var(--box-shadow);
                    border-radius: 15px;
                    padding: 20px 40px;
                    margin-right: 20px;

                    h3 {
                        font-size: 1.2rem;
                    }

                    h5 {
                        font-size: 0.8rem;
                        color: #555;
                    }
                }

                .trending {
                    background-color: white;
                    box-shadow: var(--box-shadow);
                    border-radius: 15px;
                    padding: 10px 40px;
                    margin-right: 20px;

                    .user {
                        display: flex;
                        flex-direction: row;
                        justify-content: start;
                        align-items: center;
                        margin: 1.3em 0px;

                        img {
                            width: 3em;
                        }

                        span {
                            display: block;
                            margin-left: 10px;

                            h3 {
                                font-size: 1em;
                                margin: 2px;
                            }
                            p {
                                color: #555;
                                font-size: 0.9em;
                                margin: 2px;
                            }
                        }
                    }
                }
            }
        }
    }

    
}

footer {
    text-align: center;
    background-color: var(--subcolor);
    padding: 1px;
}