@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --mail: #1a2436;
    --facebook: #1877f2;
    --twiiter: #000000;
    --linkedin: #0a66c2;
    --youtube: #ff0000;
    --instagram: #cc2368;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

body {
    background: linear-gradient(to right, #def6, #fde6);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;

    &:hover {
        color: red;
    }
}

p {
    line-height: 1.5;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 1rem;

    &.g400 {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

#news {
    overflow: auto;
    height: 425px;
}

.mxw {
    max-width: 1440px;
    margin: auto
}

.box,
.visitor {
    border: 1.5px solid #666;
    /* max-width: 340px; */
    width: 100%;
    transition: 200ms ease-in-out;
    border-radius: 0.5rem;
    padding: 1rem
}

.visitor {
    /* max-width: 455px; */
    padding: 0;
    overflow: hidden;
}

.visitor img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border-top-left-radius: 0;
    /* border-top-right-radius: 0;     */
}

.visitor div {
    margin: 1rem;
}

.visitor div p {
    font-weight: 500;
}

.box h4 {
    font-size: 1.2rem
}

.box:hover,
.visitor:hover {
    background: #fde6;
    cursor: default
}

.staff img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
}

.gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
    transition: 200ms ease-in-out;

    &:hover {
        transition: 200ms ease-in-out;
        scale: 1.2;
    }
}

.awards img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
    transition: 200ms ease-in-out;

    &:hover {
        transition: 200ms ease-in-out;
        scale: 1.2;
    }
}

.eresources img {
    width: 140px;
    height: 70px;
    object-fit: contain;
    object-position: center;
}

table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #000;
}

table thead {
    border-bottom: 1px solid #000;
    background: #333;
    color: #fff;
    text-align: left;
}

table td,
table th {
    padding: 0.5rem;
}

table td {
    border-bottom: 1px solid #aaa;
}

.chevron-down,
.chevron-right {
    display: inline-block;
    border-right: 1.75px solid black;
    border-bottom: 1.75px solid black;
    width: 6px;
    height: 6px;
    margin-top: -4px;
    transform: rotate(45deg);
}

.chevron-right {
    transform: rotate(-45deg);
}

.show-top {        
    top: -254px;
}

nav {
    transition: 200ms ease-in-out;

    & ul {
        list-style: none;
        display: flex;
        gap: 0.25rem;

        & a {
            white-space: nowrap;
            color: inherit;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border: 1px solid seagreen;
            border-radius: 0.25rem;
            padding: 0.5rem 1rem;
            transition: 200ms ease-in-out;

            &.active,
            &:hover,
            &:focus-within {
                background: linear-gradient(to right, seagreen, slateblue);
                color: white;
                outline: transparent;

                & .chevron-down {
                    border-color: white;
                }
            }
        }
    }
}

