/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: GeneratePress 자식 테마입니다. 커스터마이징은 이 테마에서 진행하세요.
Author: Loword Inc
Author URI: https://loword.co.kr
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-child
*/

/* =========================================================
   0. 디자인 토큰 + 타이포그래피(기본 글꼴 Noto Sans KR)
   ========================================================= */
:root {
    --gpc-accent: #f5821f;
    --gpc-accent-hover: #f7a24d;
    --gpc-accent-soft: #fff3e8;
    --gpc-text-muted: #6b7280;
    --gpc-border: #e5e7eb;
}

body,
button,
input,
select,
optgroup,
textarea,
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
    font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

/* =========================================================
   0-0. 사이트 로고 + 제목 가로 배치 (로고 높이를 텍스트에 맞춤)
   ========================================================= */
.site-header .inside-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-header .site-logo {
    margin: 0;
    display: flex;
    align-items: center;
}

.site-header .site-logo img {
    width: auto;
    height: 2.4rem;
    max-height: 56px;
    display: block;
}

/* ── 헤더 스타일 프리셋 ─────────────────────────────── */

/* 가운데: 로고+제목 가로 한 줄, 가운데 정렬 */
.gpc-header-center .site-header .inside-header {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 세로형: 로고 위 · 제목 아래, 가운데 */
.gpc-header-stacked .site-header .inside-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

/* 박스형: 여백 크게 + 하단 구분선 */
.gpc-header-boxed .site-header .inside-header {
    padding-top: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gpc-border);
}

/* 미니멀: 작고 컴팩트 */
.gpc-header-minimal .site-header .inside-header {
    padding-top: 8px;
    padding-bottom: 8px;
}

.gpc-header-minimal .site-header .site-logo img {
    height: 1.8rem;
}

.gpc-header-minimal .site-header .main-title {
    font-size: 1.1rem;
}

/* 강조선: 헤더 하단에 테마색 강조선 */
.gpc-header-line .site-header .inside-header {
    border-bottom: 3px solid var(--gpc-accent);
    padding-bottom: 12px;
}

/* =========================================================
   0-1. 내비게이션 / 포인트 컬러
   ========================================================= */
.main-navigation .main-nav ul li a {
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

/* ── 메뉴 버튼 스타일 프리셋 ─────────────────────────── */

/* 기본: 색상만 강조 */
.gpc-menu-default .main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--gpc-accent);
}
.gpc-menu-default .main-navigation .main-nav ul li a:hover {
    color: var(--gpc-accent-hover);
}

/* 밑줄 */
.gpc-menu-underline .main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--gpc-accent);
    box-shadow: inset 0 -2px 0 var(--gpc-accent);
}
.gpc-menu-underline .main-navigation .main-nav ul li a:hover {
    color: var(--gpc-accent-hover);
    box-shadow: inset 0 -2px 0 var(--gpc-accent-hover);
}

/* 알약/박스 공통: 세로 패딩 축소해 버튼 크기 정리 */
.gpc-menu-pill .main-navigation .main-nav ul li a,
.gpc-menu-boxed .main-navigation .main-nav ul li a {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    margin: 6px 3px;
    line-height: 1.4;
}

/* 알약(둥근 버튼) */
.gpc-menu-pill .main-navigation .main-nav ul li a:hover {
    background-color: var(--gpc-accent-soft);
    color: var(--gpc-accent);
    border-radius: 999px;
}
.gpc-menu-pill .main-navigation .main-nav ul li.current-menu-item > a {
    background-color: var(--gpc-accent);
    color: #fff;
    border-radius: 999px;
}

/* 박스(사각 버튼) */
.gpc-menu-boxed .main-navigation .main-nav ul li a:hover {
    background-color: var(--gpc-accent-soft);
    color: var(--gpc-accent);
    border-radius: 6px;
}
.gpc-menu-boxed .main-navigation .main-nav ul li.current-menu-item > a {
    background-color: var(--gpc-accent);
    color: #fff;
    border-radius: 6px;
}

/* 상단바 */
.gpc-menu-accent-bar .main-navigation .main-nav ul li a:hover {
    color: var(--gpc-accent-hover);
    box-shadow: inset 0 3px 0 var(--gpc-accent-hover);
}
.gpc-menu-accent-bar .main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--gpc-accent);
    box-shadow: inset 0 3px 0 var(--gpc-accent);
}

