
* {
    margin: 0;
    padding: 0;
    font-family: var(--primary-font);
    color: var(--secondary-color);
}

h1 {
    font-size: 24px;
    font-weight: 300;
}

h2 {
    font-size: 24px;
    font-weight: 600;
}

h3  {
    font-size: 16px;
    font-weight: 600;
}

h4 {
    font-weight: 300;
}

a {
    text-decoration: none;
    transition: 0.3s ease, color 0.3s ease;
}

.container {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}


header {
    z-index: 1;
    /* background-color: var(--background-color); */
    box-shadow: 2px 0 3px rgba(0, 0, 0, .5);
    height: 70px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;

    .header-box {
        width: 1200px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    h4 {
        transition: 0.3s ease, color 0.3s ease;
    }

    a:hover {
        color: var(--hover-color);
    }

    h4:hover {
        color: var(--hover-color);
    }
}

section {
    z-index: 1;
    width: 100%;
}

#slider {
    z-index: 2;
    position: fixed;
    background-color: var(--background-color);
    box-shadow: 2px 2px 3px rgba(0, 0, 0, .5);
    height: 120px;
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

#filter {
    z-index: 2;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    .search-box{
        position: relative;
        padding-bottom: 25px;
        #search-input{
            width: 500px;
            height: 20px;
            border-radius: 25px;
            border: 2px solid var(--background-color); 
            padding: 5px 10px;
            font-size: 14px;
        }
        #search-input:focus {
            border: 2px solid var(--hover-color);
            outline: none; 
        }
        #search-results{
            margin-top: 5px;
            width: 99%;
            position: absolute;
            background-color: white;
            border: 1px solid var(--background-color);
            padding-bottom: 20px;
            border-radius: 10px;
            box-shadow: 2px 2px 5px rgba(0, 0, 0, .5);
            max-height: 500px;
            overflow-y: scroll;
            opacity: 0;
            transform: translateY(-20px);
            transition: 0.3s ease;
            .result-item {
                margin-top: 10px;
                height: 60px;
                width: 100%;
                display: flex;
                transition: 0.3s ease;
                .item-icon-search {
                    margin-right: 10px;
                    margin-left: 10px;
                    background-color: var(--background-color);
                    border-radius: 3px;
                    height: 60px;
                    width: 60px;
                    min-width: 60px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    img {
                        height: 40px;
                        width: 40px;
                        transition: 0.3s ;
                    }
                }
                .item-icon-search:hover {
                    img {
                        width: 45px;
                        height: 45px;
                    }
                }
                h3 {
                    color: var(--secondary-color);
                }
                h3:hover {
                    color: var(--hover-color-content);
                }
            }
            .result-item:hover{
                background-color: var(--main-color);
            }
        }
        #search-results.active{
            opacity: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            transform: translateY(0px);
        }
    }

    button {
        border-radius: 20px;
        font-size: 14px;
        height: 35px;
        padding: 0px 10px;
        color: var(--secondary-color);
        border: solid 1px var(--secondary-color);
        transition: 0.3s ease, color 0.3s ease;
        margin-right: 10px;
    }
    button:hover {
        color: white;
        background-color: var(--hover-color-content);
    }
    .active {
        background-color: var(--select-color);
        color: var(--main-color);
    };
}


#content {
    margin-top: 120px;
    .group-container {
        border-radius: 5px;
        transition: 0.5s ease;
        width: 100%;
        margin-top: 30px;
        margin-bottom: 30px;
        padding-bottom: 16px;
        transform: translateY(-30px);
        animation: fadeIn 0.5s forwards;
        opacity: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;

        h2 {
            text-align: center;
            padding-bottom: 5px;
        }
        .group-container-items {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            margin-top: 20px;
            justify-items: center;
            box-sizing: border-box;
    
            .item {
                width: 350px;
                align-items: center;
                margin-bottom: 16px;

                .item-icon {
                    width: 80px;
                    height: 80px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    background-color: var(--background-color);
                    box-shadow: 2px 1px 5px rgba(0, 0, 0, .5);
                    border-top-left-radius: 3px;
                    border-bottom-left-radius: 3px;
                }
                .item-content{
                    padding: 0 5px;
                    width: 280px;
                    height: 80px;
                    background-color: var(--primary-color);
                    box-shadow: 2px 1px 5px rgba(0, 0, 0, .5);
                    border-top-right-radius: 3px;
                    border-bottom-right-radius: 3px;
                } 
                img {
                    width: 50px;
                    height: 50px;
                    transition: 0.2s ease;
                }

                .item-icon:hover {
                    img {
                        width: 55px;
                        height: 55px;
                    }
                }
    
                h3 {
                    height: 25px;
                    display: flex;
                    align-items: center;
                    color: var(--secondary-color);

                    a {
                        color: var(--secondary-color);
                    }

                    a:hover {
                        color: var(--hover-color-content);
                    }
                }
    
                .item-description {
                    p {
                        font-size: 14px;
                    }
                }
            }

            .item:hover {
                size: 200%;
            }
        }
    }
}

