*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Comfortaa";
    font-weight: 700;
    user-select: none;
}

:root {
    --hue: 200;
    --colorLight: hsl(var(--hue), 100%, 87%);
    --colorQuiteLight: hsl(var(--hue), 100%, 80%);
    --color: hsl(var(--hue), 100%, 64%);
    --colorDark: hsl(var(--hue), 100%, 38%);
    --colorQuiteDark: hsl(var(--hue), 100%, 30%);
    --colorVeryDark: hsl(var(--hue), 100%, 15%);
    --borderRadiuses: 1rem;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6em;
}


body {
    width: 100%;
    overflow-y: scroll;

}

.header {
    position: fixed;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1rem;
    width: 100%;
    height: 10vh;
    font-size: 1.8vw;
    z-index: 2;
    background: linear-gradient(45deg, var(--color), var(--colorQuiteLight));
    transition: all 0.3s ease-in-out;
}

.logo {
    height: 8vh;
    filter: hue-rotate(calc(var(--hue)* 1deg));
    cursor: pointer;
}

.header h1 {
    font-size: 1rem;
    flex: 1;
    color: var(--colorVeryDark);
    max-width: 15rem;

}

.spacer {
    flex: 1;
}

.rightSideBtn {
    display: flex;
    gap: 1rem;
}


.main-part {
    padding: 8rem 1rem 0;
}

.lexicon {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.letterHeader {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4rem;
    font-size: 3rem;
    background: #83c2ff;
    border-radius: 2rem 2rem 0 0;
    width: 8rem;
    padding-top: 0.5rem;
    box-shadow: inset 0 -10px 10px #0002;
}

.letters {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 1em;
    padding-top: 1em;
    padding-bottom: 1em;
}

.letter {
    background: #DDDDDD;
    border-radius: 1vh;
    font-size: 1.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 5vh;
    aspect-ratio: 1;

    transition: all 0.3s ease-in-out;
    user-select: none;
    text-decoration: none;
    color: black;
    opacity: 1;
}


.letter:hover{
    background: dodgerBlue;
    cursor: pointer;
}

.letter.empty{
    background: #DDDDDD;
    opacity: 0.3;
    cursor:default;
}


.entryLegend {
    display: flex;
    gap: 1rem;
    width: 80%;
    flex-wrap: wrap;
    justify-content: center;
}

.legendBadge {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.legendBadge img {
    height: 3vh;
}

.legendBadge p {
    color: white;
}

.legendBadge:not(.shown){
    background-color: #8888;
}

.entries {
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease-in-out;
    width: 80%;
    width: 80%;

}

.category {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2em;
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid #EEE;
    box-shadow: 0 20px 30px #0003;
    margin-bottom: 5rem;
}

.entry {

    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
    background-color: #f5f5f5;
    border-radius: 1em;
    border: none;
    font-size: 1rem;
    box-shadow: inset 0 0 30px #0003;
}

.entry p {
    user-select: text;
    text-align: justify;
    flex: 1;
    font-size: 0.8rem;
    white-space: pre-line;
}

.entry a:not(.searchMoreLink){
    color: inherit;
    text-decoration: black underline dotted;
    text-underline-offset: 3px;
}

.entry-icon-bg{
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    width: 2.5rem;
    aspect-ratio: 1;
    border-radius: 0.8rem;
}

.intBG{
    background: fuchsia;
}

.infBG{
    background: skyblue;
}

.bizBG{
    background: chartreuse;
}

.matBG{
    background: sandybrown;
}


.entry-icon {
    height: 1.5rem;
    width: auto;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.int {
    background-color: #b524b5;
}

.mat {
    background-color: #d14118;
}

.inf {
    background-color: #3064d1;
}

.biz {
    background-color: #25c125;
}

.entry .-int {
    color: #A4A;
}

.entry .-mat {
    color: #A44;
}

.entry .-inf {
    color: #44A;
}

.entry .-biz {
    color: #4A4;
}

.entry-imgs{
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/1;
    border-radius: 1rem;
    cursor: pointer;
}

.entry-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 20px #0006;
    transition: all 0.3s ease-in-out;
}

.titleCard{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 1.5rem;
    transition: all 0.3s ease-in-out;
    opacity: 0.9;
    text-align: center;
    letter-spacing: 3px;
}

.entry-imgs:hover .titleCard{
    translate: 0 -100%;
    opacity: 0;
}



.searchMoreLink{
    text-decoration: none;
    color: black;
    font-size: 0.7rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #0003;
    align-self: end;
    width: fit-content;
    position: relative;
    isolation: isolate;
}

.searchMoreLink:hover{
    
    background: #0005;
}

.searchMoreImg{
    position: absolute;
    width: 5rem;
    left: -13%;
    top: 50%;
    translate: -50% -50%;
    scale: 0.3;
    transition: all 0.2s ease-in-out;
    opacity: 0;
}

.searchMoreLink:hover .searchMoreImg{
    opacity: 1;
}

.entryInfoContainer{
    display: none;
}

ul,
ol {
    padding-left: 2em;
}

.topBtn {
    bottom: 6vh;
    position: fixed;
    background-color: #83c2ff;
    background-image: url(img/icons/top.png);
    background-size: 55%;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    right: 6vh;
    width: 10vh;
    height: 10vh;
    border-radius: 2rem;
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.topBtn:hover {
    background-color: dodgerblue;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2em;
    z-index: 2;

    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.modal-block{
    width: 100%;
    height: 100%;
    background-color: #FFF9;
    position: absolute;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px);
}

.modal-title {
    font-size: 1.5rem;
    z-index: 1;
}

.modal-img {
    height: 60vh;
    border-radius: 2vh;
    z-index: 1;
    box-shadow: 0 0 30px #0008;
}

.modal-button {
    border: none;
    font-size: 2rem;
    cursor: pointer;
    top: 6vh;
    position: fixed;
    background-color: #83c2ff;
    background-image: url(img/icons/close.png);
    background-size: 55%;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    right: 6vh;
    width: 10vh;
    height: 10vh;
    border-radius: 2rem;
    transition: all 0.2s ease-in-out;
}

.modal-button:hover {
    background-color: dodgerblue;
}


@keyframes fadein {
    0% {
        opacity: 0%;
    }

    99% {
        opacity: 100%;
    }

    100% {
        display: grid;
    }
}

@media (width <= 1500px) {
    .entries{
        width: 95%;
    }
    .category {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2em;
        padding: 2rem;
        border-radius: 2rem;
        border: 2px solid #EEE;
        box-shadow: 0 20px 30px #0003;
        margin-bottom: 5rem;
    }

    .topBtn{
        bottom: 2vh;
        right: 2vh;
        width: 8vh;
        height: 8vh;
    }

    
}

@media (width <= 1000px) {
    .category {
        
        grid-template-columns: 1fr 1fr;
        
    }
}

@media (width <= 600px) {
    .category {
        
        grid-template-columns: 1fr;
        
    }

    .legendBadge{
        width: 100%;
    }
}