/* Body */
body {
    display: block;
    /* min-height: 100dvh; */
    background-image: url('../images/bg/list_bg_001n.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Header */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: var(--col-txt-dark);
    padding: 1rem 5rem;

    .head-logo {
        display: block;
        width: 180px;
        transition: all 300ms linear;

        .head-img {
            width: 100%;
            height: auto;
        }
    }

    .head-logo:hover {
        filter: drop-shadow(5px 5px 10px var(--col-pri));
    }

    .head-links {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 5rem;

        .head-link {
            display: block;
            text-decoration: none;
            font-size: 2rem;
            font-weight: bold;
            letter-spacing: 3px;
            color: var(--col-txt-light);
            transition: all 300ms linear;
        }

        .head-link:hover {
            /* color: var(--col-pri-l1); */
            filter: drop-shadow(5px 5px 10px var(--col-pri));
        }

        .head-button {
            display: block;
            text-decoration: none;
            font-size: 2rem;
            font-weight: bold;
            letter-spacing: 3px;
            color: var(--col-txt-light);
            /* background: linear-gradient(to bottom, var(--col-pri) 50%, var(--col-pri-l1) 100%); */
            border: 2px solid var(--col-txt-light);
            padding: 1rem 2rem;
            border-radius: 5px;
            transition: all 300ms linear;
        }

        .head-button:hover {
            border: 2px solid var(--col-pri);
            background-color: var(--col-pri);
        }
    }
}

/* Nav */
nav {
    background-color: var(--col-txt-dark);

    .nav-link {
        flex: 0 0 auto;
        text-decoration: none;
        font-size: 2rem;
        font-weight: bold;
        color: var(--col-txt-light);
        transition: all 300ms linear;
    }

    .nav-link:hover {
        filter: drop-shadow(5px 5px 10px var(--col-pri-l2));
    }
}

.nav-full {
    max-width: 100dvw;
    max-height: 100dvh;
}

/* Footer */
footer {
    display: block;
    width: 100%;
    z-index: 10;
    background-color: var(--col-pri);
    padding: 1rem;

    .footer-links {
        display: flex;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 3rem;

        .footer-link {
            display: block;
            text-decoration: none;
            font-size: 1.8rem;
            letter-spacing: 3px;
            color: var(--col-txt-light);
        }

        .footer-link:hover {
            color: var(--col-pri-l2);
            filter: drop-shadow(5px 5px 10px var(--col-pri-l2));
        }
    }
}

/* Main */
main {
    display: block;
    min-height: 100dvh;
}

/* Company list */
.comp-list {
    display: flex;
    flex-direction: column;

    .comp-item {
        position: relative;
        display: grid;
        /* flex-direction: row;
        flex-wrap: wrap; */
        width: 100%;
        background-color: var(--col-txt-light);
        border-radius: 5px;
        padding: 1rem 2rem;

        .comp-logo {
            display: block;
            object-fit: contain;
            object-position: center center;
            background-color: var(--col-txt-light);
            border: 1px solid var(--col-txt-dark);
            border-radius: 5px;
            overflow: hidden;
            padding: 5px;
        }

        .comp-blk {
            display: flex;

            .comp-entry {
                display: block;
                width: fit-content;
            }
        }

        .comp-info {
            flex-direction: column;
            gap: 1rem;
            justify-content: space-between;

            .comp-name {
                width: 100%;
                font-size: 2.2rem;
                font-weight: bold;
                overflow-wrap: break-word;
                /* word-wrap: break-word; */
            }

            .camp-addition {
                display: block;
                width: 100%;
                font-size: 1.8rem;
            }

            .comp-addr-txt {
                display: block;
                width: 100%;
                font-size: 1.8rem;
            }
        }

        .comp-addr {
            flex-direction: column;
            font-size: 1.8rem;
            justify-content: space-around;
        }

        .comp-contact {
            font-size: 1.6rem;
        }

        .comp-icon {
            position: absolute;
            display: block;
            width: 20px;
            height: 20px;
            opacity: 0.5;
        }
    }

    .comp-item-top {
        border: 1px solid var(--col-sec);
        background-color: var(--col-sec-l1);
    }

    .comp-item-top::after {
        content: "Top";
        position: absolute;
        left: 5px;
        top: 0;
        color: var(--col-sec-l1);
        border: 1px solid var(--col-sec);
        background-color: var(--col-sec);
        transform: translateY(-100%);
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        font-size: 1.4rem;
        padding: 0.2rem 1rem;
        text-transform: uppercase;
        font-weight: bold;
    }
}

/* News box */
.news-box {

    .news-box-inner {
        display: block;
        width: 100%;
        height: 100%;
        position: relative;

        .news-card {
            display: block;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: 0;
            transition: opacity 500ms ease-in-out;

            .news-card-inner {
                position: relative;
                display: flex;
                width: 100%;
                height: 100%;
                background-color: var(--col-txt-light);
                border: 1px solid var(--col-pri-l2);
                border-radius: 5px;
                gap: 2rem;
                overflow: hidden;
                justify-content: space-between;
                align-items: center;
                padding-bottom: 2.5rem;

                .news-pic {
                    width: 100%;
                    height: auto;
                    min-height: 220px;
                }

                .news-title {
                    width: 100%;
                    font-weight: bold;
                    /* font-size: 2rem; */
                }

                .news-content {
                    flex: 1 0 auto;
                    width: 100%;
                    font-size: 1.8rem;
                    overflow: hidden;
                }

                .news-link {
                    text-decoration: none;
                    font-size: 2rem;
                    font-weight: bold;
                    letter-spacing: 3px;
                    color: var(--col-txt-dark);
                    border: 2px solid var(--col-txt-dark);
                    padding: 1rem 2rem;
                    border-radius: 5px;
                    transition: all 300ms linear;
                    width: fit-content;
                }

                .news-link:hover {
                    border: 2px solid var(--col-pri);
                    background-color: var(--col-pri);
                }

                .news-pudate {
                    width: 100%;
                    color: var(--col-txt-dark);
                    font-size: 1.8rem;
                    padding: 1rem;
                }

                .news-logo {
                    position: absolute;
                }
            }
        }

        .news-card-active {
            opacity: 1;
            transition: opacity 500ms ease-in-out;
        }
    }
}

@media screen and (min-width: 851px) {
    .head-logo {
        width: 180px;
    }

    .menu-button {
        display: none;
    }

    .head-links {
        display: flex;
    }

    nav {
        display: none;
    }

    main {
        padding: 5rem 3rem;
        margin-right: 350px;
    }

    .comp-list {
        width: calc(100dvw - 400px);
        max-width: 790px;
        gap: 4rem;
        margin: 0 auto;

        .comp-item {
            grid-template-columns: 105px 1fr;
            grid-template-rows: auto 3rem;
            gap: 1.5rem;

            .comp-logo {
                width: 100px;
                height: 100px;
            }

            .comp-contact {
                grid-row: 2;
                grid-column: 1 / span 2;
                flex-direction: row;
                font-size: 1.6rem;
                justify-content: space-around;
                align-items: center;
                width: 100%;
            }

            .comp-icon {
                top: 2rem;
                right: 2rem;
            }
        }
    }

    .news-box {
        display: block;
        position: fixed;
        height: calc(100dvh - 150px);
        max-height: 760px;
        width: 300px;
        top: 75px;
        right: 15px;

        .news-box-inner {
            display: block;
            width: 100%;
            height: 100%;
            position: relative;

            .news-card {
                display: block;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                position: absolute;
                opacity: 0;
                transition: opacity 500ms ease-in-out;

                .news-card-inner {
                    position: relative;
                    display: flex;
                    flex-direction: column;
                    width: 100%;
                    height: 100%;
                    background-color: var(--col-txt-light);
                    border: 1px solid var(--col-pri-l2);
                    border-radius: 5px;
                    gap: 2rem;
                    overflow: hidden;
                    justify-content: space-between;
                    align-items: center;
                    padding-bottom: 2.5rem;

                    .news-pic {
                        display: block;
                        width: 100%;
                        height: auto;
                        min-height: 220px;
                    }

                    .news-title {
                        display: block;
                        width: 100%;
                        font-weight: bold;
                        font-size: 2rem;
                        padding: 0 2rem;
                    }

                    .news-content {
                        flex: 1 0 auto;
                        display: block;
                        width: 100%;
                        font-size: 1.8rem;
                        padding: 0 2rem;
                        overflow: hidden;
                    }

                    .news-link {
                        display: inline-block;
                        text-decoration: none;
                        font-size: 2rem;
                        font-weight: bold;
                        letter-spacing: 3px;
                        color: var(--col-txt-dark);
                        /* background: linear-gradient(to bottom, var(--col-pri) 50%, var(--col-pri-l1) 100%); */
                        border: 2px solid var(--col-txt-dark);
                        padding: 1rem 2rem;
                        border-radius: 5px;
                        transition: all 300ms linear;
                        width: fit-content;
                    }

                    .news-link:hover {
                        border: 2px solid var(--col-pri);
                        background-color: var(--col-pri);
                    }

                    .news-pudate {
                        display: block;
                        width: 100%;
                        color: var(--col-txt-dark);
                        font-size: 1.8rem;
                        padding: 1rem;
                    }

                    .news-logo {
                        display: block;
                        position: absolute;
                        top: 2rem;
                        right: 2rem;
                    }
                }
            }

            .news-card-active {
                opacity: 1;
                transition: opacity 500ms ease-in-out;
            }
        }
    }
}

@media screen and (max-width: 850px) and (min-width: 501px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10;
    }

    .head-logo {
        width: 180px;
    }

    .menu-button {
        display: block;
    }

    .head-links {
        display: none;
    }

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        max-height: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 4rem;
        z-index: 10;
        overflow: hidden;
        transition: max-height 300ms ease-in-out;

        .nav-link {
            padding: 1rem;
        }
    }

    .nav-full {
        transition: max-height 300ms ease-in-out;
    }

    footer {
        position: fixed;
        bottom: 0;
        left: 0;
    }

    main {
        width: 100%;
        padding: 12rem 3rem 13rem 3rem;
    }

    .comp-list {
        width: 100%;
        gap: 4rem;

        .comp-item {
            grid-template-columns: auto 1fr;
            grid-template-rows: auto auto;
            gap: 1.5rem;
            overflow: hidden;

            .comp-logo {
                width: 10dvw;
                min-width: 60px;
                max-width: 100px;
                aspect-ratio: 1;
            }

            .comp-contact {
                grid-row: 2;
                grid-column: 2;
                flex-direction: column;
                font-size: 1.6rem;
                justify-content: flex-start;
                width: 100%;
            }

            .comp-icon {
                top: 0.5rem;
                right: 0.5rem;
            }
        }
    }

    .news-box {
        display: block;
        position: fixed;
        bottom: 45px;
        left: 0;
        width: 100%;
        height: 60px;

        .news-box-inner {
            .news-card {
                .news-card-inner {
                    flex-direction: row;

                    padding-left: 40px;
                    .news-pic {
                        display: none;
                    }

                    .news-title {
                        display: block;
                        width: 100%;
                        font-weight: bold;
                        font-size: 1.6rem;
                        padding: 0 1rem;

                    }

                    .news-content {
                        display: none;
                    }

                    .news-pudate {
                        display: none;
                    }

                    .news-logo {
                        display: block;
                        position: absolute;
                        top: 50%;
                        left: 10px;
                        transform: translateY(-50%);
                        width: 25px;
                        height: 25px;
                    }

                    .news-link {
                        display: none;
                    }
                }
            }
        }
    }
}

