/*
Theme Name: KangStock GeneratePress Child
Template: generatepress
Description: 캉주식 - 한국 주식 뉴스 및 투자 정보
Version: 1.0
Author: 캉주식
Text Domain: kangstock-child
*/

/* ========================================
   Global
   ======================================== */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    background: #f5f5f5;
    font-size: 16px;
    line-height: 1.8;
}

a {
    color: #0056b3;
    text-decoration: none;
}
a:hover {
    color: #003d80;
}

/* ========================================
   Header - 뉴스 마스트헤드 스타일
   ======================================== */
.site-header {
    background: #ffffff;
    border-bottom: 3px solid #1a1a1a;
    box-shadow: none;
}

.main-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.main-title a,
.main-title a:hover {
    color: #1a1a1a;
    text-decoration: none;
}

.site-description {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ========================================
   Navigation - 다크 네비게이션 바
   ======================================== */
.main-navigation {
    background: #1a1a1a;
}
.main-navigation .main-nav ul li a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 0 16px;
    line-height: 48px;
    transition: background 0.2s;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item a,
.main-navigation .main-nav ul li.current_page_ancestor a {
    background: #c62828;
    color: #ffffff;
}

/* Sub-menu */
.main-navigation .main-nav ul ul {
    background: #2a2a2a;
    border: none;
}
.main-navigation .main-nav ul ul li a {
    font-size: 13px;
    line-height: 40px;
}
.main-navigation .main-nav ul ul li a:hover {
    background: #c62828;
}

/* Mobile menu toggle */
.menu-toggle,
.menu-toggle:hover {
    background: #1a1a1a;
    color: #ffffff;
}

/* ========================================
   Layout
   ======================================== */
.grid-container {
    max-width: 1200px;
}

.site-content {
    background: #ffffff;
    padding: 30px;
    margin-top: 0;
}

/* Archive/Home: 사이드바 숨김 - 풀 너비 */
.archive .site-content .content-area,
.home .site-content .content-area,
.blog .site-content .content-area {
    width: 100%;
}
.archive #right-sidebar,
.home #right-sidebar,
.blog #right-sidebar {
    display: none;
}

/* Single: 사이드바 유지 */
.single .site-content .content-area {
    width: 70%;
}

/* ========================================
   Archive / Blog 목록 - 뉴스 그리드 스타일
   ======================================== */
.archive #main,
.home #main,
.blog #main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 네비게이션(페이지네이션) 풀 너비 */
.archive #main .paging-navigation,
.home #main .paging-navigation,
.blog #main .paging-navigation {
    grid-column: 1 / -1;
}

.archive #main article,
.home #main article,
.blog #main article {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}
.archive #main article:hover,
.home #main article:hover,
.blog #main article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 썸네일 */
.archive #main article .post-image,
.home #main article .post-image,
.blog #main article .post-image {
    margin-bottom: 0;
}
.archive #main article .post-image img,
.home #main article .post-image img,
.blog #main article .post-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* 콘텐츠 영역 */
.archive #main article .inside-article,
.home #main article .inside-article,
.blog #main article .inside-article {
    padding: 16px;
}

/* 카테고리 뱃지 */
.cat-links a {
    background: #c62828;
    color: #fff !important;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 6px;
}
.cat-links a:hover {
    background: #a51d1d;
}

/* 제목 */
.archive #main article .entry-title,
.home #main article .entry-title,
.blog #main article .entry-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.archive #main article .entry-title a,
.home #main article .entry-title a,
.blog #main article .entry-title a {
    color: #1a1a1a;
}
.archive #main article .entry-title a:hover,
.home #main article .entry-title a:hover,
.blog #main article .entry-title a:hover {
    color: #c62828;
}

/* 메타 */
.archive #main article .entry-meta,
.home #main article .entry-meta,
.blog #main article .entry-meta {
    font-size: 12px;
    color: #999;
}

/* 요약 */
.archive #main article .entry-summary p,
.home #main article .entry-summary p,
.blog #main article .entry-summary p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-top: 8px;
}

/* ========================================
   Single Post - 기사 스타일
   ======================================== */
.single .entry-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1a1a1a;
}

.single .entry-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.03em;
    color: #1a1a1a;
}

.single .entry-meta {
    font-size: 13px;
    color: #888;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.single .entry-content {
    font-size: 17px;
    line-height: 2.0;
    color: #333;
}
.single .entry-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid #c62828;
    letter-spacing: -0.02em;
}
.single .entry-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}
.single .entry-content p {
    margin-bottom: 20px;
}
.single .entry-content img {
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}
.single .entry-content blockquote {
    border-left: 4px solid #c62828;
    margin: 24px 0;
    padding: 16px 20px;
    background: #fafafa;
    font-style: normal;
    color: #555;
}

/* 태그 */
.single .entry-meta .tags-links a {
    background: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    margin: 2px;
    display: inline-block;
}
.single .entry-meta .tags-links a:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ========================================
   Sidebar
   ======================================== */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
}
.widget-title {
    font-size: 15px;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #1a1a1a;
    letter-spacing: -0.02em;
}

/* ========================================
   Footer
   ======================================== */
.site-info {
    background: #1a1a1a;
    color: #aaa;
    padding: 30px 0 20px;
    font-size: 13px;
}
.site-info a {
    color: #ccc;
}
.site-info a:hover {
    color: #fff;
}

/* Footer navigation */
.footer-navigation {
    text-align: center;
    padding: 0 0 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
}
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-menu li {
    display: inline;
}
.footer-menu li:not(:last-child)::after {
    content: '|';
    color: #555;
    margin: 0 14px;
    font-size: 12px;
}
.footer-menu li a {
    color: #bbb;
    text-decoration: none;
    font-size: 13px;
}
.footer-menu li a:hover {
    color: #ffffff;
}

.copyright-bar {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 10px;
}

/* ========================================
   Page - 법적 페이지 스타일
   ======================================== */
.page .entry-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: #1a1a1a;
}
.page .entry-content h3 {
    font-size: 17px;
    font-weight: 600;
    margin-top: 24px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .archive #main,
    .home #main,
    .blog #main {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .archive #main,
    .home #main,
    .blog #main {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .single .entry-title {
        font-size: 22px;
    }
    .single .entry-content {
        font-size: 16px;
        line-height: 1.9;
    }
    .single .site-content .content-area {
        width: 100%;
    }
    .single #right-sidebar {
        display: none;
    }
    .site-content {
        padding: 16px;
    }
    .main-title {
        font-size: 22px;
    }
    .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .footer-menu li:not(:last-child)::after {
        display: none;
    }
}
