/* 서브페이지 공통 스타일 */

/* 서브 비주얼 영역 */
.sub-visual {
    position: relative;
    height: 450px;
    overflow: hidden;
}

/* 이미지 줌인 효과 */
.sub-visual-img {
    width: 100%;
    height: 450px;
    opacity: 0;
    animation: fadeInZoom 1.5s ease forwards;
    overflow: hidden;
}

.sub-visual-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* 초기 상태에서 조금 확대 */
    animation: zoomOut 1.5s ease forwards; /* 줌아웃 애니메이션 추가 */
}

/* 브레드크럼 영역 */
.breadcrumb-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 전체 높이를 차지하게 함 */
    z-index: 10;
    color: white;
}

.breadcrumb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: left;
}

.breadcrumb {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 14px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideFromLeft 0.8s ease 0.3s forwards;
    margin-top: 5px;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb .home-icon {
    vertical-align: bottom;
    display: inline-flex;
    color: white;
}

/* 페이지 타이틀 */
.page-title {
    position: absolute;
    width: 100%;
    top: 50%; /* sub-visual의 높이의 50% 지점 */
    left: 50%;
    transform: translate(-50%, -50%) !important; /* X축과 Y축 모두 중앙 정렬 */
    font-size: 42px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
    margin: 0;
}

/* 서브 네비게이션 */
.sub-nav-container {
    position: relative;
    margin-top: -30px; /* -60px에서 -30px로 수정 */
    margin-bottom: 50px;
}

.sub-nav {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 60%; /* 메뉴 항목(최대 6개)이 한 줄에 들어가도록 폭 확대 */
    margin: 0 auto;
    overflow: hidden;
}

.info-sub .sub-nav {
    width: 60%;
}


.sub-nav ul {
    display: flex;
    flex-wrap: wrap; /* 항목이 많거나 네비 폭이 좁으면 다음 줄로 자동 배치 */
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-nav li {
    position: relative;
    text-align: center;
    /* 메뉴명을 생략하지 않고 표시하며 공간이 부족하면 다음 줄로 배치한다. */
    flex: 1 0 max-content;
    min-width: max-content;
}

.sub-nav li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: #eee;
}

/* 선택된 항목(active)의 오른쪽 구분자와 마우스 오버된 항목의 구분자 숨김 */
.sub-nav li.active::after,
.sub-nav li:has(+ li.active)::after,
.sub-nav li:hover::after,
.sub-nav li:has(+ li:hover)::after {
    display: none;
}

.sub-nav li a {
    display: block;
    padding: 20px 8px;
    text-decoration: none;
    color: var(--text-sub1);
    font-size: 16px;
    transition: all 0.3s;
    /* 메뉴명 전체를 한 줄로 표시한다. */
    white-space: nowrap;
}

.sub-nav li.active a {
    color: white;
    font-weight: 600;
    background-color: var(--main-color);
}

.sub-nav li:not(.active):hover a {
    color: white;
    background-color: var(--sub-color);
}

/* 콘텐츠 타이틀 스타일 */
.content-title {
    text-align: center;
    color: var(--main-color);
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease 0.4s forwards;
}

/* 콘텐츠 박스 스타일 */
.content-box {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    width: 66.6%;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInLeft 0.8s ease 0.6s forwards;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 40px; /* 패딩 하단 줄임 */
}

/* 콘텐츠 텍스트 스타일 - 글자 크기 키움 */
.content-text {
    font-family: 'NanumSquare', 'Pretendard-Regular', 'Noto Sans KR', sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-sub1);
    white-space: pre-line;
    padding: 0; /* 위아래 여백 제거 */
}


.sub-title {
    margin-bottom: 30px;
    text-align: center;
}

.sub-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

.sub-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
    background-color: var(--main-color);
}

/* 애니메이션 정의 */
@keyframes fadeInZoom {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 반응형 조정 */
@media (max-width: 1024px) {
    .sub-visual, .sub-visual-img {
        height: 400px;
    }

    .sub-visual img {
        height: 100%;
    }

    .sub-nav {
        width: 85%;
    }

    .content-box {
        width: 85%;
    }
}

@media (max-width: 768px) {
    .sub-visual, .sub-visual-img {
        height: 300px;
    }

    .breadcrumb-wrap {
        top: 15px;
        left: 15px;
    }

    .page-title {
        font-size: 32px;
    }

    .sub-nav {
        width: 95%;
    }

    .sub-nav ul {
        flex-wrap: wrap;
    }

    .sub-nav li {
        width: auto;
        flex: 1 0 33.333%;
    }

    .sub-nav li:nth-child(3n)::after {
        display: none;
    }

    .sub-nav li a {
        padding: 15px 0;
        font-size: 14px;
    }

    .content-box {
        width: 95%;
        padding: 25px;
    }

    .content-text {
        font-size: 15px;
        line-height: 1.7;
    }

    .sub-title h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .sub-visual, .sub-visual-img {
        height: 200px;
    }

    .page-title {
        font-size: 24px;
    }

    .breadcrumb {
        padding: 6px 12px;
        font-size: 12px;
    }

    .content-box {
        padding: 20px;
    }

    .content-text {
        font-size: 14px;
    }

    .sub-nav li {
        flex: 1 0 50%;
    }

    .sub-nav li:nth-child(3n)::after {
        content: '';
    }

    .sub-nav li:nth-child(2n)::after {
        display: none;
    }

    .sub-title h2 {
        font-size: 20px;
    }

}
.sub-visual-credit{position:absolute;z-index:12;right:24px;bottom:18px;max-width:calc(100% - 48px);padding:5px 8px;border-radius:4px;background:rgba(0,0,0,.48);color:#fff;font-size:12px;line-height:1.35;text-align:right;text-shadow:0 1px 2px rgba(0,0,0,.35)}

/* 참여·신청 공통 서브 네비게이션 */
.participation-page .participation-sub .sub-nav {
    width: min(600px, calc(100% - 32px));
    border-radius: 8px;
}

.participation-page .participation-sub .sub-nav li {
    flex: 1 1 0;
    width: auto;
}

.participation-page .participation-sub .sub-nav li a {
    min-height: 60px;
    padding: 20px 12px;
}
