/* 메인 페이지 스타일 */
/* 상위 컨테이너 스타일 */
#wrapper {
    min-height: calc(100vh - 70px); /* 전체 높이에서 헤더 높이 빼기 */
    width: 100%;
    display: flex; 
    align-items: center;
    padding-bottom: 80px; /* 약간 위쪽으로 조정하기 위한 하단 여백 */
}

#container_wr {
    width: 100%;
}

/* 메인 컨테이너 스타일 */
.main-container {
    width: 100%;
    padding: 0;
    overflow: visible; /* overflow 변경 */
    max-width: 1430px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative; /* 추가 */
    z-index: 5; /* 추가 */
}

/* 메인 타이틀 */
.main-title {
    text-align: left;
    margin: 0 0 30px 0;
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 큰 해상도에서 여백 및 폰트 크기 조정 */
@media (min-width: 1921px) {
    #wrapper {
        padding-bottom: 100px; /* 더 큰 하단 여백으로 위쪽으로 조정 */
    }
    
    .main-title {
        margin: 0 0 40px 0; /* 더 큰 하단 여백 */
        min-height: 330px; /* 큰 해상도에서 더 큰 높이 */
    }
    
    .main-title h2 {
        font-size: clamp(36px, 5vw, 48px); /* 더 큰 폰트 사이즈 */
    }
}

/* 매우 큰 해상도에서 여백 및 폰트 크기 조정 */
@media (min-width: 2560px) {
    #wrapper {
        padding-bottom: 120px; /* 더 큰 하단 여백 */
    }
    
    .main-title {
        margin: 0 0 50px 0; /* 더 큰 하단 여백 */
        min-height: 400px; /* 매우 큰 해상도에서 더 큰 높이 */
    }
    
    .main-title h2 {
        font-size: clamp(40px, 6vw, 56px); /* 더 큰 폰트 사이즈 */
    }
}

.main-title h2 {
    font-size: clamp(32px, 4vw, 40px); /* 반응형 글꼴 크기 */
    font-weight: 700;
    line-height: 1.4;
    /* color 제거 - gradient로 대체 */
}

/* 섹션 컨테이너 */
.sections-container {
    display: flex;
    width: 100%;
    height: 430px; /* 530px - 100px (banner-animation으로 인한 높이 증가분) */
    position: relative;
    gap: 2%;
}

/* 큰 해상도에서의 섹션 컨테이너 높이 조정 */
@media (min-width: 1921px) {
    .sections-container {
        height: 520px; /* 650px - 130px (banner-animation으로 인한 높이 증가분) */
    }
}

/* 매우 큰 해상도에서의 섹션 컨테이너 높이 조정 */
@media (min-width: 2560px) {
    .sections-container {
        height: 600px; /* 750px - 150px (banner-animation으로 인한 높이 증가분) */
    }
}

/* 섹션 공통 스타일 */
.section-item {
    position: relative;
    width: 49%; /* 정확하게 49%로 설정, gap이 2%이미로 정확하게 나누어짐 */
    height: 100%;
    overflow: hidden;
    transition: width 0.5s ease-in-out;
}

/* 섹션 호버 시 애니메이션 */
.section-item:hover {
    width: 58%; /* 호버시에는 더 넓게 표시, 나머지 공간이 정확히 40% 남게 조정 */
}

/* 호버되지 않은 섹션 스타일 (주석 처리) */
/*
.section-item:not(:hover) {
    width: 40%;
}
*/

/* 좌측 섹션 */
.left-section {
    background: url('../assets/images/main_bg_03.jpg') no-repeat center center ;
    background-size: cover !important;
    border-radius: 30px;
}

/* 우측 섹션 */
.right-section {
    background: url('../assets/images/main_bg_01.jpg') no-repeat center center ;
    background-size: cover !important;
    border-radius: 30px;
}

/* 섹션 내용 */
.section-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 5%;
    box-sizing: border-box;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.right-section .section-content {
    align-items: flex-end;
    text-align: right;
}

/* 제목 및 텍스트 */
.section-content h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-content p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* more view 버튼 */
.more-view {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.more-view:hover {
    color: #4267b2;
}

/* 배너 컨테이너 */
.banner-container {
    position: absolute;
    bottom: 8%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.section-item:hover .banner-container {
    opacity: 1;
    transform: translateY(0);
}

.left-banner {
    left: 8%;
}

.right-banner {
    right: 8%;
}

/* 배너 네비게이션 */
.banner-nav {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.nav-item {
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.nav-item.active {
    color: #fff;
}

.nav-item:hover {
    color: #fff;
}

.nav-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
    min-width: 140px;
}

/* 배너 콘텐츠 */
.banner-content {
    overflow: hidden;
    position: relative;
    height: 30px;
}

.banner-item {
    position: absolute;
    width: 100%;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    font-size: 16px;
    font-weight: 500;
}

.banner-item.active {
    transform: translateY(0);
    opacity: 1;
}

/* 노트북 해상도 (1500px 미만) 설정 */
@media (max-width: 1500px) {
    #wrapper {
        padding-bottom: 60px;
    }
    
    .main-container {
        max-width: 1300px;
    }
    
    .sections-container {
        height: 400px; /* 500px - 100px (banner-animation으로 인한 높이 증가분) */
    }
    
    .main-title {
        margin: 0 0 25px 0;
        min-height: 240px; /* 노트북 해상도에서 적절한 높이 */
    }
    
    .main-title h2 {
        font-size: clamp(28px, 3.5vw, 36px);
    }
    
    .section-content h3 {
        font-size: 32px;
    }
    
    .section-content p {
        font-size: 15px;
    }
    
    .more-view {
        font-size: 13px;
    }
    
    .banner-item {
        font-size: 15px;
    }
    
    .nav-number {
        font-size: 16px;
    }
    
    .time-bar-container {
        width: 130px;
    }
    
    .category-tab {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* 반응형 설정 */
@media (max-width: 1200px) {
    #wrapper {
        min-height: auto; 
        align-items: flex-start; 
        padding-top: 0; /* 패딩 제거 */
        padding-bottom: 0; /* 패딩 제거 */
    }
    
    .main-container {
        margin: 0 auto;
    }
    
    .sections-container {
        height: 380px; /* 480px - 100px (banner-animation으로 인한 높이 증가분) */
		margin-bottom:40px;
    }
    
    .main-title {
        margin: 0 3% 25px 3%;
        min-height: 200px; /* 태블릿 해상도에서 적절한 높이 */
    }
    
    .main-title h2 {
        font-size: clamp(24px, 3vw, 28px);
    }
    
    .section-content {
        padding: 4%;
    }
    
    .section-content h3 {
        font-size: clamp(24px, 3vw, 30px);
    }
    
    .left-banner {
        left: 5%;
        bottom: 6%;
    }
    
    .right-banner {
        right: 5%;
        bottom: 6%;
    }
    
    .nav-line {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .sections-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
		margin-bottom: 20px;
    }
    
    .section-item {
        width: 100% !important;
        height: 350px;
        margin-bottom: 0;
    }
    
    .section-item:hover {
        width: 100% !important;
    }
    
    .left-section {
        border-radius: 30px;
    }
    
    .right-section {
        border-radius: 30px;
    }
    
    .main-title {
        text-align: left; /* 모바일에서도 좌측정렬 유지 */
        margin: 0 3% 25px 3%;
        min-height: auto;
    }
    
    .section-content {
        padding: 5%;
    }
    
    .right-section .section-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .banner-container {
        bottom: 5%;
    }
    
    .left-banner {
        left: 5%;
    }
    
    .right-banner {
        left: 5%;
        right: auto;
    }
}