@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: #FBFBFD;
}

body {
    font-family: 'Pretendard';
    padding: 0;
    display: flex;
    flex-direction: column;
    color: #32386A;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    align-items: center;
}

.intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro h1 {
    margin-top: 10%;
    font-size: 48px;
    margin-left: 10%;
    margin-right: 10%;
}

.intro h2 {
    margin-top: 0.5%;
    font-weight: 300;
    font-size: 32px;
    margin-left: 20%;
    margin-right: 20%;
}

.intro p {
    margin-top: 4%;
    margin-bottom: 5%;
    margin-left: 20%;
    margin-right: 20%;
    transition: margin 0.4s ease; /* gap 변화를 0.3초 동안 부드럽게 설정 */
    font-weight: 300;
    font-size: 18px;
    line-height: 1.6;
}

@media screen and (max-width: 900px) {
    p {
        margin-left: 50px;
        margin-right: 50px;
    }
}

.chart-name-container {
    position: relative;
    margin: 60px 0 0 0; /* 위쪽, 오른쪽, 아래쪽, 왼쪽 마진 설정 */
    max-width: 100%;
    min-width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        rgba(160, 177, 255, 0) 0%,
        rgba(160, 177, 255, 0.3) 40%,
        rgba(160, 177, 255, 0.3) 50%,
        rgba(160, 177, 255, 0) 100%
    );
    color: #32386A;
}


.chart-name-container .arrow-divider {
    width:36px;
}

.chart-name h1 {
    text-align: center; 
    position: relative;
    font-weight: 600;
    font-size: 40px;
    padding: 0;
    z-index: 1;
}

.chart-name h2 {
    text-align: center; 
    position: relative;
    font-weight: 300;
    font-size: 24px;
    padding: 0;
    z-index: 1;
}

.chart-name p {
    position: relative;
    font-weight: 400;
    font-size: 18px;
    z-index: 1;
    margin-top: 24px;
    margin-bottom: 24px; 
    margin-left: 0px; 
    margin-right: 280px; 
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3%;
    margin-bottom: 10%;
    font-size: 18px;
    font-weight: 300;
    color: #32386A;
}

.arrow {
    font-size: 24px;
    margin-top: 14px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.chart-container {
    width: 80%;
    margin: 20px 0;
    background-color: #FBFBFD;
}

.chart2-container {
    width: 80%;
    margin: 20px 0;
    background-color: #FBFBFD;
}

.container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    background-color: #FBFBFD;
    padding-bottom: 60px;
}

.labels {
    position: sticky;
    left: 0;
    top: 0;
    margin-left: 40px;
    margin-right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #FBFBFD;
}

.labels2 {
    position: sticky;
    left: 0;
    top: 0;
    margin-left: 40px;
    margin-right: 16px;
    margin-right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #FBFBFD;
}

.label {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 14px 0;
    border-radius: 50%;
    background-color: #D4E9FE; /* 원하는 배경색으로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FBFBFD;
}

.label img {
    max-width: 70%;
    max-height: 70%;
}

.label.snu {
    background-color: rgba(225, 187, 255, 0.3); /* 예: 서울대학교 */
    
}

.label.yu {
    background-color: rgba(178, 195, 255, 0.3); /* 예: 연세대학교 */
}

.label.ku {
    background-color: rgba(255, 157, 139, 0.3); /* 예: 고려대학교 */
}

.label.ewu {
    background-color: rgba(166, 255, 155, 0.3); /* 예: 이화여자대학교 */
}

.label.stech {
    background-color: rgba(255, 196, 128, 0.3); /* 예: 과학기술대학교 */
}

.scroll-x {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
}

.scroll-x::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.chart-wrapper {
    width: 7400px; /* 스크롤을 위한 넓이 */
    height: 720px;
    position: relative;
    overflow: hidden;  /* 애니메이션 시 요소가 흐르지 않도록 설정 */
    /* background: linear-gradient(90deg, rgba(152, 194, 235, 0.1) 0%, rgba(233, 134, 230, 0.1) 100%); */
}

.x-scroll-indicator {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 200px; /* 디자인에 맞게 조정 */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 63%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 10;
    font-size: 18px;
    font-weight: 300;
    color: #32386A;
    text-align: center;

}


.x-scroll-indicator span {
    animation: bounceX 2s infinite;
}

.x-scroll-indicator::after {
    content: '';
    border: solid #32386A;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 6px;
    transform: rotate(-45deg);
    margin-left: 10px; /* 텍스트와 화살표 사이의 간격 */
}


@keyframes bounceX {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(10px);
    }
}

canvas {
    background-color: #fff;
}

.triangle {
    stroke: none;
    opacity: 0;
}

