/* main.css */
@charset "UTF-8";
@import url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy.css');

@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&family=Nanum+Myeongjo:wght@400;700&display=swap');
@font-face { font-family: 'NanumBarunGothic';src: url('/assets/fonts/NanumBarunGothic.eot');
    src: url('/assets/fonts/NanumBarunGothic.eot') format('embedded-opentype'),
    url('/assets/fonts/NanumBarunGothic.woff') format('woff');}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Paperlogy', serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #222222;
    background-color: #f8f9fa;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(67, 89, 113, 0);
}

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;
}

@media (min-width: 768px) {
    .mo-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }
}

.d-flex {
    display: flex !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

/* ======================================
 * 헤더 (모바일 햄버거 버튼용)
 * ====================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    display: none;
    align-items: center;
    padding: 0 20px;
    z-index: 1001;
}

@media (max-width: 991px) {
    .header {
        display: flex;
    }
}

.header-left {
    display: flex;
    align-items: center;
}

/* 모바일 햄버거 버튼 */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ======================================
 * 사이드바 스타일
 * ====================================== */
.sidebar {
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #e8ecff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(2, 14, 226, 0.05);
}

/* 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(2, 14, 226, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(2, 14, 226, 0.3);
}

/* 모바일에서 사이드바 숨김 */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-active {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
}

/* 사이드바 로고 */
.sidebar-logo {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #e8ecff;
    text-align: center;
    background: white;
}

.sidebar-logo img {
    height: 40px;
    transition: transform 0.3s ease;
}

.sidebar-logo a:hover img {
    transform: scale(1.05);
}

/* 사이드바 네비게이션 */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

/* 사이드바 섹션 */
.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section:last-child {
    margin-bottom: 20px;
}

.sidebar-section-title {
    padding: 0 24px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #6b7280;
    position: relative;
}

.sidebar-section-title::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(2, 14, 226, 0.1) 0%, transparent 100%);
}

/* 사이드바 메뉴 */
.sidebar-menu {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.sidebar-menu-item {
    margin: 4px 12px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    border-radius: 0 3px 3px 0;
    transition: height 0.25s ease;
}

.sidebar-menu-link:hover {
    background: linear-gradient(135deg, rgba(2, 14, 226, 0.08), rgba(93, 102, 255, 0.08));
    color: #020ee2;
    transform: translateX(4px);
}

.sidebar-menu-link:hover::before {
    height: 60%;
}

.sidebar-menu-link.active {
    background: linear-gradient(135deg, rgba(2, 14, 226, 0.12), rgba(93, 102, 255, 0.12));
    color: #020ee2;
    font-weight: 600;
}

.sidebar-menu-link.active::before {
    height: 70%;
}

.sidebar-menu-link.active .sidebar-menu-icon {
    transform: scale(1.1);
}

/* disabled 메뉴 스타일 */
.sidebar-menu-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-menu-link.disabled:hover {
    background: transparent;
    color: #4b5563;
    transform: none;
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.sidebar-menu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 블로그 리뷰 하위 메뉴 */
.sidebar-submenu-arrow {
    margin-left: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: transform 0.25s ease, color 0.25s ease;
    flex-shrink: 0;
}

.sidebar-parent-link:hover .sidebar-submenu-arrow {
    color: #020ee2;
}

.sidebar-parent-link.sidebar-submenu-collapsed .sidebar-submenu-arrow {
    transform: rotate(-90deg);
}

.sidebar-submenu {
    list-style-type: none;
    margin: 6px 0 0;
    padding: 0 0 0 34px;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.sidebar-submenu.sidebar-submenu-closed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.sidebar-submenu-item {
    margin: 4px 0;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-submenu-link:hover {
    background: linear-gradient(135deg, rgba(2, 14, 226, 0.06), rgba(93, 102, 255, 0.06));
    color: #020ee2;
    transform: translateX(4px);
}

.sidebar-submenu-link.active {
    background: linear-gradient(135deg, rgba(2, 14, 226, 0.10), rgba(93, 102, 255, 0.10));
    color: #020ee2;
    font-weight: 600;
}

.sidebar-submenu-bullet {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(2, 14, 226, 0.25);
    margin-right: 10px;
    flex-shrink: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.sidebar-submenu-link:hover .sidebar-submenu-bullet {
    background: rgba(2, 14, 226, 0.55);
    transform: scale(1.15);
}

.sidebar-submenu-link.active .sidebar-submenu-bullet {
    background: linear-gradient(135deg, #020ee2, #5d66ff);
}

.sidebar-submenu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 출시 예정 뱃지 */
.coming-soon-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* 사이드바 하단 메뉴 */
.sidebar-footer {
    border-top: 1px solid #e8ecff;
    background: white;
    padding: 16px 12px;
}

.sidebar-footer-menu {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.sidebar-footer-item {
    margin: 4px 0;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-size: 13px;
    font-weight: 500;
}

.sidebar-footer-link:hover {
    background: linear-gradient(135deg, rgba(2, 14, 226, 0.08), rgba(93, 102, 255, 0.08));
    color: #020ee2;
}

.sidebar-footer-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-footer-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 모바일 오버레이 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ======================================
 * 메인 컨텐츠 스타일
 * ====================================== */
.main-content {
    padding: 20px;
    transition: all 0.3s ease;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    .main-content {
        padding-left: 280px;
    }
}

@media (max-width: 991px) {
    .main-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}