@media screen and (max-width: 500px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10;
    }

    .head-logo {
        width: 150px;
    }

    .menu-button {
        display: block;
    }

    .head-links {
        display: none;
    }

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        max-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 10;
        overflow: hidden;
        transition: max-height 300ms ease-in-out;

        .nav-link {
            padding: 2rem;
        }
    }

    .nav-full {
        transition: max-height 300ms ease-in-out;
    }

    .footer-link {
        font-size: 1.6rem!important;
    }

    footer {
        position: fixed;
        bottom: 0;
        left: 0;
    }

    main {
        width: 100%;
        padding: 12rem 3rem 13rem 3rem;
    }

    .comp-list {
        width: 100%;
        gap: 4rem;

        .comp-item {
            grid-template-rows: auto auto auto;
            gap: 1.5rem;
            overflow: hidden;

            .comp-logo {
                width: 100px;
                aspect-ratio: 1;
            }

            .comp-contact {
                flex-direction: column;
                font-size: 1.6rem;
                justify-content: flex-start;
                width: 100%;
            }

            .comp-icon {
                top: 0.5rem;
                right: 0.5rem;
            }
        }
    }

    .news-box {
        display: block;
        position: fixed;
        bottom: 45px;
        left: 0;
        width: 100%;
        height: 60px;

        .news-box-inner {
            .news-card {
                .news-card-inner {
                    flex-direction: row;

                    padding-left: 40px;
                    .news-pic {
                        display: none;
                    }

                    .news-title {
                        display: block;
                        width: 100%;
                        font-weight: bold;
                        font-size: 1.6rem;
                        padding: 0 1rem;

                    }

                    .news-content {
                        display: none;
                    }

                    .news-pudate {
                        display: none;
                    }

                    .news-logo {
                        display: block;
                        position: absolute;
                        top: 50%;
                        left: 10px;
                        transform: translateY(-50%);
                        width: 25px;
                        height: 25px;
                    }

                    .news-link {
                        display: none;
                    }
                }
            }
        }
    }
}
