/* Base layout */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 5fr;
    grid-template-rows: 1fr 4fr;
    overflow: hidden;
}

.side-panel {
    background-color: #1992D4;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    display: grid;
    grid-template-rows: 75px repeat(3, 2fr);
    gap: 12px;
}

.top-panel {
    background-color: #FFFFFF;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr 1fr;
}

.main-panel {
    background-color: #E2E8F0;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: grid;
}

/* Mobile Responsiveness - Largely AI Generated. Not to be a respresentation of my abilities */
/* Pretty broken so far... please fix future me */

@media only screen and (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column; /* Stack elements vertically */
        min-height: 100vh;
        margin: 0;
    }

    .side-panel {
        width: 100%; /* Full width for sidebar */
        background-color: #1992D4;
        padding: 15px 0;
        position: relative; /* Allow natural stacking */
        margin-bottom: 0; /* Prevent extra spacing at the bottom */
    }

    .top-options, .main-panel {
        width: 100%; /* Full width for main content */
        padding: 10px;
        margin: 0;
        box-sizing: border-box; /* Ensure padding doesn’t add to width */
    }

    .top-options {
        margin-top: 0; /* Remove extra margin */
    }

    .main-panel {
        flex-grow: 1; /* Ensure it takes up remaining space */
    }

    /* Adjust text sizes for mobile */
    .logo-heading, .side-item h4, .top-buttons, .profile-main-text {
        font-size: 14px;
    }

    .side-item {
        grid-template-columns: 10% 70%;
    }

    .top-search-bar {
        width: 90%;
    }
}




/* Text */
h1, h2, h3, h4, h5, h6, p, label { font-family: Helvetica, sans-serif;}

hr { /* Black bar */
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid rgb(194, 194, 194);
    margin: 1em 0;
    padding: 0;
}


/* Side bar logo*/
.side-logo {
    display: grid;
    grid-template-columns: 18% 50%;
    align-items: center;
    margin-top: 5%;
    margin-left: 5%;
    gap: 10px;
}

.logo-heading {
    font-size: 1.5vw;
    color: white;
    overflow: hidden;
}

/* Side bar items */

.side-options {
    display: grid;
    grid-template-columns: 100% / auto auto auto auto auto auto auto auto auto;
    margin-left: 10%;
    margin-top: 20%;
    column-gap: 5px;
    row-gap: 0;
}

.side-item {
    display: grid;
    grid-template-columns: 11% 50%;
    column-gap: 20px;
    align-items: center;
    text-align: left;
    font-size: calc(3px + 0.8vw); /* Keeps the font size at a minimum of 0.8vw */
    fill: white;
    color: #FFFFFF;
}

.side-item:hover {
    border-radius: 5px;
    background-color: #229fe2b7;
    cursor: pointer;
}

/* Top bar items */
    /* Search bar */

.top-search-bar {
    border-radius: 8px;
    height: 35px;
    box-shadow: 7px /* Depth */ 4px /* up/down angle*/ 5px /* Blur */ 1px /* Padding */ rgba(0, 0, 0, 0.425);
    background-color: #e9e9e92a;
    font-weight: bold;
    padding-left: 12px;
    border: none;
    margin-top: 8px;
    font-size: 17px;
    &:focus{
        border: 1px solid #1992D4;
        transition: 0.35s ease;
        color: #1992D4;
    }
}

.top-search-bar:hover {
    box-shadow: 9px 6px 5px 1px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}


.top-options {
    display: grid;
    grid-template-areas: 
        "searchbar rightprofile"
        "profile buttons";
    grid-template-columns: 60% 50%;
    grid-template-rows: 50% 50%;
    margin-left: 80px;
}

.top-search {
    display: grid;
    grid-area: searchbar;
    grid-template-columns: 10% 90%;
    align-items: center;
}

    /* Small Profile / Notifications */
    .top-right-profile {
        display: grid;
        grid-area: rightprofile;
        grid-template-areas: "bell smallIcon name";
        grid-template-columns: 4.5% 10% 30%;
        justify-content: start;
        align-items: center;
        margin-left: 200px;
        gap: 30px;
    }


/* Bottom Bar Items */
    /* Bottom Profile Section */
.top-profile {
    grid-area: profile;
    grid-template-areas:
    "a b"
    "a c";
    grid-template-columns: 12% 40%;
    grid-template-rows: 50% 50%;
    display: grid;
    align-items: center;
    margin-top: 15px;
}

.profile-img {
    width: 60px;
    border: 4px solid #ffff00a9;
    border-radius: 35px;
    grid-area: a;
    display: grid;
}

.profile-main-text {
    font-weight: bold;
    font-size: 1vw;
    grid-area: b;
    display: grid;
    margin: 0;
}

