/* ==============================
   전체 기본 설정
============================== */
body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    letter-spacing: -0.5px;
}

/* ==============================
   헤더 (PC 기본)
============================== */
header {
    background-color: #fffefe;
    color: rgb(11, 11, 11);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

header h1 {
    margin: 0;
    padding: 0;
}

header img {
    display: block;
}

/* PC 네비게이션 */
header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    align-items: center;
}

header nav ul li {
    margin-left: 20px;
    position: relative;
}

header a {
    color: rgb(10, 10, 10);
    text-decoration: none;
    font-weight: bold;
}

/* 화살표 아이콘 */
.arrow {
    font-size: 0.7em;
    margin-left: 2px;
}

/* ==============================
   서브메뉴 (PC - hover)
============================== */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    list-style: none;
    z-index: 200;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    color: #333333 !important;
    background-color: #ffffff !important;
    padding: 12px 20px !important;
    display: block !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
    font-weight: normal !important;
    white-space: nowrap;
}

/* PC: 마우스 hover로 서브메뉴 열기 */
header nav ul li:hover > .submenu {
    display: block;
}

.submenu li a:hover {
    background-color: #f4f4f4 !important;
    color: #ff8c00 !important;
}

/* ==============================
   햄버거 버튼 (모바일 전용, PC에서는 숨김)
============================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 300;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #111;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 햄버거 → X 애니메이션 */
.hamburger.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ==============================
   메인 배너 (Hero) - PC
============================== */
.hero {
    height: calc(100vh - 87px); /* 헤더 실제 높이(로고 70px + padding) 기반 */
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), url('main-bg.png');
    background-size: 100% auto;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero h2 strong {
    color: #ff8c00;
}

.hero-content .btn-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff8c00;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.3s;
}

.hero-content .btn-more:hover {
    background-color: #e67e00;
}

/* ==============================
   푸터
============================== */
footer {
    background-color: #ffffff;
    color: #111;
    text-align: center;
    padding: 1px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}



/* ==============================
   모바일 반응형 (768px 이하)
============================== */
@media (max-width: 768px) {

    /* 헤더: 로고 + 햄버거 버튼만 한 줄에 */
    header {
        padding: 0.5rem 4%;
        flex-wrap: wrap;
    }

    /* 햄버거 버튼 표시 */
    .hamburger {
        display: flex;
    }

    /* 네비게이션: 기본 숨김 */
    header nav {
        display: none;
        width: 100%;
        order: 3; /* 헤더 아래쪽에 배치 */
        background-color: #fff;
        border-top: 1px solid #eee;
    }

    /* 햄버거 클릭 시 nav 표시 */
    header nav.open {
        display: block;
    }

    /* 모바일 메뉴: 세로 나열 */
    header nav ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    header nav ul li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    /* 최상위 메뉴 링크 */
    header nav ul > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
        font-size: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* 모바일 서브메뉴: 절대위치 해제, 세로 목록으로 */
    .submenu {
        position: static !important;
        box-shadow: none !important;
        background-color: #f8f8f8 !important;
        display: none !important;  /* 기본 숨김 */
        padding: 0 !important;
        min-width: unset !important;
        width: 100%;
    }

    /* 클릭으로 열린 서브메뉴 */
    .has-submenu.submenu-open > .submenu {
        display: block !important;
    }

    /* 모바일 서브메뉴 항목 */
    .submenu li a {
        padding: 12px 20px 12px 36px !important; /* 들여쓰기로 계층 표현 */
        font-size: 13px !important;
        border-bottom: 1px solid #ececec;
        background-color: #f8f8f8 !important;
        white-space: normal !important;  /* 긴 텍스트 줄바꿈 허용 */
    }

    /* 화살표 방향: 열렸을 때 위쪽 */
    .has-submenu.submenu-open > a .arrow {
        transform: rotate(180deg);
        display: inline-block;
    }

    .arrow {
        display: inline-block;
        transition: transform 0.2s ease;
    }

    /* Hero 모바일 최적화 */
    .hero {
        height: calc(100svh - 87px); /* 모바일 주소창 고려한 svh 단위 */
        min-height: 400px;
        background-position: center center;
    }

    .hero h2 {
        font-size: 1.7rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
        word-break: keep-all; /* 한국어 단어 단위 줄바꿈 */
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.5;
        padding: 0 10px;
    }
}

/* ==============================
   소형 모바일 (480px 이하)
============================== */
@media (max-width: 480px) {
    header img {
        height: 54px;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.85rem;
    }
}