@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* OVERALL PAGE */

main {
    height: 100vh;
    font-family: 'Roboto', sans-serif;
}

.top_container {
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-rows: 1fr 3fr;
}

/* HEADER */
.header {
    grid-column: 2;
    display: grid;
    grid-template: 1fr 1fr / 2fr 1fr;
}
/*      --- SEARCH */
.header > form {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

form img {
    width: 30px;
}

form input {
    border-radius: 15px;
    height: 25px;
    width: 80%;
    background-color: lightgray;
}
/*      --- NOTIFICATIONS & LOGGED USER */
.right_icons {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.right_icons img:first-of-type {
    width: 20px;
}

.right_icons img:nth-of-type(2) {
    width: 40px;
    background-color: salmon;
    border-radius: 50%;
    border: black 1px solid;
}

/*      --- USER GREETING */
.user_greet {
    display: grid;
    grid-template: 1fr 1fr / 1fr 4fr;
    column-gap: 10px;
    align-items: center;
}

.avatar {
    grid-row: 1 / 3;
    background-color: salmon;
    border-radius: 50%;
    max-width: 70px;
    min-width: 50px;
    place-self: center;
    border: black 1px solid;
    margin-left: 5px;
    margin-bottom: 10px;
}

/*      --- ACTION BUTTONS */
.nav_buttons {
    display: flex;
    justify-content: space-around;
    place-items: center;
}

.nav_buttons button {
    appearance: none;
    padding: 5px;
    border-radius: 15px;
    margin: 5px;
    flex-grow: 1;
    background-color: sandybrown;
}

/* SIDEBAR */
.sidebar {
    grid-row: 1 / 3;
    min-width: 110px;
    background-color: sandybrown;
}

/*      --- LOGO */
.logo_title {
    display: flex;
    flex-direction: column;
    align-content: start;
}

.logo_title > img {
    margin-left: 5px;
    max-width: 30%;
}

.logo_title > h3 {
    margin-left: 5px;
    font-size: 3.5vw;
    font-weight: 700;
    color: white;
}

/*      --- LINKS */
.nav_links {
    margin-top: 30px;
    margin-left: 3%;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 4fr;
    column-gap: 5px;
    row-gap: 10px;
}

.nav_links a:hover {
    background-color: white;
}

.nav_links a {
    text-decoration: none;
}

.nav_links a:visited {
    color: black;
}

/* MAIN SECTION */
.main_content {
    padding: 5px;
    display: grid;
    grid-template: 40px 8fr 40px 8fr / 3fr 1fr;
    gap: 5px;
    background-color: lightgray;
}

.main_content > p, .annouce_title > p,
.trend_title > p {
    padding-top: 10px;
    padding-left: 10px;
    font-size: 1rem;
    font-weight: bold;
}

/*      --- CARDS */
.info_cards {
    grid-row: 2 / 5;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 5px;
}

.card {
    margin: 0 5px 5px;
    border: black 1px solid;
    border-left: black 15px solid;
    padding: 10px;
    padding-left: 20px;
    border-radius: 10px;
    font-size: 0.8rem;
    background-color: whitesmoke;
}

.card h4 {
    margin: 5px 0 5px;
    font-size: 1.1rem;
}

.card img {
    width: 25px;
    border-radius: 40%;
    margin: 5px 5px;
    float: right;
}

.card img:hover {
    background-color: lightgray;
}

/*      --- ANNOUCEMENTS */
.annoucements {
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.annoucement {
    border: black 1px solid;
    margin-right: 5px;
    padding: 10px;
    flex-grow: 1;
    background-color: whitesmoke;
}

.annoucement:first-of-type {
    border-radius: 10px 10px 0 0;
}

.annoucement:last-of-type {
    border-radius: 0 0 10px 10px;
}

/*      --- TRENDING */
.trending {
    grid-column: 2 / 3;
}

.user {
    border: black 1px solid;
    display: flex;
    justify-content: space-evenly;
    place-items: center;
    background-color: whitesmoke;
}

.user:first-of-type {
    border-radius: 10px 10px 0 0;
}

.user:last-of-type {
    border-radius: 0 0 10px 10px;
}

.user img {
    width: 50px;
    border-radius: 50%;
    border: black 1px solid;
    margin: 5px 0 5px 0;
}

.user img[alt='avatar-2'] {
    background-color: deepskyblue;
}

.user img[alt='avatar-3'] {
    background-color: goldenrod;
}

.user img[alt='user-avatar'] {
    background-color: salmon;
}

.user img[alt='avatar-4'] {
    background-color: lightseagreen;
}

@media screen and (max-width: 570px) { 
    .main_content {
        padding: 5px;
        display: flex;
        flex-direction: column;
    }
} 
