/* ========================================
   기본 리셋
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 리스트 스타일 제거 */
ul,
ol {
    list-style: none;
    padding-left: 0;
}

/* a 태그 기본 스타일 제거 */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: inherit;
}

/* ========================================
   CSS 변수
======================================== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #333;
    --bg-gray: #f5f5f5;
    --border-color: #ddd;
}

/* ========================================
   ✅ Sticky Footer 레이아웃
======================================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: 72px;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* ✅ 화면 전체 높이 확보 */
}

/* ✅ 메인 콘텐츠 영역이 남은 공간 모두 차지 */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========================================
   헤더
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
}

.logo {
    display: block;
    width: 140px;
    height: 40px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 40"><text x="10" y="30" font-family="Arial,sans-serif" font-size="24" font-weight="bold" fill="%230066cc">멘사코리아</text></svg>') no-repeat center;
    background-size: contain;
}

/* GNB 네비게이션 */
.gnb {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ul_1depth {
    display: flex;
    gap: 50px;
}

.ul_1depth>li {
    position: relative;
}

.ul_1depth>li>a {
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
}

.ul_1depth>li>a:hover {
    color: #0066cc;
}

/* 2차 메뉴 (드롭다운) */
.ul_2depth {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 0;
    min-width: 160px;
    z-index: 1001;
}

.ul_1depth>li:hover .ul_2depth {
    display: block;
}

.ul_2depth li a {
    display: block;
    padding: 10px 20px;
    color: #555;
    white-space: nowrap;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.ul_2depth li a:hover {
    background: #f5f5f5;
    color: #0066cc;
}

/* 헤더 링크 (회원가입/로그인) */
.header__link {
    display: flex;
    gap: 20px;
}

.header__link a {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.header__link a:hover {
    color: #0066cc;
}

/* 모바일 메뉴 버튼 */
.btn_mo_menu {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

/* ========================================
   사이드바 (모바일)
======================================== */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: right 0.3s ease;
    padding: 20px;
}

.sidebar.active {
    right: 0;
}

.sidebar .close-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    float: right;
    color: #333;
}

.sidebar ul {
    margin-top: 50px;
}

.sidebar ul li {
    margin-bottom: 20px;
}

.sidebar ul li a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    display: block;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar ul li a:hover {
    background: #f5f5f5;
    color: #0066cc;
}

/* ========================================
   푸터 (✅ Sticky Footer - flex-shrink: 0 추가)
======================================== */
.footer {
    background: #222;
    color: #fff;
    padding: 48px 20px 40px;
    flex-shrink: 0; /* ✅ 푸터가 줄어들지 않도록 고정 */
    width: 100%;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 푸터 왼쪽 */
.footer_left {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

/* 푸터 로고 - 이미지/텍스트 병행 */
.footer_logo {
    display: inline-block;
    /* 이미지 사용 시 주석 해제 */
    /* width: 200px; */
    /* height: 56px; */
}

/* 이미지 스타일 (이미지 있을 때) */
.footer_logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 텍스트 스타일 (이미지 없을 때) */
.footer_logo strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* 푸터 링크 */
.footer .footer_info ul.footer_link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    row-gap: 8px;
    margin-bottom: 24px;
}

.footer .footer_info ul.footer_link li a {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.footer .footer_info ul.footer_link li a:hover {
    color: #ccc;
}

.footer .footer_info ul.footer_link li.privacy a {
    font-weight: 600;
}

/* 회사 정보 */
.footer .company_info ul {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 8px;
}

.footer .company_info ul li {
    font-size: 14px;
    color: #999;
}

.footer .company_info ul li span {
    display: inline-block;
    margin-right: 6px;
}

.footer .company_info ul li span::after {
    content: '·';
    margin-left: 4px;
    display: inline-block;
}

.footer p.copyright {
    font-size: 14px;
    color: #505050;
}

/* 푸터 오른쪽 */
.footer_right {
    display: flex;
    align-self: flex-start;
    gap: 24px;
}

/* SNS 링크 */
.footer_right .footer_sns_link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer_sns_link li {
    width: 40px;
    height: 40px;
}

.footer_sns_link li.facebook {
    background: url(/_img/common/footer_facebook.svg) no-repeat center / contain;
}

.footer_sns_link li.insta {
    background: url(/_img/common/footer_insta.svg) no-repeat center / contain;
}

.footer_sns_link li.youtube {
    background: url(/_img/common/footer_youtube.svg) no-repeat center / contain;
}

.footer_sns_link li a {
    display: inline-block;
    width: 100%;
    height: 100%;
}

/* 패밀리 사이트 셀렉트 */
.select_family_site {
    -o-appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 180px;
    height: 40px;
    border-radius: 500px;
    background: url(/_img/common/footer_familysite_arrow.svg) no-repeat center right 16px / 16px;
    padding: 0 16px;
    border: 1px solid #fff;
    color: #fff;
}

.select_family_site::-ms-expand {
    display: none;
}

.select_family_site option {
    background: #fff;
    color: #111;
}

/* ========================================
   히어로 섹션 (index.html)
======================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 40px 60px;
    text-align: center;
    color: white;
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    animation: fadeInDown 0.8s ease;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 60px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 800px;
    margin: 0 auto 60px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature p {
    opacity: 0.9;
    font-size: 1rem;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea !important;
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: #667eea;
    color: white !important;
}

.info-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.info-box h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.info-box li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}

.info-box li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ========================================
   애니메이션
======================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   반응형 - 태블릿 (768px ~ 1024px)
======================================== */
@media (max-width: 1024px) {
    .gnb {
        display: none;
    }

    .header__link {
        display: none;
    }

    .btn_mo_menu {
        display: block;
    }

    .hero {
        padding: 60px 30px 40px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.3rem;
        margin-bottom: 40px;
    }

    .features {
        max-width: 700px;
        gap: 30px;
    }

    .feature {
        padding: 35px 25px;
    }

    .cta-button {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    /* 푸터 */
    .footer__inner {
        flex-direction: column;
        gap: 40px;
    }

    .footer_left {
        flex-direction: column;
        gap: 30px;
    }
}

/* ========================================
   반응형 - 모바일 (768px 이하)
======================================== */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .header__inner {
        padding: 12px 20px;
    }

    .logo {
        width: 120px;
        height: 35px;
    }

    .hero {
        padding: 40px 20px 30px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }

    .feature {
        padding: 30px 25px;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature h3 {
        font-size: 1.1rem;
    }

    .feature p {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .info-box {
        padding: 20px;
    }

    .info-box h3 {
        font-size: 1.1rem;
    }

    .info-box li {
        font-size: 0.9rem;
        padding-left: 25px;
    }

    /* 푸터 */
    .footer {
        padding: 30px 15px;
    }

    .footer__inner {
        flex-direction: column;
        gap: 30px;
    }

    .footer_left {
        flex-direction: column;
        gap: 24px;
    }

    .footer .footer_info ul.footer_link {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer .company_info ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer_right {
        flex-direction: column;
        gap: 16px;
    }

    .select_family_site {
        width: 100%;
    }
}

/* ========================================
   반응형 - 작은 모바일 (480px 이하)
======================================== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .feature {
        padding: 25px 20px;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature h3 {
        font-size: 1rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    .info-box {
        padding: 18px;
    }

    .info-box li {
        font-size: 0.85rem;
    }
}
