@font-face {
    font-family: 'Arvo';
    src: url('public/fonts/Arvo.woff2') format('truetype');
}

@font-face {
    font-family: 'AlbertSans';
    src: url('public/fonts/AlbertSans.woff2') format('truetype');
}

:root {
    --background-color: #202634;
    --button-color: #283044;
    --button-hover-color: #41495977;
    --button-pressed-color: #414959;
    --darker-button-color: #131925;
    --text-color: #FFFAFF;
    --sidebar-color: #283044;
    --box-shadow-color: #1b1f24;
    --filter-val: 100%;
    --nav-background: #00000080;
}

.light-theme {
    --background-color: #FFFFFF;
    --button-color: #F0F0F0;
    --button-hover-color: #E5E5E577;
    --button-pressed-color: #E5E5E5;
    --darker-button-color: #D9D9D9;
    --text-color: #000000;
    --sidebar-color: #F0F0F0;
    --box-shadow-color: #C2C2C2;
    --filter-val: 0%;
    --nav-background: #FFFFFF80;
}

* {
    font-family: 'Arvo', serif;
    color: var(--text-color);
    transition: color 0.5s ease-in-out;
    font-size: calc(0.4vw + 0.5vh);
}

p {
    font-family: 'AlbertSans', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-color: var(--text-color) var(--background-color);
    transition: scrollbar-color ease-in-out 0.5s;

    body {
        margin: 0;
        display: flex;
        flex-direction: row;
        background-color: var(--background-color);
        transition: background-color 0.5s ease-in-out;
    }
}

a {
    transition: none;
}

.top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    #switch {
        color: inherit;
        position: absolute;
        font-size: 4rem;
        right: 3vw;
        border: none;
        background-color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}

.sidebar {
    display: flex;
    position: fixed;
    flex-direction: column;
    width: 20vw;
    height: 100%;
    gap: 4%;
    background-color: var(--sidebar-color);
    box-shadow: 0 0px 1rem black;
    transition: background-color 0.5s ease-in-out;

    h1 {
        gap: 1vw;
        padding: 2vw;
        padding-bottom: 0;
        text-align: left;
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .sidebarButtons {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;

        button {
            display: flex;
            justify-content: left;
            align-items: center;
            padding-left: 1vw;
            width: 17vw;
            height: 6vh;
            cursor: pointer;
            font-size: 1.7rem;
            background-color: var(--button-color);
            border: none;
            border-radius: 1rem;
            color: inherit;
            transition: background-color 0.5s ease-in-out;
            text-indent: 1rem;

            &:hover {
                background-color: var(--button-hover-color);
            }
        }

        a {
            display: flex;
            align-items: center;
            justify-content: left;
            text-decoration: none;
        }
    }

    .lineBetween {
        background-color: var(--button-hover-color);
        margin-top: .3vh;
        margin-bottom: .3vh;
        width: 65%;
    }
}

.active {
    background-color: var(--button-pressed-color) !important;
}

.icon {
    width: 2.5rem;
    height: 2.5rem;
    filter: invert(var(--filter-val));
    transition: filter 0.5s ease-in-out;

    &.theme-toggle {
        width: 3.5rem;
        height: 3.5rem;
    }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin-left: 20vw;

    h1 {
        font-size: 4rem;
        text-align: center;
    }

    .content {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        margin: 1vh 5vw;
    }

    #newsDiv {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        margin-top: 3vh;
        min-height: 100vh;
    }
}

.news {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    transition: scale 0.3s ease-in-out;
    z-index: 10;

    &,
    .newsInfo {
        opacity: 0;
        transform: translateY(100%);
        display: flex;
    }

    &:hover {
        scale: 1.1;
    }

    a {
        display: block;
        font-size: 1.8rem;
        text-align: left;
        width: 35vw;
        font-weight: 900;
        color: inherit;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }

    img {
        margin-right: 1.5vw;
        width: 18rem;
        height: 11rem;
        border-radius: 0.5rem;
        box-shadow: 7px 7px 7px var(--box-shadow-color);
        transition: box-shadow 0.5s ease-in-out;
    }

    .description {
        display: inline-block;
        width: 30vw;
        visibility: hidden;
        margin-bottom: 0;
        font-size: 1.2rem;
    }
}

