/* --- 1. 기본 스타일 초기화 (Reset) --- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', sans-serif; color: #333; line-height: 1.6; background: #fff; }
a { text-decoration: none !important; color: inherit !important; }
ul, li { list-style: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- 2. 헤더 공통 (데스크톱 & 모바일) --- */
header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- 로고 이미지 및 텍스트 배치 --- */
.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* 이미지와 텍스트 사이의 간격 */
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a365d !important; /* 로고 컬러에 맞춘 차분하고 신뢰감 있는 짙은 네이비 톤 */
    white-space: nowrap;
}

.logo img {
    height: 38px; /* 헤더 높이(PC 80px, 모바일 60px)에 최적화된 로고 크기 */
    width: auto;
    display: block;
}

/* --- 3. 데스크톱 전용 스타일 (769px 이상 화면) --- */
@media (min-width: 769px) {
    .nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 80px; }
    .header-spacer { height: 80px; }
    .menu-toggle { display: none; } /* PC에서는 햄버거 버튼 숨김 */

    .menu { display: flex; align-items: center; height: 80px; }
    .menu > li { position: relative; height: 100%; display: flex; align-items: center; padding: 0 20px; cursor: pointer; }
    .menu > li > a { font-size: 1rem; font-weight: 600; transition: 0.3s; }
    .menu > li:hover > a { color: #0066ff !important; }

    /* 데스크톱 드롭다운 서브메뉴 */
    .submenu {
        display: none;
        position: absolute;
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: #ffffff;
        min-width: 180px;
        border: 1px solid #eee;
        box-shadow: 0 8px 15px rgba(0,0,0,0.1);
        padding: 10px 0;
        border-radius: 0 0 8px 8px;
        z-index: 10000;
    }
    .submenu::before { content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent; }
    .submenu li a { display: block; padding: 10px 20px; font-size: 0.9rem; text-align: center; transition: 0.2s; }
    .submenu li a:hover { background: #f8f9fa; color: #0066ff !important; }
    .menu > li:hover .submenu { display: block; }
}

/* --- 4. 모바일 전용 스타일 (768px 이하 화면) --- */
@media (max-width: 768px) {
    .nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 60px; }
    .header-spacer { height: 60px; }
    
    /* 햄버거 버튼 표시 */
    .menu-toggle { display: block; background: none; border: none; cursor: pointer; padding: 10px; }
    .menu-toggle span { display: block; width: 25px; height: 3px; background: #333; margin: 5px 0; }

    /* 모바일 메인 메뉴 (기본 숨김 처리) */
    .menu {
        display: none; /* 처음에 무조건 숨김 */
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        
        /* 메뉴가 길어져 화면을 덮을 경우 스크롤 생성 */
        max-height: calc(100vh - 60px); 
        overflow-y: auto; 
    }
    
    /* 햄버거 버튼 클릭 시 common.js에 의해 .active 클래스가 붙으면 메뉴 표시 */
    .menu.active { display: flex; } 

    .menu > li { width: 100%; display: block; border-bottom: 1px solid #f5f5f5; }
    .menu > li > a { display: block; padding: 15px 20px; font-weight: 600; text-align: left; }

    /* 모바일 서브메뉴 (아래로 자연스럽게 펼쳐진 형태) */
    .submenu {
        display: block;
        position: static;
        width: 100%;
        background: #fafafa;
        padding: 0;
        box-shadow: none;
        border: none;
        transform: none;
    }
    .submenu li a { 
        display: block; 
        padding: 12px 20px 12px 40px; /* 서브메뉴 들여쓰기 */
        font-size: 0.9rem; 
        color: #555 !important; 
        border-top: 1px dashed #eee; 
        text-align: left; 
    }
    .submenu li a:hover { color: #0066ff !important; }
}

/* --- 5. 공통 섹션 스타일 (index.php 등) --- */
.main-section {
    position: relative;
    padding: 120px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: #fff;
}

/* 모바일에서는 배경 이미지 고정(fixed) 해제하여 스크롤 버벅임 방지 */
@media (max-width: 768px) {
    .main-section { padding: 80px 0; background-attachment: scroll; } 
}

.section-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.overlay-dark { background: rgba(0, 0, 0, 0.4); }
.overlay-white { background: rgba(255, 255, 255, 0.85); }
.content-wrapper { position: relative; z-index: 2; }
.dark-text { color: #333; }

.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 50px; }
.biz-item { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); padding: 40px 20px; border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.2); }

.btn-primary { display: inline-block; padding: 15px 45px; background: #0066ff; color: #fff !important; border-radius: 50px; font-weight: 700; margin-top: 30px; }

.section-partners { padding: 60px 0; background: #fff; text-align: center; border-top: 1px solid #eee; }
.partner-list { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 20px; }

/* --- 6. 공통 푸터 --- */
footer { background: #f9f9f9; padding: 60px 0; border-top: 1px solid #eee; color: #666; }
.footer-wrapper { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; }
.footer-left { flex: 1; min-width: 300px; }
.footer-right { text-align: right; flex: 1; min-width: 300px; }
.footer-left h3 { color: #0066ff; margin-bottom: 15px; font-size: 1.4rem; }

@media (max-width: 768px) {
    .footer-wrapper { flex-direction: column; text-align: center; }
    .footer-right { text-align: center; }
}