@charset "utf-8";

#sub_navi {
    position: relative;
    width: 100%;
    aspect-ratio: 1/0.4;
    max-height: 46rem;
    min-height: 40rem;
    background: #ddd;
}

#sub_navi::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.1) 70%);
}

.sub-nav-inner {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15%;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 140rem;
    width: calc(100% - 7rem);
}

.sub-nav-txt {
    overflow: hidden;
    padding: 2rem;
    margin: -2rem;
}

.sub-nav-txt .current-depth {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    color: #fff;
    padding-left: 0.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 2rem #ff9800;
}

.sub-nav-txt .sub-page-title {
    font-size: 7rem;
    font-weight: 750;
    color: #fff;
    text-shadow: 0 0 4rem #ff9800;
    animation: text-active-animation 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.sub-nav-dropdown {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.sub-nav-home-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    aspect-ratio: 1/1;
    background: #f80;
    border-radius: 50%;
}

.sub-nav-home-btn svg {
    width: 2rem;
    aspect-ratio: 1/1;
}

.sub-nav-home-btn svg path {
    stroke: #fff;
}

.sub-nav-dropdown-wrapper {
    position: relative;
    min-width: 20rem;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.sub-nav-dropdown-wrapper:before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2rem;
    transform: translateY(-50%);
    width: 1px;
    height: 1.5rem;
    background: rgba(255, 255, 255, .25);
}

.sub-nav-depth-btn {
    position: relative;
    width: 100%;
    padding: 1.5rem 4rem 1.5rem 0.25rem;
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    text-align: left;
}

.sub-nav-depth-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 1rem;
    aspect-ratio: 1/1;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(135deg) translateY(100%);
}

.sub-nav-depth-btn.open:after {
    transform: rotate(-45deg) translateY(-50%);
}

.sub-nav-dropdown-menu {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, calc(100% + 2rem));
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .1);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s linear;
}

.sub-nav-dropdown-menu a {
    display: block;
    padding: 1rem 0;
    font-size: 1.6rem;
    font-weight: 400;
    color: #444;
    text-align: left;
    transition: color 0.28s ease;
}

.sub-nav-dropdown-menu a:hover {
    font-weight: 500;
    color: #f80;
}

.sub-nav-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 100%);
}

#sub_navi .sub-nav-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#sub_navi .sub-nav-bg::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    --sub-visual-bg: url("./img/visual01.png");
    background: var(--sub-visual-bg) center center / cover no-repeat;
    animation: bg-zoom-out 1.5s 0s forwards;
}

/* #sub_navi.sub-nav-10 .sub-nav-bg::after {
    --sub-visual-bg: url("./img/visual01.webp");
}

#sub_navi.sub-nav-20 .sub-nav-bg::after {
    --sub-visual-bg: url("./img/visual02.webp");
}

#sub_navi.sub-nav-30 .sub-nav-bg::after {
    --sub-visual-bg: url("./img/visual03.webp");
}

#sub_navi.sub-nav-40 .sub-nav-bg::after {
    --sub-visual-bg: url("./img/visual04.jpg");
} */

@keyframes bg-zoom-out {
    from {
        transform: scale(1.15, 1.15);
    }

    to {
        transform: scale(1, 1);
    }
}

@keyframes text-active-animation {
    from {
        opacity: 0.3;
        filter: Alpha(opacity=0);
        transform: translateY(100%);
    }

    to {
        opacity: 1.0;
        filter: Alpha(opacity=100);
        transform: translateY(0);
    }
}

@media all and (max-width:1280px) {
    #sub_navi .sub-nav-bg::after {
        background-position-x: 60%;
    }
}

@media all and (max-width:786px) {
    .sub-nav-inner {
        width: calc(100% - 5rem);
        bottom: 4rem;
        gap: 2rem;
    }

    .sub-nav-txt {
        width: 100%;
    }

    .sub-nav-txt .current-depth {
        padding: 0;
        margin-bottom: 1rem;
    }

    .sub-nav-txt .sub-page-title {
        font-size: 5rem;
    }

    .sub-nav-dropdown {
        gap: 3rem;
    }

    .sub-nav-dropdown-wrapper {
        min-width: 16rem;
    }

    .sub-nav-dropdown-wrapper::before {
        left: -1.5rem;
    }

    .sub-nav-depth-btn {
        padding: 1.5rem 3rem 1.5rem 0.25rem;
    }

    .sub-nav-dropdown-menu {
        padding: 1.25rem 1.75rem;
    }
}

@media all and (max-width:640px) {
    #sub_navi .sub-nav-bg::after {
        background-position-x: 65%;
    }
}

@media all and (max-width:480px) {

    .sub-nav-dropdown-wrapper:first-of-type::before {
        display: none;
    }

    .sub-nav-home-btn {
        display: none;
    }

    .sub-nav-depth-btn {
        font-size: 1.7rem;
        padding: 1.5rem 2.25rem 1.5rem 0;
    }

    .sub-nav-depth-btn:after {
        right: -0.25rem;
    }
}

@media all and (max-width:414px) {
    .sub-nav-txt .sub-page-title {
        font-size: 4rem;
    }
}