@charset "UTF-8";

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #1a1a1a;
    font-family: 'Pretendard', sans-serif;
    background-color: #fff;
    min-height: 100vh;
    padding-bottom: 0;
    -webkit-text-size-adjust: 100%;
}

ol,
ul {
    padding: 0;
    margin: 0;
}

b,
strong {
    font-weight: 700;
}

a {
    color: #222;
    text-decoration: none;
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
    margin: 0;
}

th {
    font-weight: 500;
    text-align: inherit;
    text-align: -webkit-match-parent;
}

thead,
tbody,
tfoot,
tr,
td,
th {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

label {
    display: inline-block;
}

button {
    color: #464a53;
    border: none;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
}

button:focus:not(:focus-visible) {
    outline: 0;
}

input,
button,
select,
optgroup,
textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* ══════════════════════════════════════
   헤더 – 중앙 로고 + 하단 메뉴 구조
   ══════════════════════════════════════ */

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
}

/* 상단 로고 영역 */
.header-top {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.3rem 10% 0.9rem;
    position: relative;
}

/* ── 좌상단 소개(info) 아이콘 + 텍스트 ── */
.header-info {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.header-info:hover {
    color: #e60012;
    background-color: #fef5f5;
}

.header-info svg {
    flex-shrink: 0;
}

.header-info-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* logo-group : 링크 처리 */
a.logo-group {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a.logo-group:hover {
    opacity: 0.75;
}

.logo {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    display: flex;
    align-items: baseline;
}

.logo .webzine {
    font-weight: 300;
    color: #888;
    margin-right: 7px;
    font-size: 0.82rem;
}

.logo .brand-name {
    font-size: 1.6rem;
    letter-spacing: -1px;
}

.logo span.point-red {
    color: #e60012;
    font-size: 3.4rem;
    line-height: 0.7;
    margin-left: 2px;
    position: relative;
    top: 10px;
}

.web-url {
    font-size: 0.8rem;
    color: #777;
    letter-spacing: 0.02rem;
    border-left: 1px solid #ddd;
    padding-left: 13px;
    margin-top: 8px;
    font-weight: 500;
    font-family: 'Pretendard', sans-serif;
}

/* ── PC 로그인 버튼 ── */
.header-login {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    letter-spacing: -0.2px;
    padding: 0.35rem 1rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
    white-space: nowrap;
}

.header-login:hover {
    color: #e60012;
    border-color: #e60012;
    background-color: #fef5f5;
}

/* 로그인 상태 우상단 사용자 메뉴 */
.header-user {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
}

.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    letter-spacing: -0.2px;
    padding: 0.35rem 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
    white-space: nowrap;
}

.header-user-btn:hover,
.header-user.open .header-user-btn {
    color: #e60012;
    border-color: #e60012;
    background-color: #fef5f5;
}

.header-user-name {
    font-weight: 700;
    color: #111;
}

.header-user-btn:hover .header-user-name,
.header-user.open .header-user-btn .header-user-name {
    color: #e60012;
}

.header-user-arrow {
    transition: transform 0.2s;
}

.header-user.open .header-user-arrow {
    transform: rotate(180deg);
}

.header-user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 1000;
}

.header-user:hover .header-user-menu,
.header-user.open .header-user-menu,
.header-user:focus-within .header-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-user-menu-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.header-user-menu-link:hover {
    background: #fef5f5;
    color: #e60012;
}

/* 모바일 사이드바 사용자 인사 */
.sidebar-user-greeting {
    padding: 14px 20px 6px;
    font-size: 0.95rem;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
    list-style: none;
}

.sidebar-user-greeting .sidebar-user-name {
    font-weight: 700;
    color: #111;
}

@media (max-width: 768px) {
    .header-user {
        display: none;
    }
}

/* 하단 네비게이션 메뉴 바 */
.header-nav {
    width: 100%;
    border-top: 1px solid #eee;
    border-bottom: 2px solid #222;
    background: #fff;
}

.header-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.header-nav ul li {
    position: relative;
}

.header-nav ul li a {
    display: block;
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    letter-spacing: -0.3px;
    color: #333;
    transition: color 0.2s, background-color 0.2s;
    position: relative;
}

.header-nav ul li a:hover {
    color: #e60012;
    background-color: #fafafa;
}

.header-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: #e60012;
    transition: transform 0.25s ease;
}

