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

/* =====================
   전체 기본 스타일
   ===================== */
body {
    scrollbar-gutter: stable;
    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: 10px !important;
    padding-bottom: 10px !important;
}

.has-inline-mobile-toggle .inside-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
}

.mobile-menu-control-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

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

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

/* 햄버거 메뉴 버튼 (모바일 토글만) */
.mobile-menu-control-wrapper .menu-toggle {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px;
    transition: background 0.2s;
    color: #191f28 !important;
    line-height: 1 !important;
}

.mobile-menu-control-wrapper .menu-toggle .gp-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
}

.mobile-menu-control-wrapper .menu-toggle:hover,
.mobile-menu-control-wrapper .menu-toggle:focus,
.mobile-menu-control-wrapper .menu-toggle:active {
    background: none !important;
    outline: none !important;
}

.mobile-menu-control-wrapper .menu-toggle .gp-icon svg {
    width: 20px;
    height: 20px;
}

/* 모바일 메뉴 열렸을 때 배경 흰색 */
#site-navigation.toggled,
#site-navigation.toggled .inside-navigation,
.has-inline-mobile-toggle #site-navigation.toggled {
    background: #ffffff !important;
}

#site-navigation.toggled .main-nav ul li a {
    background: #ffffff !important;
    color: #191f28 !important;
}

#site-navigation.toggled .main-nav ul li a:hover {
    color: #0056b3 !important;
}

/* GP가 768px 이하에서 중복 표시하는 두 번째 햄버거 숨기기 */
#site-navigation > .inside-navigation > .menu-toggle {
    display: none !important;
}

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

.site-content .content-area,
.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 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: #666666;
}

/* 작성자, 댓글 숨기기 */
.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: #666666;
    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: #666666 !important;
    text-decoration: none;
}

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

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


/* 헤더-히어로 사이 여백 제거 */
.single .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.single.separate-containers .site-main > article {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

.single.separate-containers .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.single .site {
    padding-top: 0 !important;
}

.single .featured-image {
    margin-top: 0 !important;
}

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

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

/* 3열 레이아웃 */
.article-layout {
    display: grid;
    grid-template-columns: 1fr minmax(0, 700px) 1fr;
    width: 100%;
    margin: 0 auto;
    gap: 0;
    align-items: start;
}

.article-layout-left {
    position: sticky;
    top: 100px;
    justify-self: center;
    padding-top: 80px;
}

.article-layout-right {
    position: sticky;
    top: 100px;
    padding-top: 80px;
    padding-left: 40px;
}

.article-layout-center .entry-content {
    max-width: 700px !important;
    margin: 80px auto 48px !important;
    padding: 0 32px !important;
}


/* 오른쪽 목차 */
.article-toc {
    width: 180px;
    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: #666666;
    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;
}




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

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

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

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

/* 아티클 페이지 footer 숨기기 */
.single footer.entry-meta {
    display: none !important;
}

/* 히어로 영역 숨김 */
.single .featured-image {
    display: none;
}

/* 제목 */
.single .entry-header {
    max-width: 700px;
    margin: 48px auto 0;
    padding: 0 32px;
    text-align: left;
}

.single .entry-title {
    font-size: 36px !important;
    font-weight: 800;
    line-height: 1.3;
    color: #191f28 !important;
    margin-bottom: 12px;
    word-break: keep-all;
}

.single .entry-meta {
    color: #6b7684;
    font-size: 14px;
}

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

.single .entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 64px 0 24px;
    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 a {
    color: #191f28;
    text-decoration: none;
    border-bottom: 1px solid #d0d0d0;
    transition: border-color 0.2s;
}

.single .entry-content a:hover {
    border-bottom-color: #191f28;
}

/* 하이라이트 박스 */
.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;
}

/* =====================
   반응형 - 3열 레이아웃 축소
   ===================== */
@media (max-width: 1280px) {
    .article-layout {
        display: block;
    }
    .article-layout-left,
    .article-layout-right {
        display: none;
    }
    .article-layout-center .entry-content {
        margin: 48px auto 32px !important;
    }
}

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

    .site-content .content-area,
    .blog .content-area,
    .archive .content-area,
    .home .content-area {
        padding: 32px 20px;
    }
}

/* =====================
   반응형 - 모바일
   ===================== */