footer {
    text-align: center;
    padding-bottom: 30px;

    a:hover {
        color: var(--hover-color);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0px);
    }
}

/* Adaptive */
@media (max-width: 1300px) {
    #filter {
        .search-box {
            padding-bottom: 10px;
            padding-top: 10px;
        }
        .filter-box {
           display: flex;
           justify-content: center;
           width: 90%;
        }
    }
}

@media (max-width: 1200px) {
    body {
        overflow-x: hidden; /* Disable horizontal scroll */
    }
    #canvas {
        display: none;
    }
    #content {
        .group-container {
            .group-container-items {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    }
    #slider {
        width: 100%;
    }

    #filter {
        .filter-box {
           width: auto;
        }
    }
}

@media (max-width: 992px) {
    #filter {
        flex-direction: row;
        justify-content: flex-start;
        .search-box {
            display: none;
        }
        .filter-box {
            height: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
        }

    }
    .container {
        width: 700px;
    }
    header {
        .header-box {
            width: 700px;
        }
    }

    #content {
        .group-container {
            .group-container-items {
                grid-template-columns: repeat(2, 1fr);
                .item {
                    width: 330px;
                    .item-content {
                        width: 240px;
                    }
                    h3 {
                        font-size: 14px;
                    }
                    .item-description {
                        p {
                            font-size: 12px;
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    header {
        .header-box{
            h4 {
                display: none
            }
        }
    }
    .container {
        width: 550px;
    }
    header {
        .header-box {
            width: 550px;
            justify-content: space-around;
        }
    }
    #content{
        margin-top: 150px;
        .group-container {
            animation: none;
            opacity: 1;
            .group-container-items {
                grid-template-columns: repeat(2, 1fr);
                .item {
                    width: 220px;
                    .item-icon {
                        height: 90px;
                    }
                    .item-content {
                        width: 180px;
                        height: 90px;
                    }
                    h3 {
                        font-size: 14px;
                    }
                    .item-description {
                        p {
                            font-size: 12px;
                        }
                    }
                }
            }
        }
    }
    footer {
        h4 {
            font-size: 12px;
            padding-bottom: 20px;
        }
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
    }
    header {
        .header-box {
            width: 100%;
        }
    }
    #filter {
        overflow-x: scroll;
        height: 70px;
        .filter-box {
            flex-wrap: nowrap;
            justify-content: flex-start;
        }
        button {
            margin-right: 5px;
            margin-left: 5px;
            height: 40px;
        }
    }
    #content {
        margin-top: 100px;
        .group-container{
            .group-container-items {
                flex-wrap: wrap;
                display: flex;
                justify-content: space-evenly;
                .item {
                    flex-direction: column;
                    width: 160px;
                    .item-icon {
                        height: 90px;
                    }
                    .item-icon {
                        width: 160px;
                        border-radius: 0px;
                        border-top-left-radius: 3px;
                        border-top-right-radius: 3px;
                    }
                    .item-content {
                        border-radius: 0px;
                        border-bottom-left-radius: 3px;
                        border-bottom-right-radius: 3px;
                        width: 160px;
                        height: 90px;
                        padding: 0px
                    }
                    h3 {
                        height: 24px;
                        font-size: 14px;
                        display: flex;
                        justify-content: center;
                    }
                    .item-description {
                        padding: 0 5px;
                        p {
                            font-size: 12px;
                        }
                    }
                }
            }
        }
    }
    #slider {
        width: 100%;
        height: 70px;
    }
}