.header-nav ul li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ── PC 메뉴 active 상태 ── */
.header-nav ul li a.active {
    color: #e60012;
}

.header-nav ul li a.active::after {
    transform: translateX(-50%) scaleX(1);
    background: #e60012;
}

/* ══════════════════════════════════════
   PC 드롭다운 메뉴
   ══════════════════════════════════════ */

.header-nav ul li.has-dropdown > a.nav-main-link {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 드롭다운 화살표 – CSS 삼각형 */
.header-nav ul li.has-dropdown > a.nav-main-link .nav-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid #999;
    margin-left: 4px;
    transition: transform 0.2s, border-top-color 0.2s;
}

.header-nav ul li.has-dropdown:hover > a.nav-main-link .nav-arrow {
    transform: rotate(180deg);
    border-top-color: #e60012;
}

/* active 상태에서도 화살표 색상 */
.header-nav ul li.has-dropdown > a.nav-main-link.active .nav-arrow {
    border-top-color: #e60012;
}

/* 드롭다운 패널 – 좌측 정렬 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: 2px solid #222;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 6px 6px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1010;
    white-space: nowrap;
}

.header-nav ul li.has-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 드롭다운이 비어있으면 표시하지 않음 */
.dropdown-menu:empty {
    display: none;
}

.dropdown-item {
    display: block;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    letter-spacing: -0.2px;
}

/* 드롭다운 아이템의 기존 a::after 언더라인 제거 */
.dropdown-item::after {
    display: none !important;
}

.dropdown-item:hover {
    color: #e60012;
    background: #fafafa;
}

.dropdown-item-all {
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 2px;
}

.dropdown-item-all:hover {
    color: #e60012;
}

/* ── 햄버거 버튼 ── */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #111;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

/* 햄버거 → X 애니메이션 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── 사이드바 ── */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1050;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar.sidebar-active {
    left: 0;
}

.sidebar-inner {
    padding: 2.5rem 2rem;
}

.sidebar-logo {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-logo .webzine {
    font-weight: 300;
    color: #888;
    margin-right: 6px;
    font-size: 0.78rem;
}

.sidebar-logo .brand-name {
    font-size: 1.4rem;
    letter-spacing: -1px;
}

.sidebar-logo .point-red {
    color: #e60012;
    font-size: 2.8rem;
    line-height: 0.7;
    margin-left: 2px;
    position: relative;
    top: 8px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-nav li a.sidebar-menu-link {
    display: block;
    padding: 0.85rem 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    border-bottom: 1px solid #f4f4f4;
    letter-spacing: -0.3px;
    transition: color 0.2s, padding-left 0.2s;
}

.sidebar-nav li a.sidebar-menu-link:hover {
    color: #e60012;
    padding-left: 6px;
}

/* ── 모바일 사이드바 active 상태 ── */
.sidebar-nav li a.sidebar-menu-link.active {
    color: #e60012;
    padding-left: 6px;
    border-left: 3px solid #e60012;
}

/* ══════════════════════════════════════
   모바일 사이드바 서브메뉴 (아코디언)
   ══════════════════════════════════════ */

.sidebar-has-dropdown > a.sidebar-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-arrow {
    flex-shrink: 0;
    transition: transform 0.25s;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.sidebar-has-dropdown.sub-open .sidebar-arrow {
    transform: rotate(180deg);
    color: #e60012;
}

.sidebar-sub-menu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0;
}

.sidebar-has-dropdown.sub-open .sidebar-sub-menu {
    max-height: 600px;
}

.sidebar-sub-menu li a {
    display: block;
    padding: 9px 0 9px 18px;
    font-size: 0.88rem;
    font-weight: 400;
    color: #555;
    border-bottom: 1px solid #f8f8f8;
    transition: color 0.2s, padding-left 0.2s;
}

.sidebar-sub-menu li a:hover {
    color: #e60012;
    padding-left: 24px;
}

/* ── 오버레이 ── */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
    header {
        position: relative;
    }

    .header-nav {
        display: none;
    }

    .header-top {
        padding: 1rem 5%;
    }

    .web-url {
        display: none;
    }

    /* 모바일에서 PC 전용 요소 숨김 */
    .header-login {
        display: none;
    }

    .header-info {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* PC 드롭다운 모바일에서 숨김 */
    .dropdown-menu {
        display: none !important;
    }
}

footer {
    padding: 4rem 10%;
    background: #111;
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}