li {
    position: relative;    

    &>ul {
        background-color: white;
        flex-direction: column;
        position: absolute;
        min-width: 250px;
        display: none;
        border: 1px solid seagreen;
        
        
        & ul {            
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            margin-left: 250px;            
        }

        & a {
            /* white-space: wrap; */
            border: 1px solid transparent;
        }
    }

    &:active,
    &:focus-within {
        &>ul {
            display: flex;
            flex-direction: column;

            &.active,
            & a:active,
            & a:focus-within {
                background: linear-gradient(to right, #2e8b57, #6a5acd);
                font-weight: bold;
                color: white;
                outline: transparent;
            }
        }
    }
}

header {
    position: sticky;
    top: 0;
    background-color: #fffc;
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    z-index: 9999;
}

main {
    /* max-width: 1400px; */
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.links {
    display: flex;
    gap: 2rem;
    padding-inline: 1rem;
    font-weight: bold;
    font-size: 0.8rem;

    & a {
        text-decoration: none;
        /* color: black; */
        transition: 200ms ease-in-out;
    }
}

.brand {
    display: flex;
    flex-direction: row;
}

.no-wrap {
    white-space: nowrap;
}

.twitter,
.facebook,
.mail,
.instagram,
.linkedin,
.youtube {
    & svg {
        fill: white;
    }
}

footer {

    .twitter,
    .facebook,
    .mail,
    .instagram,
    .linkedin,
    .youtube {
        & svg {
            fill: unset;
        }
    }
}

.navmenu .menu svg {
    fill: black;
}

.social-media {
    display: flex;
    gap: 1rem;
    justify-self: end;
    align-items: center;
    padding-inline: 1rem;
    transition: 200ms ease-in-out;

    & a {
        text-decoration: none;

        & svg {
            width: 1.25rem;
            height: 1.25rem;
            transition: 200ms ease-in-out;
        }

        &.mail:hover svg {
            fill: var(--mail);
        }

        &.facebook:hover svg {
            fill: var(--facebook);
        }

        &.twitter:hover svg {
            fill: var(--twitter);
        }

        &.linkedin:hover svg {
            fill: var(--linkedin);
        }

        &.youtube:hover svg {
            fill: var(--youtube);
        }

        &.instagram:hover svg {
            fill: var(--instagram);
        }
    }

}

.large a {
    & svg {
        width: 2rem;
        height: 2rem;
    }
}

section {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    /* border: 1px solid #def; */
    border-radius: 1rem;
    padding: 1rem;
    min-width: 350px;
}

.gtc {
    display: grid;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    /* grid-template-columns: 1fr 2fr; */
}

.gtc1 {
    grid-template-columns: 1fr;
}

.gtc2 {
    grid-template-columns: 1fr 1fr;
}

.gtc12 {
    grid-template-columns: 1fr 2fr;
}

.gtc21 {
    grid-template-columns: 2fr 1fr;
}

.gtc3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.gtc121 {
    grid-template-columns: 1fr 3fr 1fr;
}

.gtc13 {
    grid-template-columns: 1fr 3fr;
}

.gtc31 {
    grid-template-columns: 3fr 1fr;
}

.hide,
.dyna-link,
.hide-l {
    display: none;
}

.hide-m,
.show-m,
.hide-s {
    display: hide;
}

#menu,
#menuopen,
#menuclose {
    display: none;
    cursor: pointer;
}

@media screen and (max-width: 1200px) {
    .navmenu {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .hide-m {
        display: none !important;
    }

    .all-links {
        display: none;
    }

    .dyna-link {
        display: unset;
    }

    .gtc121 {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 900px) {
    #news {
        height: auto;
    }

    .show-top {        
        top: unset;
    }

    .navmenu {
        align-items: center;
        flex-direction: row;
    }

    .menu {
        display: block;

        &>* {
            margin-top: -3rem;
        }
    }

    #menuopen {
        display: block;
    }

    nav ul {        
        .chevron-right {
            transform: rotate(45deg);
        }
        & a:has(span) {
            font-weight:bold;
        }
        flex-direction: column;
        position: absolute;
        background: linear-gradient(to right, #def, #fde);
        left: 0;
        margin-top: -0.5rem;
        width: calc(100dvw - 1rem);
        height: calc(100dvh - 140px);
        padding: 1rem;
        overflow: auto;
        display: none;

        & ul {
            position: relative !important;
            width: auto;
            padding:0.5rem;
            margin-left: 0;
            margin-top: 0;
            border-left: 1px solid #000;
            border-radius: 0 !important;
            height: auto;
        }
    }

    #menu:checked {
        &+.menu #menuopen {
            display: none !important;
        }

        &+.menu #menuclose {
            display: block !important;
        }

        ~ul {
            display: flex !important;
        }
    }

    .hide-m {
        display: none;
    }

    .gtc3,
    .gtc13,
    .gtc31,
    .gtc121 {
        grid-template-columns: 1fr;
    }

    .all-links {
        display: unset;
    }

    .dyna-link {
        display: none;
    }
}


@media screen and (max-width: 699px) {
    .all-links {
        display: unset;
    }

    .dyna-link {
        display: none;
    }

    .topheader {
        justify-content: center;
    }

    nav {
        margin-top: 0.5rem;
    }

    nav ul {
        height: calc(100dvh - 180px);
        margin-left: 0 !important;
    }

    .hide-s {
        display: none !important;
    }

    h1 {
        font-size: 1.4rem;
    }

    .fsxs {
        font-size: 0.6rem;
    }

    .brand {
        flex-direction: column;
        align-items: flex-start;
    }
}