/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Serif+KR:wght@600;700&display=swap');

:root {
    --bg: #fffaf5;
    --surface: #fffdf9;
    --surface-soft: #fff6ee;
    --text: #3f332d;
    --text-soft: #6b5a51;
    --line: #edd9c9;
    --accent: #c06c54;
    --accent-deep: #a6543d;
    --shadow-soft: 0 10px 24px rgba(129, 76, 50, 0.08);
}


html,
body {
    background: var(--bg);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text);
    font-size: 17px;
    line-height: 1.82;
}

body,
.site-header,
.site-title,
.site-title a,
.site-description,
.inside-article,
.widget,
.custom-post-box,
.newsletter-box,
.related-posts,
.widget_search input[type="search"],
.widget_search button,
.category-badge {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {

    body,
    .site-header,
    .site-title,
    .site-title a,
    .site-description,
    .inside-article,
    .widget,
    .custom-post-box,
    .newsletter-box,
    .related-posts,
    .widget_search input[type="search"],
    .widget_search button,
    .category-badge {
        transition: none;
    }
}

p,
li {
    color: var(--text-soft);
}

/* 링크와 포인트 컬러 */
a {
    color: var(--accent-deep);
    text-decoration: none;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
.entry-title {
    font-family: 'Noto Serif KR', serif;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* 전체 컨테이너 너비 확장 */
@media (min-width: 1025px) {

    /* 전체 레이아웃 wrapper */
    .container.grid-container {
        max-width: 1260px !important;
        width: 100%;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
    }

    /* 본문 + 사이드바 2단 grid 레이아웃 */
    .generate-columns-container {
        display: grid !important;
        grid-template-columns: 1000px 260px !important;
        /* 본문+사이드바 포함 총 1260px */
        column-gap: 0 !important;
        box-sizing: border-box;
    }

    /* 본문 wrapper */
    #primary.content-area {
        width: 1000px !important;
        /* 본문 전체 크기 (내용 + 여백) */
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* 아티클 내부 전체 */
    .inside-article {
        width: 100%;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
    }

    /* 본문 내용: 900px 고정, 가운데 정렬 */
    .entry-content {
        width: 900px !important;
        /* 핵심: 본문 내용 폭 고정 */
        margin-left: 0px !important;
        /* 좌우 여백 = (1000 - 900)/2 */
        margin-right: 0px !important;
        box-sizing: border-box;
    }

    /* 내부 요소들 */
    .entry-content>* {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* 사이드바 */
    #right-sidebar {
        width: 360px !important;
        box-sizing: border-box;
    }
}

/* 배경 분위기와 기본 박스 */
.site-content,
.inside-article,
.widget,
.site-main .post,
.site-main article {
    background: var(--surface);
}

.inside-article,
.widget {
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(97, 59, 36, 0.05);
}

.inside-article {
    padding: 28px;
}

/* 헤더와 메뉴 */
.site-header {
    background: linear-gradient(180deg, #fff7ef 0%, #fffaf5 100%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(97, 59, 36, 0.06);
}

.main-navigation,
.main-navigation ul ul {
    background: transparent;
}

.main-navigation .main-nav ul li>a,
.main-navigation .menu-toggle,
.main-navigation .mobile-bar-items a {
    color: var(--text) !important;
    font-weight: 600;
}

.main-navigation .main-nav ul li:hover>a,
.main-navigation .main-nav ul li.current-menu-item>a,
.main-navigation .main-nav ul li.current_page_item>a {
    color: var(--accent-deep) !important;
}

/* 검색 입력창 높이 및 글자 크기 조정 */
.widget_search input[type="search"] {
    height: 38px !important;
    /* 전체 입력창 높이 조절 */
    padding: 6px 10px !important;
    /* 위아래/좌우 여백 */
    font-size: 15px !important;
    /* 텍스트 크기 */
    line-height: 1.4 !important;
    /* 줄 높이로 정렬 */
    box-sizing: border-box;
    /* 패딩 포함 너비 계산 */
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

/* 검색 버튼(<button>) 높이 및 글자 크기 정리 */
.widget_search button {
    height: 38px !important;
    /* 버튼 높이 입력창과 동일하게 */
    padding: 0 12px !important;
    /* 좌우 여백만 설정 */
    font-size: 15px !important;
    /* 글자 크기 동일하게 */
    line-height: 1.4 !important;
    /* 줄 높이 */
    white-space: nowrap !important;
    /* 버튼 안 텍스트 줄바꿈 방지 */
    box-sizing: border-box;
    /* 너비 계산 방식 통일 */
    font-family: 'Noto Sans KR', sans-serif;
    /* 한글 폰트 명시 */
    border-radius: 10px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

/* ------------------------------
   헤딩(h2, h3 등) 크기 조정
------------------------------ */
h1 {
    font-size: 34px;
    line-height: 1.36;
    margin-bottom: 0.8em;
}

h2 {
    font-size: 27px;
    line-height: 1.42;
    margin-bottom: 0.9em;
}

h3 {
    font-size: 21px;
    line-height: 1.45;
    margin-bottom: 0.8em;
}

.entry-content p {
    margin-bottom: 1.1em;
}

/* ------------------------------
   <code> 태그에 코드 스타일 적용
------------------------------ */
code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8efe7;
    padding: 2px 4px;
    font-size: 14px;
    color: #944e38;
    border-radius: 4px;
}

.related-posts {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    background: var(--surface-soft);
}

/* ==============================
   글 목록 박스 스타일
============================== */
.custom-post-box {
    display: flex;
    gap: 22px;
    margin-bottom: 28px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.custom-post-box:hover {
    transform: translateY(-3px);
    border-color: #e8c8b2;
    box-shadow: 0 14px 28px rgba(129, 76, 50, 0.14);
}

.custom-thumb {
    flex-shrink: 0;
    width: 270px;
}

.custom-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.custom-summary h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.custom-card-meta {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.category-badge {
    display: inline-block;
    padding: 6px 11px;
    font-size: 12px;
    line-height: 1;
    border-radius: 999px;
    background: var(--badge-bg, #fde8db);
    border: 1px solid var(--badge-border, #f2c7ae);
    color: var(--badge-text, #8d4834);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.category-badge:hover {
    background: var(--badge-bg-hover, #f9d8c2);
    color: var(--badge-text, #7c3e2c);
    text-decoration: none;
}

.custom-summary .excerpt {
    font-size: 16px;
    line-height: 1.68;
}

/* RSS 구독 박스 */
.newsletter-box {
    margin-top: 30px;
    padding: 22px;
    border: 1px solid #e7cdbb;
    background: linear-gradient(145deg, #fff4e8 0%, #fff9f2 100%);
    border-radius: 14px;
    text-align: center;
}

.newsletter-box h4 {
    margin: 0 0 8px;
    font-size: 22px;
}

.newsletter-box p {
    margin: 0;
}

.newsletter-box a {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
}

.newsletter-box a:hover {
    background: var(--accent-deep);
    text-decoration: none;
}


/* ==============================
   모바일 반응형 (스마트폰 세로, 767px 이하)
============================== */
@media (max-width: 767px) {

    /* --- 3. 사이드바: 본문 아래로 이동 --- */
    .generate-columns-container {
        display: block !important;
    }

    /* --- 2, 3. 본문·사이드바 너비 100% --- */
    #primary.content-area,
    #right-sidebar {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* --- 5. 전체 컨테이너 좌우 여백 --- */
    .container.grid-container {
        max-width: 100% !important;
        padding: 0 16px !important;
        box-sizing: border-box;
    }

    /* --- 2. 본문 내용 너비 고정 해제 --- */
    .entry-content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* --- 2. 본문 내 이미지 삐져나옴 방지 --- */
    .entry-content img,
    .entry-content video,
    .entry-content iframe,
    .entry-content table {
        max-width: 100% !important;
        height: auto !important;
    }

    /* --- 5. 아티클 내부 여백 --- */
    .inside-article {
        padding: 18px !important;
    }

    /* --- 5. 사이드바 여백 --- */
    #right-sidebar {
        padding: 16px !important;
    }

    /* --- 1. 글 목록: 세로 배치로 변경 --- */
    .custom-post-box {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 28px;
        padding: 14px;
    }

    .custom-thumb {
        width: 100%;
    }

    .custom-thumb img {
        width: 100% !important;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    /* --- 헤딩 크기 모바일 조정 --- */
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 23px;
    }

    h3 {
        font-size: 19px;
    }

    .custom-summary h3 {
        font-size: 21px;
    }

    /* --- 4. 메뉴 터치 영역 확보 --- */
    .main-navigation a {
        padding: 10px 16px !important;
    }

    .newsletter-box {
        padding: 18px;
    }

}

/* ==============================
   글 목록 날짜
============================== */
.custom-card-date {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    opacity: 0.75;
    margin-bottom: 6px;
    font-family: 'Noto Sans KR', sans-serif;
}

/* ==============================
   PC: 메뉴를 타이틀 바로 옆으로
============================== */
@media (min-width: 1025px) {
    .inside-header {
        justify-content: flex-start !important;
    }

    .main-navigation {
        margin-left: 28px !important;
        flex: 1;
    }
}

