/* 기본 리셋 및 폰트 */
* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.loaded {
    opacity: 1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #d1d9e2;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-box-link {
    text-decoration: none; 
    color: inherit;       
    display: inline-block;
}

.logo-box-link:hover .logo {
    color: #fff;
    font-weight: bold;
    font-size: 1.4rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 50px;
}

nav ul li a, .logo {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.4rem;
}

.hamburger {
    display: none; /* PC에서는 숨김 */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
}

/* Slider Section */
.slider-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #ffffff;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%; 
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
} 
/* 이미지가 너무 밝으면 텍스트가 안보이므로 어둡게 처리 */

.slide-text {
    position: absolute;
    color: white;
    text-align: center;
    z-index: 2;
}

.slide-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.slide-text p {
    font-size: 1.3rem;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%; cursor: pointer;
}

.dot.active {
    background: #fff;
    width: 30px;
    border-radius: 10px;
    transition: all 0.3s;
}

/* Content Layout */
.content-row {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 80px 0;
}

.content-row.reverse {
    flex-direction: row-reverse;
}

.img-box, .graph-box {
    flex: 1;
}

.img-box img, .graph-box img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.text-content {
    flex: 1;   
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
}

h2 {
    color: #1b264f;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
}

/* Circles */
.circle-grid {
    display: flex;
    justify-content: space-between;
    padding: 40px 20px 100px;
}

.circle-item {
    width: 180px;
    height: 180px;
    border: 2px solid #1b264f;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.3rem;
    padding: 20px;
}

/* Footer */
footer {
    background-color: #1b264f;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.footer-logo-circle img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 40px;
    margin-top: 15px;
}

.info-grid p {
    font-size: 1rem;
    color: #ccc;
}

.info-grid strong {
    color: #fff;
    margin-right: 15px;
    width: 60px;
    display: inline-block;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 50px;
    border-top: 1px solid #2e3b5e;
    padding-top: 20px;
}

/* 반응형 코드 */
/* --- 모바일 반응형 (768px 이하) 최종 수정분 --- */
@media (max-width: 768px) {
    /* 1. 메뉴 숨기기 및 햄버거 노출 */
    .pc-nav { display: none !important; }

    .mobile-nav.active { 
        display: block !important; /* 클릭 시에만 나타남 */
    }

    /* 2. 햄버거 버튼 아이콘 (X자 변신 준비) */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1100; /* 메뉴보다 위에 있도록 */
        padding: 5px;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #1b264f;
        transition: all 0.3s ease-in-out; /* 부드러운 변신 효과 */
    }

    /* 3. 메뉴가 active일 때 햄버거 -> X자 변신 */
    /* 첫 번째 줄을 45도 회전 */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    /* 두 번째 줄은 투명하게 */
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    /* 세 번째 줄을 -45도 회전 */
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 3. 모바일 메뉴 (가로 한 줄 문제 해결) */
    .mobile-nav {
        display: block;
        max-height: 0;    
        overflow: hidden;  
        width: 100%;
        background: #d1d9e2;
        position: absolute; /* 헤더 아래로 겹치게 */
        top: 60px; /* 헤더 높이에 맞춤 */
        left: 0;
        z-index: 1000;
        border-bottom: none;
        transition: max-height 0.5s ease-in-out, border-bottom 0.3s;
    }

    .mobile-nav.active { 
        display: block !important;
        max-height: 500px; /* 메뉴가 충분히 펼쳐질 수 있는 넉넉한 높이 */
    }

    .mobile-nav ul {
        display: flex !important;
        flex-direction: column !important; /* 가로 -> 세로 강제 전환 */
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        gap: 0;
    }

    .mobile-nav ul li {
        width: 100%;
        border-bottom: 1px solid #ddd;
        display: flex;
    }

    .mobile-nav ul li a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-align: center; /* 메뉴 글자 가운데 정렬 */
        text-decoration: none;
        font-weight: 600;
        box-sizing: border-box;
    }


    /* 2. 배너 텍스트 크기 조정 */
    .slider-container { height: 280px !important; }
    .slide-text h1 { font-size: 1.5rem !important; }
    .slide-text p { font-size: 1rem !important; }

    /* 3. content-row 이미지-텍스트 세로 배치 */
    .content-row, .content-row.reverse {
        flex-direction: column !important; /* 무조건 세로 배치 */
        padding: 40px 20px !important;
        gap: 20px !important;
        margin-bottom: 40px;
    }
    .img-box, .text-content {
        width: 100% !important;
    }

    .text-content {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* 4. circle-grid 2개씩 2줄 배치 */
    .graph-section {
        padding: 40px 20px !important;
    }

    .circle-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2열 고정 */
        justify-items: center;
        gap: 20px !important;
        padding: 40px 10px !important;
        margin-bottom: 40px;
    }
    .circle-item {
        width: 140px !important;
        height: 140px !important;
        font-size: 1.1rem !important;
        word-break: keep-all;
    }

    /* 5. 푸터 텍스트 가운데 정렬 */
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px;
    }
    .footer-logo-circle {
        margin: 0 auto 10px !important; /* 로고 중앙 */
    }
    .info-grid {
        grid-template-columns: 1fr !important;
        display: block !important; /* 그리드 해제하고 텍스트 정렬 */
    }
    .info-grid p {
        text-align: center !important;
        margin-bottom: 8px;
    }
    .info-grid strong {
        display: inline-block !important; /* 항목명도 가운데로 */
        width: auto !important;
        margin-right: 10px !important;
    }
}
