@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
    /* Color variables */
    --background-color: #f4f3f2;
    --line-color: #50C6DB;
    --text-color: #000000;

    /* Slider variables */
    --button-height: 35px;
    --button-width: 35px;
    --slider-offset: 3px;
    --slider-width: calc((2 * var(--button-width)) + (2 * var(--slider-offset)));
    --slider-height: calc(var(--button-height) + (2 * var(--slider-offset)));
    --button-translation: calc(var(--slider-width) - (2 * var(--slider-offset)) - var(--button-width));

    --outer-radius: 10px;
    --inner-radius: calc(var(--outer-radius) - var(--slider-offset));
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-right: 2%;
}

/* Grid layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 240px);
    grid-template-rows: repeat(2, 240px);
    margin-top: 1%;
    gap: 25px;
    border-radius: 10px;
    justify-content: center;
    width: 100%;
    animation: fade 0.5s ease 0s 1 normal forwards;
    height: 80vh;
    align-content: center;
}

.grid-container a {
    margin: 0;
    transition: all .2s ease-in-out;
    transform: scale(1);
}

.card {
    margin: 2% 0 0 2%;
    max-width: 150px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    max-width: 250px;
    height: 150px;
    padding: 35px;
    border-radius: 10px;
    background-color: var(--background-color);
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.25);

    backdrop-filter: blur(15px);
    transition: all .2s ease-in-out;

    color: var(--text-color);
    transition: all 1s ease 0s;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    transform: scale(0);

    animation: fade 2s ease .5s 1 normal forwards;
    opacity: 0;

}

.card-footer {
    font-size: 0.65em;
}

.tags {
    font-size: small;
}

.card:hover {
    border: 2.5px solid var(--line-color);
    transform: scale(1.1);
}

#tr-title {
    font-family: 'bebas neue';
    letter-spacing: 0.5px;
}

#tr-card {
    border: 2.5px solid rgba(255, 255, 255, 0.45);

    &:hover {
        border: 2.5px solid #FF6600;
    }

}

.card-line {
    margin: 5px 0px 0px 0px;
}

.card-line-thin {
    margin: 5px 0px 0px 0px;
    border: 0.25px solid var(--text-color);
    opacity: 0.5;
}


/* Rows layout */
.rows {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;

}

.rows .card {
    display: flex;
    flex-direction: row;
    width: 80vw;
    height: 40px;
    min-height: 0px;
    padding: 10px;
    max-width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.rows hr,
.rows .tags,
.rows .card-footer,
.rows p {
    display: none;
}

#grid {
    transition: opacity .5s ease;
}

#grid.no-opacity {
    opacity: 0 !important;
    transition: opacity 1s ease-in-out;
}

/* Grid to rows switch */
.grid-switch-box {
    margin: 2% 0 0 2%;
}

/* Switch wrapper */
.switch {
    position: relative;
    display: inline-block;
    width: var(--slider-width);
    height: var(--slider-height);
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Switch slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-color: var(--text-color); */
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: var(--outer-radius);

    outline: var(--line-color) solid 2.5px;
}

.slider:before {

    font-family: "Font Awesome 6 Free";
    content: "\f0ce";
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--background-color);
    position: absolute;
    display: flex;
    font-size: larger;
    justify-content: center;
    align-items: center;
    height: var(--button-height);
    width: var(--button-width);
    left: var(--slider-offset);
    bottom: var(--slider-offset);
    background-color: var(--text-color);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: var(--inner-radius);
}

input:checked+.slider:before {
    -webkit-transform: translateX(var(--button-translation));
    -ms-transform: translateX(var(--button-translation));
    transform: translateX(var(--button-translation));
    font-family: "Font Awesome 6 Free";
    content: "\f0c9";
    font-weight: 900;
    font-size: 1.5rem;
}

@keyframes fade {
    0% {
        opacity: 0;

    }

    100% {
        opacity: 1;
    }
}

/* MOBILE STYLING */
@media only screen and (max-width: 600px) {

    * {
        -webkit-tap-highlight-color: transparent;
        overflow: initial;
    }

    .page-title {
        margin: 0;
        margin-top: 2%;
        text-align: center;
    }

    .header {
        margin-left: 2%;
    }

    .grid-container {
        gap: 40px;
        margin-top: 10%;
        height: 100%;
        padding-bottom: 5%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .grid-container a:nth-child(1),
    .grid-container a:nth-child(2),
    .grid-container a:nth-child(3),
    .grid-container a:nth-child(4) {
        translate: revert;
    }

    .card {
        width: 175px;
    }

    .card:hover {
        border: none;
        transform: scale(1);
    }

    .rows .card {
        border: 2.5px solid var(--line-color);
    }

    .rows #tr-card {
        border: 2.5px solid #FF6600;
    }
}