.triangle.animate {
    animation: appear 0.05s forwards;
}

@keyframes expandWidth {
    from {
        transform: scaleX(0.167); /* 1/6 크기 */
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes compressWidth {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0.167); /* 1/6 크기 */
    }
}

.triangle2 {
    transform-origin: left center;
    transform: scaleX(0.167); /* 초기 상태를 1/6 크기로 */
}

.triangle2.expanded {
    animation: expandWidth 3s forwards;
    animation-delay: 0.5s;
}

.triangle2.compressed {
    transform: scaleX(0.167);
}

#controls {
    position: absolute;
    top: -65px; /* `chart2-container`의 위쪽 간격 */
    right: 60px; /* `chart2-container`의 오른쪽 간격 */
    z-index: 10;
}

#toggle-animation {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: rgba(160, 177, 255, 0);
    color: rgb(100, 128, 255);
    border: 1px solid rgba(160, 177, 255, 1);
    border-radius: 100px;
    transition: background-color 0.2s;
}

#toggle-animation:hover {
    background-color: rgba(160, 177, 255, 0.15);
}

.svg-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

svg {
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

/* 애니메이션 정의 */
@keyframes appear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.description {
    text-align: center;
    margin-top: 120px;
    margin-bottom: 40px;
    position: relative
}

.description .arrow-divider {
    width:36px;
}

.description h1 {
    margin-top: 35px;
    font-weight: 600;
    font-size: 32px;
}

.description h2 {
    margin-top: 20px;
    font-weight: 300;
    font-size: 24px;
}

.content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 45px;
    padding: 0 0 0 60px; /*왼쪽 여백 80px*/
    gap: 145px; /* left-box와 right-box 사이 간격 */
    transition: gap 0.4s ease; /* gap 변화를 0.3초 동안 부드럽게 설정 */
    width: 100%;
    max-width: calc(100% - 60px); /* 왼쪽 고정 여백을 뺀 너비 */
    box-sizing: border-box;
    position: relative;
}

.line {
    position: absolute;
    top: 190px;
    left: 570px; /* 왼쪽 여백 고정 */
    opacity: 1; /* 초기 투명도 설정 */
    transition: opacity 0.4s ease; /* 투명도 변화를 0.3초 동안 부드럽게 설정 */
}

@media screen and (max-width: 1400px) {
    .line {
        opacity: 0; /* 화면이 1400px 이하일 때 선을 숨김 */
    }
    .content {
        gap: 30px;
    }
}

.left-box, .right-box {
    position: relative;
    margin: 0 auto;
}

.left-box {
    display: flex;
    flex-direction: column;
    align-items: center; /* left-box 안의 내용물 중앙 정렬 */
    background-color: white;
    padding: 50px;
    border-radius: 50px;
}

.left-box .image-box {
    width: 446px;
    margin-bottom: 50px;
    display: flex;
    justify-content: center; /* 이미지 중앙 정렬 */
}

/* 이미지 박스의 상하좌우 여백을 50px로 설정 */
.left-box .image-box img {
    margin: 50px;
}

.left-box .image-box:last-child {
    margin-bottom: 0px;
}

.right-box {
    display: flex;
    flex-direction: column;
    flex: 1; /* 가용 가능한 공간을 차지하도록 설정 */
    width: 700px; /* 최소 너비 설정 */
    margin-top: 110px;
}

.text-box-primary {
    background-color: white;
    border: 1px solid #A0B1FF;
    border-radius: 50px;
    box-shadow: 0 0 7px rgba(160, 177, 255, 0.5); /* 투명도 30%인 그림자 추가 */
    /*display: flex; */
    align-items: center;
    justify-content: center;
    /*flex-direction: row;*/
    padding: 40px 60px;
    font-size: 18px;
    line-height: 1.6;
    flex: 1; /* 가용 가능한 공간을 차지하도록 설정 */
    margin-top: 60px;
    min-width: 800px; /* 최소 너비 설정 */
    /* max-width: 800px; */
}

.text-box-primary .highlight-text {
    font-weight: 500;
    color: #5874C7;
}

.right-box .text-box-primary {
    margin-bottom: 50px;
}

.content2 {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-top: 45px;
    margin-left: 60px;
    margin-right: 60px;
    gap: 30px;
}

.top-box {
    display: flex;
    align-items: center;
    position: relative;
    justify-content: center;
    gap: 60px;
}

.top-box img {
    display: block; /* 이미지를 블록 요소로 설정 */
    width: 530px; /* 이미지 너비를 부모 요소에 맞춤 */
    height: auto; /* 이미지 높이를 비율에 맞게 자동 설정 */
}

