/* ============================================================================
   Insight Hub CSS - Modern Design
   ============================================================================ */
@import url("blogpost.css");

:root {
    --primary-color: #2d2d2d;
    --primary-light: #4a4a4a;
    --primary-dark: #1a1a1a;
    --accent-color: #c41e3a;
    --accent-light: #e63946;
    --text-primary: #222222;
    --text-secondary: #777777;
    --text-light: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #fafaf8;
    --bg-tertiary: #f5f5f3;
    --border-color: #e8e8e6;
    --border-light: #f0f0ee;
    --success-color: #2d5016;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.nav_menu {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav_menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    align-items: center;
}

.nav_menu li {
    display: flex;
    align-items: center;
}

.nav_menu a {
    display: block;
    padding: 12px 18px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    position: relative;
    text-transform: uppercase;
}

.nav_menu a::before {
    display: none;
}

.nav_menu a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav_menu ul {
        padding: 0 var(--spacing-sm);
    }
    
    .nav_menu a {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .nav_menu a::before {
        height: 2px;
    }
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* ============================================================================
   LOGO SECTION
   ============================================================================ */

.insight-logo {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.insight-logo img {
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.insight-logo a:hover img {
    transform: scale(1.05);
}

/* ============================================================================
   CATEGORIES NAVIGATION
   ============================================================================ */

.insight-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.cat-link {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cat-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.cat-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.insight-pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.pagination {
    list-style: none;
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li {
    display: inline-flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    background: var(--bg-primary);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   INSIGHT LIST PAGE
   ============================================================================ */

.insight-list {
    width: 100%;
}

.insight-list__header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.insight-list__header::before {
    display: none;
}

.insight-list__header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.insight-list__header p {
    color: var(--text-secondary);
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* ============================================================================
   INSIGHT CARD (Clean Box Style)
   ============================================================================ */

.insight-list__items {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.insight-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.insight-card:hover {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.insight-card__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/16;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
    flex-shrink: 0;
}

.insight-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.insight-card:hover .insight-card__thumb img {
    transform: scale(1.03);
}

.insight-card > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.insight-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.insight-card__title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insight-card:hover .insight-card__title a {
    color: var(--primary-color);
}

.insight-card__summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-card time {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: auto;
}
.ccg-lead{
    font-size: 1.1rem; font-weight: 500;
    color: var(--primary-color);
    margin: 50px 0 !important;
	line-height: 1.7;}

@media (max-width: 768px) {
    .insight-list__items {
        grid-template-columns: 1fr;
    }
    
    .insight-card__title {
        font-size: 0.95rem;
    }
    
    .insight-card__summary {
        font-size: 0.85rem;
    }
	.ccg-lead{
    font-size: 1rem; font-weight: 500;
    color: var(--primary-color);
    margin: 30px 0 !important;
	line-height: 1.7;}
}

.insight-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.insight-card:hover .insight-card__thumb img {
    transform: scale(1.08) rotate(0.5deg);
}

.insight-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.insight-card__title a {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s;
}

.insight-card__title a:hover {
    filter: brightness(1.2);
}

.insight-card__summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 var(--spacing-lg) var(--spacing-lg);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.insight-card time {
    font-size: 0.8rem;
    color: var(--text-light);
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    margin-top: auto;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .insight-list__header {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .insight-list__header h1 {
        font-size: 2.2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .insight-list__items {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    main {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

/* ============================================================================
   INSIGHT POST PAGE
   ============================================================================ */

.insight-post {
    background: var(--bg-primary);
}

.insight-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.insight-breadcrumb a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.insight-breadcrumb a:hover {
    color: var(--primary-light);
}

.insight-breadcrumb [aria-hidden="true"] {
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
}

.insight-post__header {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.insight-post__header::after {
    display: none;
}

.insight-post__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.1;
    letter-spacing: -1px;
}

.insight-post__date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.insight-post__body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2xl);
    max-width: 1168px;
}

/* 본문 내 요소들 */
.insight-post__body h1,
.insight-post__body h2,
.insight-post__body h3,
.insight-post__body h4,
.insight-post__body h5,
.insight-post__body h6 {
    font-weight: 700;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    line-height: 1.3;
    color: var(--text-primary);
}

.insight-post__body h1 { font-size: 1.8rem; }
.insight-post__body h2 { font-size: 1.5rem; }
.insight-post__body h3 { font-size: 1.3rem; }
.insight-post__body h4 { font-size: 1.1rem; }
.insight-post__body h5 { font-size: 1rem; }
.insight-post__body h6 { font-size: 0.95rem; }

.insight-post__body p {
    margin-bottom: var(--spacing-md);
}

.insight-post__body ul,
.insight-post__body ol {
    margin-bottom: var(--spacing-md);
    margin-left: var(--spacing-lg);
}

.insight-post__body li {
    margin-bottom: var(--spacing-sm);
}

.insight-post__body strong {
    font-weight: 700;
    color: var(--text-primary);
}

.insight-post__body em {
    font-style: italic;
}

.insight-post__body code {
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.insight-post__body blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
}

.insight-post__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.insight-post__body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-xl) 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.insight-post__body th {
    background: var(--primary-color);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 700;
    text-align: left;
    border: none;
    color: white;
    letter-spacing: 0.3px;
}

.insight-post__body td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.insight-post__body tr:last-child td {
    border-bottom: none;
}

.insight-post__body tr:hover {
    background: var(--bg-secondary);
}

/* ============================================================================
   RELATED POSTS
   ============================================================================ */

.insight-related {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
}

.insight-related::before {
    display: none;
}

.insight-related__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.insight-related__items {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
    position: relative;

    z-index: 1;
}

.insight-related__items li a,
.insight-related__item a {
    display: block;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

/* 썸네일 없는 옛 구조(텍스트만) 호환용 패딩 */
.insight-related__items li > a:only-child {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
}

/* 썸네일 영역 (16:9 비율 고정, CLS 방지) */
.insight-related__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 16;
    overflow: hidden;
    background: var(--bg-secondary);
}

.insight-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 제목 텍스트 영역 */
.insight-related__text {
    display: block;
    padding: var(--spacing-md);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.insight-related__items li a:hover,
.insight-related__item a:hover {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: none;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .insight-post__title {
        font-size: 1.8rem;
    }
    
    .insight-post__body {
        font-size: 0.95rem;
    }
    
    .insight-post__body h1 { font-size: 1.5rem; }
    .insight-post__body h2 { font-size: 1.3rem; }
    .insight-post__body h3 { font-size: 1.1rem; }
    
    .insight-related {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .insight-related__title {
        font-size: 1.2rem;
    }
    
    .insight-related__items {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-xl { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

/* ============================================================================
   HAMBURGER NAV (#nav-placeholder)
   ============================================================================ */

#nav-placeholder {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

/* 삼선 햄버거 버튼 */
.insight-hamburger {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.insight-hamburger:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-light);
}

.insight-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* 열린 상태: X 모양으로 변형 */
.insight-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.insight-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.insight-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 드롭다운 메뉴 */
.insight-nav-menu {
    position: absolute;
    top: 56px;
    right: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.insight-nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.insight-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.insight-nav-menu li {
    margin: 0;
}

.insight-nav-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: background 0.15s ease, color 0.15s ease;
}

.insight-nav-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    #nav-placeholder {
        top: 12px;
        right: 12px;
    }
    .insight-hamburger {
        width: 42px;
        height: 42px;
    }
    .insight-nav-menu {
        min-width: 180px;
        top: 52px;
    }
    .insight-nav-menu a {
        padding: 13px 16px;
    }
}

/* ============================================================================
   FOOTER (#footer-placeholder)
   ============================================================================ */

#footer-placeholder {
    display: block;
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) var(--spacing-md);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    text-align: center;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-secondary);
}

#footer-placeholder br {
    line-height: 2;
}

@media (max-width: 768px) {
    #footer-placeholder {
        padding: var(--spacing-lg) var(--spacing-sm);
        font-size: 12px;
        line-height: 1.8;
    }
}

/* ============================================================================
   PRINT
   ============================================================================ */

@media print {
    .nav_menu,
    #nav-placeholder {
        display: none;
    }
}
