/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0
Description: GeneratePress Child Theme - Toss Feed Style
*/

/* =====================
   전체 기본 스타일
   ===================== */
body {
    background-color: #ffffff;
    color: #191f28;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

/* =====================
   헤더
   ===================== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 200;
}

.inside-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.main-navigation a {
    color: #191f28;
    font-size: 15px;
    font-weight: 500;
}

.main-navigation a:hover {
    color: #0056b3;
}

/* =====================
   글 목록 레이아웃
   ===================== */

/* 사이드바 숨기기 */
.blog .widget-area,
.archive .widget-area,
.home .widget-area {
    display: none !important;
}

.blog .content-area,
.archive .content-area,
.home .content-area {
    width: 100% !important;
    float: none !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    box-sizing: border-box;
}

/* 그리드: site-main 직접 타겟 */
.blog .site-main,
.archive .site-main,
.home .site-main {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    padding: 0 !important;
    max-width: none !important;
}

/* 페이지네이션은 풀 너비로 */
.blog .site-main > .page-numbers,
.blog .site-main > nav,
.archive .site-main > .page-numbers,
.archive .site-main > nav,
.home .site-main > nav {
    grid-column: 1 / -1 !important;
}

/* posts-container 방식도 지원 */
.posts-container {
    display: contents;
}

/* =====================
   카드 스타일
   ===================== */
.blog article.post,
.archive article.post,
.home article.post {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.blog article.post:hover,
.archive article.post:hover,
.home article.post:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* inside-article: 이미지 위로 올리기 위해 flex 사용 */
.blog .inside-article,
.archive .inside-article,
.home .inside-article,
.separate-containers .blog .inside-article,
.separate-containers .archive .inside-article {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* post-image 맨 위로 */
.blog .post-image,
.archive .post-image,
.home .post-image {
    order: -1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 썸네일을 맨 위로 */
.blog .post-image,
.archive .post-image,
.home .post-image {
    order: -1;
}

/* 썸네일 래퍼 - 비율 고정 */
.blog article.post .post-image,
.archive article.post .post-image,
.home article.post .post-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

/* 썸네일 이미지 */
.blog article.post .post-image img,
.archive article.post .post-image img,
.home article.post .post-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block;
}

/* 제목/본문 영역 패딩 */
.blog .entry-header,
.archive .entry-header,
.home .entry-header,
.blog .entry-summary,
.archive .entry-summary,
.home .entry-summary,
.blog .entry-footer,
.archive .entry-footer,
.home .entry-footer {
    padding: 0 16px;
}

.blog .entry-header,
.archive .entry-header,
.home .entry-header {
    padding-top: 14px;
}

.blog .entry-footer,
.archive .entry-footer,
.home .entry-footer {
    padding: 0 16px 16px;
}

/* 카드 제목 */
.blog .entry-title,
.archive .entry-title,
.home .entry-title {
    font-size: 20px !important;
    font-weight: 700;
    line-height: 1.4;
    margin: 8px 0 6px;
    color: #191f28;
}

.blog .entry-title a,
.archive .entry-title a,
.home .entry-title a {
    color: #191f28;
    text-decoration: none;
}

.blog .entry-title a:hover,
.archive .entry-title a:hover,
.home .entry-title a:hover {
    color: #0056b3;
}

/* 카드 요약 숨기기 */
.blog .entry-summary,
.archive .entry-summary,
.home .entry-summary {
    display: none;
}

/* 날짜 */
.blog .entry-meta,
.archive .entry-meta,
.home .entry-meta {
    font-size: 13px;
    color: #989898;
}

/* 작성자, 댓글 숨기기 */
.blog .byline,
.archive .byline,
.home .byline,
.blog .author-avatar,
.archive .author-avatar,
.home .author-avatar,
.blog .comments-link,
.archive .comments-link,
.home .comments-link,
.blog .entry-footer .cat-links ~ *,
.archive .entry-footer .cat-links ~ * {
    display: none !important;
}

/* 카테고리 태그 스타일 */
.blog .cat-links,
.archive .cat-links,
.home .cat-links {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #989898;
    background: none;
    padding: 0 0 0 16px;
    border-radius: 0;
    margin-bottom: 8px;
    text-decoration: none;
}

.blog .cat-links a,
.archive .cat-links a,
.home .cat-links a {
    color: #989898 !important;
    text-decoration: none;
}

/* 카테고리 폴더 아이콘 숨기기 */
.cat-links .gp-icon,
.cat-links svg,
.entry-footer .gp-icon {
    display: none !important;
}

/* =====================
   아티클 페이지
   ===================== */

/* 3컬럼 레이아웃 */
.single .inside-article {
    position: relative;
}

.single .entry-content {
    position: relative;
    z-index: 1;
}

/* 왼쪽 액션 버튼 */
.article-actions {
    position: fixed;
    left: max(20px, calc(50% - 460px));
    top: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    gap: 0;
    transition: box-shadow 0.2s;
    color: #636363;
    font-size: 0;
}

.action-btn:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #d0d0d0;
    color: #191f28;
}

.action-btn svg {
    width: 22px;
    height: 22px;
}

/* 오른쪽 목차 */
.article-toc {
    position: fixed;
    right: max(20px, calc(50% - 570px));
    top: 200px;
    width: 180px;
    z-index: 50;
    max-height: 60vh;
    overflow-y: auto;
}

.toc-title {
    font-size: 13px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #191f28;
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc ul li {
    margin-bottom: 8px;
}

.article-toc ul li a {
    font-size: 13px;
    color: #989898;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.15s;
}

.article-toc ul li a:hover,
.article-toc ul li a.active {
    color: #0056b3;
    font-weight: 600;
}

.article-toc ul li.toc-h3 a {
    padding-left: 12px;
    font-size: 12px;
}

@media (max-width: 1280px) {
    .article-actions,
    .article-toc {
        display: none;
    }
}


.single .content-area {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    max-width: none !important;
}

.single .widget-area {
    display: none !important;
}

.single .inside-article {
    padding: 0 !important;
}

/* 작성자 숨기기 */
.single .byline {
    display: none !important;
}

/* 관련글 네비게이션 숨기기 */
.single .post-navigation,
.single .paging-navigation {
    display: none !important;
}

/* 카테고리 본문 라인에 맞추기 */
.single .entry-footer {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 32px 48px;
}

.single .entry-footer .cat-links {
    font-size: 13px;
    color: #989898;
}

.single .entry-footer .cat-links a {
    color: #989898 !important;
    text-decoration: none;
}

/* 히어로 영역 */
.single .featured-image {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}

.single .featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    display: block;
}

.single .featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
    pointer-events: none;
    z-index: 1;
}

/* 히어로 위 제목 */
.single .entry-header {
    position: relative;
    max-width: 760px;
    margin: -160px auto 0;
    padding: 0 32px 48px;
    z-index: 10;
}

.single .entry-title {
    font-size: 40px !important;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff !important;
    margin-bottom: 12px;
}

.single .entry-meta {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}

/* 본문 */
.single .entry-content {
    max-width: 700px !important;
    margin: 48px auto !important;
    padding: 0 32px !important;
    font-size: 17px;
    line-height: 1.8;
    color: #191f28;
    width: 100% !important;
    box-sizing: border-box;
}

.single .entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 48px 0 16px;
    color: #000000;
}

.single .entry-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 12px;
}

.single .entry-content p {
    margin-bottom: 24px;
}

.single .entry-content img {
    width: 100% !important;
    border-radius: 16px;
    margin: 24px 0;
    height: auto !important;
}

/* 하이라이트 박스 */
.single .entry-content blockquote {
    background: rgba(63, 213, 153, 0.15);
    border: none !important;
    border-radius: 16px;
    padding: 24px 32px;
    margin: 32px 0;
    font-size: 17px;
    color: #191f28;
}

/* =====================
   반응형
   ===================== */
@media (max-width: 1024px) {
    .blog .site-main,
    .archive .site-main,
    .home .site-main {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .blog .site-main,
    .archive .site-main,
    .home .site-main {
        grid-template-columns: 1fr !important;
    }

    .single .entry-title {
        font-size: 28px !important;
    }

    .single .entry-content {
        font-size: 16px;
        padding: 0 20px;
    }

    .single .entry-header {
        padding: 0 20px 32px;
    }
}
