@charset "utf-8";

:root {
    --mc: #016EFF;
    --mc2: #005DD8;
}

.capsule {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 200rem;
    width: 94vw;
    min-height: 42rem;
    margin: 3rem auto 0;
    padding: 22rem 0 6rem;
    background: linear-gradient(325deg, var(--mc), var(--mc2));
    background-size: 250% 250%;
    animation: gradient-flow 6s ease infinite;
    overflow: hidden;
    -webkit-mask-image: url('./img/capsule_shape.svg');
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-image: url('./img/capsule_shape.svg');
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
}

/* 코발트 → 딥 코발트 */
.capsule.sub-nav-20 {
    background: linear-gradient(325deg, #2563eb, #244cd2);
    background-size: 250% 250%;
}

/* 브라이트 블루 → 일렉트릭 블루 */
.capsule.sub-nav-30 {
    background: linear-gradient(325deg, #1472e4, #0f63ec);
    background-size: 250% 250%;
}

/* 스카이 → 스카이 딥 */
.capsule.sub-nav-40 {
    background: linear-gradient(325deg, #0057cf, #0084d0);
    background-size: 250% 250%;
}

/* 미드 인디고 → 인디고 */
.capsule.sub-nav-50 {
    background: linear-gradient(325deg, #4338ca, #4f46e5);
    background-size: 250% 250%;
}

.capsule::after {
    content: '';
    position: absolute;
    right: 10%;
    bottom: 10%;
    z-index: -1;
    width: 14%;
    min-width: 5rem;
    aspect-ratio: 1/0.4;
    background: url("./img/school_fish1.svg") center top/contain no-repeat;
    mix-blend-mode: multiply;
}

.capsule::before {
    content: '';
    position: absolute;
    right: 5%;
    bottom: 0;
    z-index: -1;
    width: 7rem;
    aspect-ratio: 1/3;
    background: url("./img/coral_right_waterdrop.png") center top/contain no-repeat;
    opacity: 0.7;
    mix-blend-mode: color-dodge;
    animation: capsule-floating 4s linear infinite alternate;
}

@keyframes capsule-floating {
    0% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-1.2rem);
    }

    50% {
        transform: translateY(-2rem);
    }

    75% {
        transform: translateY(-1.3rem);
    }

    100% {
        transform: translateY(0);
    }
}

.capsule #sub-nav-path,
.capsule .sub-nav-container {
    position: relative;
    max-width: 130rem;
    width: 85%;
    margin: 0 auto;
}

.capsule #sub-nav-path {
    display: flex;
    align-items: center;
    opacity: 0.85;
}

.capsule #sub-nav-path a {
    display: block;

    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
}

.capsule #sub-nav-path a:first-child {

    width: 2.2rem;
    aspect-ratio: 1/1;
}

.capsule #sub-nav-path a svg {
    width: 100%;
    height: 100%;
}

.capsule #sub-nav-path a:first-child {
    font-size: 0;
    background: url('../img/breadcrumb_home.svg') left center/1.6rem no-repeat;
}

.capsule #sub-nav-path a:not(:first-child)::before {
    content: '/';
    display: inline-block;
    margin: 0 1rem;
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
}

.capsule .sub-nav-container {
    display: flex;
    align-items: flex-end;
    gap: 5rem;
    margin-top: 3rem;
    overflow: hidden;
    will-change: transform, opacity;
}

.capsule .sub-nav-container h1 {
    flex-shrink: 0;
    font-size: 7rem;
    font-weight: 800;
    color: #fff;
    word-break: keep-all;
}

.capsule .sub-nav-container .sub-nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
    padding-right: 2rem;
    margin-left: -1rem;
    overflow-x: auto;
    mask: linear-gradient(to right, transparent 0%, black 1rem, black calc(100% - 1rem), transparent 100%);
    -webkit-mask: linear-gradient(to right, transparent 0%, black 1rem, black calc(100% - 1rem), transparent 100%);
}

.capsule .sub-nav-container .sub-nav-list::-webkit-scrollbar {
    display: none;
}

.capsule .sub-nav-container .sub-nav-list li a {
    display: block;
    padding: 1rem 0.5rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.9;
    white-space: nowrap;
    user-select: none;
}

.capsule .sub-nav-container .sub-nav-list li a:focus-visible {
    box-shadow:inset 0 0 0 0.6rem salmon !important;
}

.capsule .sub-nav-container .sub-nav-list li.active a {
    border-bottom: 2px solid #fff;
    opacity: 1;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
        /* 시작 위치 */
    }

    50% {
        background-position: 100% 50%;
        /* 중간 위치 */
    }

    100% {
        background-position: 0% 50%;
        /* 종료 위치 */
    }
}

@media all and (max-width:1440px) {
    .capsule {
        mask: none;
        width: 100%;
        min-height: auto;
        margin: 0;
    }


    .capsule .sub-nav-container h1 {
        font-size: 6rem;
    }

    .capsule #sub-nav-path,
    .capsule .sub-nav-container {
        width: calc(100% - 7rem);
    }
}

@media all and (max-width:1280px) {
    .capsule {
        padding: 18rem 0 4rem;
    }

    .capsule .sub-nav-container {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.5rem;
    }

    .capsule .sub-nav-container h1 {
        font-size: 5rem;
    }

    .capsule .sub-nav-container .sub-nav-list {
        flex-wrap: wrap;
        row-gap: 0rem;
    }
}

@media all and (max-width:1024px) {
    .capsule .sub-nav-container .sub-nav-list li a {
        padding: 0.85rem 0 0.4rem;
    }
}

@media all and (max-width:640px) {
    .capsule .sub-nav-container h1 {
        font-size: 4rem;
    }

    .capsule #sub-nav-path,
    .capsule .sub-nav-container {
        width: calc(100% - 5rem);
    }
}

@media all and (max-width:480px) {

    .capsule #sub-nav-path,
    .capsule .sub-nav-container {
        width: calc(100% - 4rem);
    }
}