.newsInfo {
    display: flex;
    align-items: center;
    justify-content: left;
    flex-direction: row;
    gap: 10%;

    * {
        font-size: 1rem;
    }

    p {
        margin-bottom: 0;
    }
}

.lineBetween {
    width: 60%;
    height: 0.15vh;
    background-color: var(--button-color);
    border-radius: 10px;
    margin: 1.5vh 0;
    transition: background-color 0.5s ease-in-out;
}

.animate {
    animation: fadeIn 0.35s ease-out forwards;
}

@keyframes fadeIn {
    0% {
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0%);
    }
}

.text-animation {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    animation: typing 1s steps(30, end);
    visibility: visible !important;
}

@keyframes typing {
    0% {
        width: 0vw;
    }

    100% {
        width: 30vw;
    }
}

#sidebarSwitch {
    display: none;
    cursor: pointer;
    background-color: transparent;
}

#hideSwitch {
    position: fixed;
    background-color: var(--sidebar-color);
    border-radius: 0 1rem 1rem 0;
    padding: 15px;
    font-size: 2rem;
    margin-left: 20vw;
    top: 1.5rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.5s ease-in-out;
    box-shadow: 5px -5px 7px -2px #00000061, 5px 5px 7px -2px #00000061;

    &>.hideSwitchObj {
        pointer-events: none;
        width: 100%;
        height: 100%;
        display: block;
        color: var(--text-color);
        transition: color 0.5s ease-in-out;
    }

    @media screen and (orientation: portrait) {
        display: none;
    }
}

footer {
    padding: 1vh 0;
}

@media screen and (orientation: portrait) {
    .sidebar {
        z-index: 110;
        width: 70%;
        transform: translateX(-100%);

        .sidebarButtons {
            margin-top: 15vh;

            a,
            button {
                width: 80%;
                font-size: 2.5rem;
                text-align: center;
                padding-left: 9vw;
                text-indent: 2rem;
            }
        }

        h2 {
            font-size: 2.5rem;
            text-align: left;
            width: 80%;
            padding-left: 18vw;
        }

        h1 {
            display: none;
        }
    }

    .description {
        width: 50vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    html {
        font-size: calc(0.7vw + 0.5vh);
    }

    .top {
        position: fixed;
        top: 0;
        z-index: 110;
        height: 10rem;
        width: 100%;
        transition: background-color 0.35s ease-in-out;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .container {
        margin-left: 0;
    }

    #sidebarSwitch {
        display: flex;
        position: absolute;
        left: 3vw;
        border: none;
    }

    .news a {
        width: 46vw;
        font-size: 1.5rem;
    }

    .news img {
        margin-right: 4vw;
    }

    .content {
        width: 83%;
        height: auto !important;
    }

    .lineBetween {
        width: 70%;
    }

    .button {
        width: 23vw;
    }

    .top .icon {
        height: 4rem;
        width: 4rem;
        transition: filter 0.35s ease-in-out;
    }

    #newsDiv {
        margin-top: 10vh !important;
    }

    @keyframes appear {
        0% {
            display: flex;
            opacity: 0;
        }

        100% {
            display: flex;
            opacity: 1;
        }
    }

    @keyframes disappear {
        0% {
            opacity: 1;
        }

        99% {
            opacity: 0;
        }

        100% {
            display: none;
        }
    }
}

@media screen and (max-width: 500px) {
    .newsInfo {
        justify-content: space-between;
    }

    .button {
        height: 5vh;
        font-size: 2rem;
    }
}