﻿:root {
    /* Colors */
    --primary-color: #1e1e1e;
    --accent-color: #E8E06A;
    --text-muted: #999;
    --bg-white: #ffffff;
    --bg-light: #f8f8f8;
    --bg-dark: #111111;
    --border-color: #e0e0e0;
    
    /* Layout */
    --container-width: 88.125rem; /* 1410px / 16 */
}

@font-face {
    font-family: 'Cafe24Dangdanghae';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.2/Cafe24Dangdanghae.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline:none!important;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body.locked {
    overflow: hidden !important;
}

body {
    font-family: 'Pretendard','Cafe24Dangdanghae', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: var(--primary-color);
    background-color: var(--bg-white);
    line-height: 1.5;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; color: #E8E06A; transition: 0.2s; }


/* Common Components */
.sec-title {
    font-family: 'Cafe24Dangdanghae';
    font-size: 3.7rem; 
    font-weight: 300;
    text-align: center;
    margin-bottom: 3.5rem; 
    letter-spacing: -0.01em;
}

/* Navbar */
.navbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    height: 7.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar:after,
.navbar:before{content:none;}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.nav-logo img { height: 5rem; width: auto; }

.nav-menu {
    display: flex;
    gap: 1.75rem;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: #1a1a0e;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    padding: 1rem 0;
    display: inline-block;
    position: relative;
}

.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0.75rem; left: 0; right: 0;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.25s ease;
    transform-origin: left;
}

.nav-item > a:hover { color: #1a1a0e; }
.nav-item > a:hover::after { transform: scaleX(1); }

.sub-menu {
    position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%) translateY(15px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0,0,0,0.05); border-radius: 0.5rem;
    padding: 0.75rem 0; min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    display: flex; flex-direction: column; text-align: center;
}

.nav-item:hover .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.sub-menu li a { display: block; padding: 0.5rem 1.25rem; font-size: 1rem; color: #444 !important; white-space: nowrap; }
.sub-menu li a::after { display: none; }
.sub-menu li a:hover { background: #f4f4e4; color: #1a1a0e !important; font-weight: 700; transform: none; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-auth {
    display: flex;
    gap: 0.5rem;
    font-size: 1rem;
    color: rgb(26 26 14);
}

.nav-auth a:hover { color: var(--accent-color); }

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #1a1a0e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn .icon-close { display: none; }

/* Mega Menu Overlay */
.mega-menu-overlay {
    position: fixed;
    top: 7.5rem;
    left: 0; right: 0; bottom: 0;
    background: #555141;
    backdrop-filter: blur(12px);
    z-index: 99;
    padding: 5rem 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-1.5rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.mega-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-menu-container {
    max-width: 1410px; margin: 0 auto;
    display: grid; 
    grid-template-columns: repeat(7, 1fr);
    gap: 1.5rem;
    position: relative; z-index: 2;
}

.mega-column h3 {
    color: var(--accent-color); font-size: 1.25rem; font-weight: 700;
    margin-bottom: 1.5rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mega-column a {
    display: block; color: rgba(255,255,255,0.75);
    font-size: 1rem; margin-bottom: 1rem; transition: color 0.2s, transform 0.2s;
}

.mega-column a:hover { color: #fff; transform: translateX(4px); }

.mega-bg-logo {
    position: fixed; bottom: -5%; right: -5%;
    height: 70vh; opacity: 0.04; pointer-events: none; z-index: 1;
}

/* =========================================
   v2 서브페이지 상단 네비게이션 및 타이틀 스타일 
   ========================================= */

.sub-page-wrapper {
    padding-top: 12.5rem;
}

/* 로그인/회원가입 등 특수 페이지 상단 여백 */
.auth-page-wrapper {
    padding-top: 120px;
}

/* 서브페이지 스크롤 시 또는 특수페이지용 어두운 Navbar 배경 */
.navbar.nav-solid-bg {
    background-color: rgba(3, 3, 3, 0.85);
}

#subgnb {
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.subTDM {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* 현재 페이지 큰 타이틀 */
.subTD2 a h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color, #1e1e1e);
    margin: 0;
    line-height: 1.2;
}

/* 3차 메뉴 가로 나열 */
.subTD3 ul {
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.subTD3 ul a {
    text-decoration: none;
}

.subTD3 ul li h1 {
    font-size: 1.125rem;
    font-weight: 400;
    color: #666;
    margin: 0;
    transition: color 0.2s ease;
}

.subTD3 ul li:hover h1,
.subTD3 ul li.active h1 {
    color: var(--accent-color, #E8E06A);
    font-weight: 700;
}

/* 4차 메뉴 (탭 스타일 - depth4) */
.depth4 {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 2.5rem;
    padding: 0;
    flex-wrap: wrap;
}

.depth4 li {
    list-style: none;
}

.depth4 li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; /* border 겹침 처리 */
    transition: all 0.2s ease;
}

.depth4 li:hover a,
.depth4 li.active a {
    color: var(--primary-color, #1e1e1e);
    border-bottom-color: var(--accent-color, #E8E06A);
    font-weight: 700;
}

/* 로그인/회원가입 등 특수 페이지 상단 블랙 바 대응 */
#topbar.black, #topbar_m.black {
    background-color: var(--primary-color, #1e1e1e);
    color: #fff;
}

/* Footer */
.footer-section {
    background: #141414; padding: 5rem 2.5rem; position: relative;overflow:hidden;
}

.footer-container {
    max-width: 1410px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start;
}

.footer-left { display: flex; flex-direction: column; gap: 2.5rem; }
.footer-logo { height: 5rem; width: auto; align-self: flex-start; }
.footer-copyright { font-size: 1rem; font-weight: 300; color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer-right { display: flex; flex-direction: column; gap: 2rem; }
.footer-block { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-label { font-size: 1.25rem; font-weight: 700; color: #ffffff; letter-spacing: 0.1em; }
.footer-content { font-size: 1.125rem; color: rgba(255,255,255,0.65); line-height: 1.7; }

/* Responsive Layout */
@media (min-width: 1600px) {
    .container { width: 1600px; }
}

@media (max-width:1499px) {
    .nav-item > a {font-size:1rem;}

}

@media (max-width:1199px) {
    .nav-menu { gap: 1rem; }
    .nav-menu a { font-size: 1rem; }
    .mega-menu-container { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
	.footer-container { gap: 3rem; }
}

@media (max-width:992px) {
    /* 모바일 햄버거 메뉴를 위해 데스크탑 메뉴 숨김 */
    .nav-menu { display: none; }
}

@media (max-width:767px) {
    html {font-size: 16px;}

    .sub-page-wrapper {
        padding-top: 8.5rem; /* 모바일 Navbar 높이에 맞춤 */
    }
    .auth-page-wrapper {
        padding-top: 80px;
    }
    #subgnb {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    .subTDM {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .subTD2 a h1 {
        font-size: 1.75rem;
    }
    .subTD3 ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .depth4 li a {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    .navbar { padding: 0 1.25rem; height:5.5rem;}
    .mega-menu-overlay { top: 4.5rem; padding: 3rem 1.5rem; }
    .mega-menu-container { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .mega-bg-logo { right: -15%; bottom: -5%; height: 40vh; }
    .footer-section { padding: 3.25rem 1.25rem; }
    .footer-container { grid-template-columns: 1fr; gap: 3rem; }
    .footer-logo { height: 3.75rem; }
    #subgnbD{margin:0 15px;}
}

@media (max-width:320px) {
    .mega-menu-container { grid-template-columns: 1fr; gap: 1.5rem; }
}