.top-box svg {
    position: absolute; /* 절대 위치로 설정하여 부모 요소를 기준으로 배치 */
    width: 10; /* SVG 너비를 부모 요소에 맞춤 */
    top: 57%;
    left: 11%;
    height: auto; /* SVG 높이를 비율에 맞게 자동 설정 */
}

.top-box path {
    transition: d 3s ease; /* 부드러운 전환 효과 추가 */
}

.text-box-pink {
    background-color: white;
    border: 1px solid #FFBDFE;
    border-radius: 50px;
    box-shadow: 0 0 7px rgba(255,189,254, 0.5); /* 투명도 30%인 그림자 추가 */
    /*display: flex; */
    align-items: center;
    justify-content: center;
    /*flex-direction: row;*/
    padding: 40px 30px;
    font-size: 18px;
    line-height: 1.6;
    flex:1;
    min-width: 310px;
    /* max-width: 800px; */
}

.box-categroy {
    align-items: center;
    display: flex; /* flexbox를 사용하여 한 줄에 배치 */
    gap: 16px; /* flex 아이템 간의 간격 설정 */
}

.category {
    display: inline-block; /* 한 줄에 배치하기 위해 사용 */
    margin-top: 20px;
    margin-right: 10px;
    background-color: #FFE3FF;
    border-radius: 25px;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #FF7AFD;
    padding: 4px 12px;
}

.box-category-image {
    margin-top: 60px;
    flex: 1 1 0%;
}

.box-category-image img{
    max-height: 400px;
}

.description-slope{
    padding-bottom: 100px;
    display: flex;
    flex: 1;
    width: 100%;
    margin-left: 100px;
    margin-right: 100px;
    background: linear-gradient(
        to bottom,
        #FBFBFD 0%,
        rgb(255, 255, 255) 10%
    );
}

.slope-left-box {
    display: flex;
    justify-content: center;
    flex-direction: column;
    flex: 4; /* 가용 가능한 공간을 차지하도록 설정 */
    gap: 60px;
    margin-left: 120px;
    min-width: 600px; /* 최소 너비 설정 */
}

.slope-head {
    text-align: left;
    /* margin-top: 120px; */
    /* position: absolute; */
}

.slope-head .arrow-divider {
    width:36px;
}

.slope-head h1 {
    margin-top: 35px;
    font-weight: 600;
    font-size: 32px;
}

.slope-head h2 {
    margin-top: 20px;
    font-weight: 300;
    font-size: 24px;
}

.slope-content {
    width: 70%;
    display: flex;
    flex: 1;
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
}

.slope-right-box {
    margin-top: 24px;
    margin-right: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 6;
}

.slope-right-box img{
    width: 100%;
    height: auto;
}

.description-box {
    flex: 3;
    padding: 6px;
    background-color: #F3F5FF;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(160, 177, 255, 0.4);
    margin-right: 60px;
    margin-left: 60px;
    margin-top: 24px;
}

.legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px
}

.legend h1 {
    font-size: 24px;
    text-align: center;
    margin: 24px
}

.legend img {
    max-width: 90%;
    height: auto;
}

.legend p {
    color: #565353;
    font-size: 17px;
    line-height: 1.6;
    text-align: left;
    margin: 24px
}

.pie-box {
    flex: 7;
    margin: 0;
}

.pie-charts-container {
    position: relative;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 0;
}

.pie-chart {
    margin: 0;
    padding: 0;
    position: absolute;
}

#pie-chart-snu {
    top: -30px; 
    left: -10px; 
}

#pie-chart-yu {
    top: 40px;  
    left: 236px; 
}

#pie-chart-ku {
    top: -15px;  
    left: 550px; 
}

#pie-chart-ewu {
    top: 340px; 
    left: 470px; 
}

#pie-chart-stech {
    top: 250px;
    left: 0px
}

.container object {
    width: 50%;
    margin-left: 60px;
    margin-right: 16x;
}

.guide {
    position: absolute;
    top: 320px;
    right: 30px;
    display: flex;
    align-items: center;
}

.tooltip {
    visibility: hidden;
    width: 840px; /* 툴팁 박스의 너비 */
    border: 1px solid #A0B1FF;
    border-radius: 50px;
    background-color: white;
    color: #32386A;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    flex: 1;
    padding: 30px 50px;
    position: absolute;
    z-index: 1;
    top: 110%; /* 이미지 아래에 툴팁이 나타나도록 위치 조정 */
    right: 0;
    transform: translateX(0);
    box-shadow: 0 0 7px rgba(160, 177, 255, 0.5); /* 투명도 30%인 그림자 추가 */
    opacity: 0;
    transition: opacity 0.3s;
}

.guide:hover .tooltip {
    visibility: visible;
    opacity: 1;
}