@media (max-width: 640px) {
    /* 글 목록 - 리스트형 */
    .site-content .content-area,
    .blog .content-area,
    .archive .content-area,
    .home .content-area {
        padding: 0 20px;
    }

    .blog .site-main,
    .archive .site-main,
    .home .site-main {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* 카드 → 리스트 아이템 */
    .blog article.post,
    .archive article.post,
    .home article.post {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        background: transparent;
        overflow: visible;
    }

    .blog article.post:hover,
    .archive article.post:hover,
    .home article.post:hover {
        transform: none;
        box-shadow: none;
    }

    /* inside-article: 세로 쌓기 + 우측 썸네일 공간 확보 */
    .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;
        justify-content: center;
        padding: 20px 0 !important;
        padding-right: 116px !important;
        min-height: 100px;
    }

    /* 카테고리 (footer.entry-meta) 제목 위로 */
    .blog footer.entry-meta,
    .archive footer.entry-meta,
    .home footer.entry-meta {
        padding: 0 !important;
        order: -2 !important;
    }

    /* 제목+날짜 */
    .blog .entry-header,
    .archive .entry-header,
    .home .entry-header {
        padding: 0 !important;
        min-width: 0;
    }

    /* 카테고리 */
    .blog .cat-links,
    .archive .cat-links,
    .home .cat-links {
        padding: 0;
        font-size: 13px;
        margin-bottom: 2px;
    }

    /* 제목 */
    .blog .entry-title,
    .archive .entry-title,
    .home .entry-title {
        font-size: 15px !important;
        line-height: 1.4;
        margin: 2px 0 4px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 날짜 */
    .blog .entry-meta,
    .archive .entry-meta,
    .home .entry-meta {
        font-size: 13px;
        color: #666666;
        margin: 0 !important;
    }

    /* 썸네일 오른쪽 정사각형 */
    .blog .post-image,
    .archive .post-image,
    .home .post-image {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .blog article.post,
    .archive article.post,
    .home article.post {
        position: relative;
    }



    .blog article.post .post-image,
    .archive article.post .post-image,
    .home article.post .post-image {
        width: 100px;
        height: 100px;
        aspect-ratio: auto;
        border-radius: 12px;
        overflow: hidden;
    }

    .blog article.post .post-image img,
    .archive article.post .post-image img,
    .home article.post .post-image img {
        border-radius: 12px !important;
    }

    /* 제목 */
    .single .entry-header {
        margin-top: 24px;
        padding: 0 20px;
    }

    .single .entry-title {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .single .entry-meta {
        font-size: 13px;
    }

    /* 본문 */
    .single .entry-content {
        font-size: 18px;
        line-height: 1.8;
        padding: 0 20px !important;
        margin: 40px auto 32px !important;
    }

    .single .entry-content h2 {
        font-size: 22px;
        margin: 48px 0 20px;
    }

    .single .entry-content h3 {
        font-size: 20px;
        margin: 28px 0 10px;
    }

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

    .single .entry-content img {
        border-radius: 12px;
        margin: 20px 0;
    }

    .single .entry-content blockquote {
        padding: 20px;
        margin: 24px 0;
        border-radius: 12px;
    }

    .article-layout-center .entry-content {
        margin: 40px auto 32px !important;
        padding: 0 20px !important;
    }

    /* 댓글 영역 */
    .single .comments-area {
        padding: 0 20px;
        margin-bottom: 48px;
    }

    .single .comments-area .comments-title,
    .single .comments-area .comment-reply-title {
        font-size: 18px;
    }

    .single .comment-form .comment-form-author,
    .single .comment-form .comment-form-email {
        width: 100%;
        margin-right: 0;
    }

    .single .comment-form .form-submit input[type=submit] {
        width: 100%;
    }
}


/* =====================
   관련 글 추천 섹션
   ===================== */
.related-posts-box {
    max-width: 700px;
    margin: 48px auto 0;
    padding: 36px 32px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    background: #ffffff;
    box-sizing: border-box;
}

.related-posts-header {
    margin-bottom: 20px;
}

.related-posts-label {
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    display: block;
    margin-bottom: 8px;
}

.related-posts-title {
    font-size: 22px;
    font-weight: 800;
    color: #191f28;
    margin: 0;
    line-height: 1.3;
}

.related-posts-divider {
    height: 1px;
    background: #f0f0f0;
    margin-bottom: 20px;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.related-posts-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
}

.related-posts-num {
    font-size: 15px;
    font-weight: 600;
    color: #b0b8c1;
    flex-shrink: 0;
}

.related-posts-list li a {
    font-size: 17px;
    font-weight: 600;
    color: #191f28;
    text-decoration: none;
    line-height: 1.4;
    word-break: keep-all;
    border-bottom: none;
}

.related-posts-list li a:hover {
    text-decoration: underline;
}

.related-posts-footer {
    text-align: center;
}

.related-posts-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #4a6cf7;
    color: #ffffff !important;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: background 0.2s;
}

.related-posts-btn:hover {
    background: #3a5ce5;
}

@media (max-width: 640px) {
    .related-posts-box {
        margin: 32px 20px 0;
        padding: 28px 20px;
        border-radius: 16px;
    }

    .related-posts-title {
        font-size: 20px;
    }

    .related-posts-list li a {
        font-size: 15px;
    }
}


/* =====================
   물타기 계산기 페이지
   ===================== */
.page-id-55 .entry-header {
    display: none;
}

.page-id-55 .site-content {
    background: #f8f9fa;
}

.page-id-55 .inside-article {
    background: transparent !important;
    padding: 0 20px !important;
}

.page-id-55 .entry-content {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* 배당 페이지 필터 토글 */