.profile-small-text {
    font-weight: bold;
    font-size: 0.8vw;
    grid-area: c;
    display: grid;
    margin-bottom: 2px;
}

    /* Bottom Button Section */
.top-buttons-layout {
    grid-area: buttons;
    grid-template-areas: "new upload share";
    grid-template-columns: 20% 20% 20%;
    display: grid;
    justify-content: start;
    align-items: center;
    gap: 20px;
    margin-left: 100px;
}

.top-buttons {
    border-radius: 20px;
    background-color: #1992D4;
    border-color: #1992D4;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 0.95vw;
    width: 100%;
    height: 40%;
    cursor: pointer;
    border: 0px;
}

/* Main Panel */
.main-panel {
    display: grid;
    grid-template-areas: 
        "projects announcements"
        "projects trending";
    grid-template-columns: 70% 30%;
    grid-template-rows: 50% 50%;
    max-height: 100vh;
    padding-bottom: 50px;
    overflow-y: scroll;
}

    /* Projects Panel */
.main-projects {
    grid-area: projects;
    display: grid;
    margin-left: 25px;
}

.main-projects-panel-layout {
    display: grid;
    grid-template-areas: 
        "title title"
        "ione itwo"
        "ithree ifour"
        "ifive isix";
    grid-template-columns: 47% 47%;
    grid-template-rows: 10% 25% 25% 25%;
    column-gap: 20px;
    row-gap: 20px;
}

.main-project-panel-item {
    background-color: white;
    border-radius: 10px;
    border-left: 8px solid #F0B429;
    padding-left: 20px;
    display: grid;
    grid-template-areas: 
        "projectTitle"
        "projectIntro"
        "projectIcons";
    grid-template-rows: 20% 40% 52%;
    box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.2);
}

.main-project-panel-item:hover {
    box-shadow: 9px 7px 5px 1px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}

.main-project-item-icons {
    display: flex;
    justify-content: flex-end;
    grid-area: projectIcons;
    margin-right: 5px;
}

.main-svg-icon {
    width: 35px;
    height: auto;
    padding-right: 15px;
    cursor: pointer;
}

.main-project-card-p {
    font-size: 17px;
    grid-area: projectIntro;
}

.main-project-card-h {
    font-size: 25px;
    grid-area: projectTitle;
}

    /* Announcements Panel */ 
.main-announcements {
    grid-area: announcements;
    display: grid;
    margin-left: 10px;
    max-height: fit-content;
    overflow-y: scroll; 
}

.main-announcements-panel-layout {
    display: grid;
    grid-template-areas: 
        "Atitle"
        "Arows"
        "Arows"
        "Arows";
    grid-template-columns: 90%;
    grid-template-rows: 20% 23% 23% 23%;
    row-gap: 10px;
    max-width: 100%;
    max-height: 100%;
}

.announcement-rows {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.2); 
}

.announcement-rows:hover {
    box-shadow: 9px 7px 5px 1px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}

    /* Side Panel Text Size*/
.side-panel-h {
    font-size: 14px;
    margin: 0;
}

.side-panel-p {
    font-size: 12px;
}

    /* Trending Panel */
.main-trending {
    grid-area: trending;
    display: grid;
    margin-left: 10px;
    display: block;
    max-width: 90%;
    padding-top: 10px;
}

.main-trending-panel-layout {
    display: grid;
    grid-template-areas: 
        "Trows1"
        "Trows2"
        "Trows3"
        "Trows4";
        grid-template-columns: 80%;
        grid-template-rows: 23% 23% 23% 23%;
        background-color: #FFFFFF;
        border-radius: 10px;
        box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.2); 
}

.trending-row-item {
    display: grid;
    grid-template-areas: 
    "t-image t-name"
    "t-image t-desc";
    grid-template-columns: 30% 70%; /* Adjusted columns */
    grid-template-rows: auto auto; /* Allow rows to size automatically */
    padding-left: 25px;
    column-gap: 25px;
    align-items: center;
    row-gap: 0;
    overflow: hidden;
    padding-bottom: 7px;
    padding-top: 7px;
}


.main-trending-panel-layout:hover {
    box-shadow: 9px 7px 5px 1px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
}

.trending-image {
    width: 60px;
    height: auto;
    grid-area: t-image;
    border-radius: 40px;
    object-fit: cover;
}

.trending-panel-h {
    font-size: 15px;
    margin: 0;
    grid-area: t-name;
}

.trending-panel-p {
    font-size: 16px;
    grid-area: t-desc;
    margin: 0;
    margin-top: -15px;
    color: rgb(131, 131, 131);
}