a {
    text-decoration: none;
}

.entry-content a,
.entry-meta a,
.byline a,
.posted-on a,
.cat-links a,
.tags-links a,
.read-more,
.more-link,
a.read-more,
a.more-link {
    color: var(--gpc-accent);
}

.entry-content a:hover,
.entry-meta a:hover,
.byline a:hover,
.posted-on a:hover,
.cat-links a:hover,
.tags-links a:hover,
.read-more:hover,
.more-link:hover,
a.read-more:hover,
a.more-link:hover {
    color: var(--gpc-accent-hover);
}

/* =========================================================
   0-2. 댓글 완전 숨김
   ========================================================= */
.comments-area,
#comments,
.comment-respond,
.comments-link,
.entry-meta .comments-link,
a[href*="#respond"],
a[href*="#comments"] {
    display: none !important;
}

/* =========================================================
   1. 컨테이너 폭
   기본 컨테이너 너비(1000px)와 헤더/푸터 포함됨 설정은
   functions.php 의 generate_option_defaults 필터에서 정의한다.
   여기서는 full-width 콘텐츠 레이아웃만 안전하게 1200px 로 제한한다.
   ========================================================= */
.full-width-content .site-content .content-area,
.full-width-content .site-content .widget-area,
.full-width-content .site-main {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 헤더/푸터 콘텐츠 영역 모바일 기본 여백 안전장치
   (사용자 정의 값이 없을 때 모바일에서 좌우가 화면에 붙지 않도록) */
@media (max-width: 768px) {
    .inside-header,
    .inside-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-footer .inside-footer {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

/* =========================================================
   1-1. 메인/아카이브 레이아웃 (리스트형 / 그리드형)
   ========================================================= */

/* GeneratePress 기본 대표 이미지 숨김(직접 출력한 썸네일과 중복 방지) */
body[class*="gpc-home-"] .site-main > article .post-image {
    display: none;
}

/* 목록에서는 카테고리 노출 안 함 */
body[class*="gpc-home-"] .site-main > article .cat-links {
    display: none;
}

/* 공통: 목록 썸네일 링크 */
.gpc-loop-thumb {
    display: block;
}

.gpc-loop-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    object-fit: cover;
}

/* 노출 옵션 토글 (리스트/그리드 공통) */
.gpc-hide-title .site-main > article .entry-title,
.gpc-hide-title .site-main > article .entry-header {
    display: none;
}

.gpc-hide-excerpt .site-main > article .entry-summary,
.gpc-hide-excerpt .site-main > article .entry-content {
    display: none;
}

.gpc-hide-home-author .site-main > article .byline {
    display: none;
}

/* ── 리스트형: 썸네일(왼쪽) | 제목 + 본문 살짝(오른쪽) ── */
.gpc-home-list .inside-article {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-areas:
        "thumb header"
        "thumb content";
    align-content: start;
    column-gap: 22px;
    row-gap: 6px;
}

/* 썸네일이 없는 글은 한 컬럼으로 */
.gpc-home-list .inside-article:not(:has(.gpc-loop-thumb)) {
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "content";
}

.gpc-home-list .gpc-loop-thumb {
    grid-area: thumb;
}

.gpc-home-list .gpc-loop-thumb img {
    height: 150px;
}

.gpc-home-list .entry-header {
    grid-area: header;
    margin: 0;
}

.gpc-home-list .entry-summary,
.gpc-home-list .entry-content {
    grid-area: content;
    color: var(--gpc-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.gpc-home-list .entry-title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    line-height: 1.35;
}

/* ── 그리드형: 2열 / 3열 (썸네일 아래 제목·발췌) ── */
.gpc-home-grid-2 .site-main,
.gpc-home-grid-3 .site-main {
    display: grid;
    gap: 20px;
}

.gpc-home-grid-2 .site-main {
    grid-template-columns: repeat(2, 1fr);
}

.gpc-home-grid-3 .site-main {
    grid-template-columns: repeat(3, 1fr);
}

/* 페이지네이션 등 글이 아닌 항목은 전체 폭 차지 */
.gpc-home-grid-2 .site-main > *:not(article),
.gpc-home-grid-3 .site-main > *:not(article) {
    grid-column: 1 / -1;
}

.gpc-home-grid-2 .gpc-loop-thumb img,
.gpc-home-grid-3 .gpc-loop-thumb img {
    height: 180px;
}

.gpc-home-grid-2 .entry-title,
.gpc-home-grid-3 .entry-title {
    margin: 0.6rem 0 0.3rem;
    font-size: 1.05rem;
    line-height: 1.35;
}

.gpc-home-grid-2 .entry-summary,
.gpc-home-grid-3 .entry-summary,
.gpc-home-grid-2 .entry-content,
.gpc-home-grid-3 .entry-content {
    color: var(--gpc-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ── 카드 스타일: 분리형 / 포함형 ──
   글 블록(.inside-article)은 기본 투명 → 중복 박스 제거.
   배경색/여백은 "본문" 옵션이 본문 영역(.site-main) 전체에 적용된다. */
.site-main .inside-article {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* 포함형: 글끼리 합쳐 보이게 (리스트는 얇은 구분선, 그리드는 간격만) */
.gpc-cards-contained.gpc-home-list .site-main > article {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--gpc-border);
}

.gpc-cards-contained.gpc-home-list .site-main > article:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.gpc-cards-contained.gpc-home-grid-2 .site-main,
.gpc-cards-contained.gpc-home-grid-3 .site-main {
    gap: 14px;
}

/* 분리형: 각 글을 흰 카드로 분리 */
.gpc-cards-separated .site-main > article .inside-article {
    background: #fff;
    border: 1px solid var(--gpc-border);
    border-radius: 8px;
    padding: 14px;
}

.gpc-cards-separated.gpc-home-list .site-main > article {
    margin-bottom: 16px;
}

/* 모바일: 리스트/그리드 단순화 */
@media (max-width: 768px) {
    .gpc-home-list .inside-article {
        grid-template-columns: 120px 1fr;
        column-gap: 14px;
    }

    .gpc-home-list .gpc-loop-thumb img {
        height: 90px;
    }

    .gpc-home-grid-2 .site-main,
    .gpc-home-grid-3 .site-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   2. 개별 글(single) 원페이지 스타일
   구조: 헤더 → 썸네일 → 본문 → 푸터
   ========================================================= */

/* GeneratePress 기본 single 대표 이미지는 숨김(직접 출력한 썸네일 사용) */
.single .inside-article > .post-image,
.single .featured-image {
    display: none;
}

/* ── 헤더 ───────────────────────────────────────────── */
.single .entry-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

/* 제목 위 카테고리 배지 */
.single .gpc-cat-badge {
    order: -1;
    display: inline-block;
    margin-bottom: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--gpc-accent-soft);
    color: var(--gpc-accent);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
}

.single .gpc-cat-badge:hover {
    background: var(--gpc-accent);
    color: #fff;
}

.single .entry-title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
}

.single .gpc-single-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.5;
    color: var(--gpc-text-muted);
    margin: 0 auto 1rem;
    max-width: 42rem;
}

.single .entry-header .entry-meta {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ── 썸네일(히어로) ─────────────────────────────────── */
.single .gpc-single-thumbnail {
    margin: 0 0 2.5rem;
}

.single .gpc-single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* ── 본문 ───────────────────────────────────────────── */
.single .entry-content {
    font-size: 1.075rem;
    line-height: 1.85;
}

.single .entry-content > * + * {
    margin-top: 1.5em;
}

.single .entry-content h2,
.single .entry-content h3 {
    line-height: 1.3;
    margin-top: 2em;
}

.single .entry-content img {
    border-radius: 10px;
}

.single .entry-content blockquote {
    border-left: 4px solid currentColor;
    padding-left: 1.25rem;
    font-style: italic;
    opacity: 0.9;
}

/* ── 본문 하단 카테고리/태그 메타 숨김 ───────────────── */
.single .inside-article footer.entry-meta {
    display: none;
}

/* ── 제휴 고지 문구 ─────────────────────────────────── */
.single .gpc-affiliate-notice {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* 글 하단 내비게이션 여백 */
.single .post-navigation {
    margin-top: 2rem;
}

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .single .entry-content {
        font-size: 1rem;
    }

    .single .gpc-single-thumbnail {
        margin-bottom: 1.75rem;
    }
}

/* 여기에 추가 커스텀 CSS를 작성하세요. */
