/*
 Theme Name: GeneratePress Child
 Template: generatepress
*/


/* =============================================
   IMPORT: Pretendard 폰트
   ============================================= */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* =============================================
   COLOR VARIABLES
   ============================================= */
:root {
  --color-primary:      #86aabe;
  --color-primary-dark: #5d8a9e;
  --color-text:         #1a1a1a;
  --color-text-sub:     #666666;
  --color-text-muted:   #999999;
  --color-border:       #e5e5e5;
  --color-bg:           #ffffff;
  --color-bg-alt:       #f8f8f8;
}

/* =============================================
   GLOBAL: 폰트 적용
   ============================================= */
body,
.site,
p,
li,
td,
th,
input,
textarea,
select,
button {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', sans-serif;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

/* =============================================
   TYPOGRAPHY: 크기 체계
   ============================================= */
body {
  font-size: 18px;
  line-height: 1.85;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* =============================================
   LINKS: 링크 색상
   ============================================= */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

/* =============================================
   HEADER: 기본 정리
   ============================================= */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-title a {
  color: var(--color-text) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-title a:hover {
  color: var(--color-primary) !important;
}

/* =============================================
   NAVIGATION: 메뉴
   ============================================= */
.main-navigation a {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--color-primary);
}

/* =============================================
   BUTTONS: 버튼
   ============================================= */
.button,
button,
input[type="submit"] {
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background-color: var(--color-primary-dark);
  color: #ffffff;
}

/* =============================================
   CONTENT: 본문 영역
   ============================================= */
.entry-content p {
  margin-bottom: 1.4em;
  color: var(--color-text);
}

.entry-meta,
.entry-footer {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* =============================================
   SIDEBAR: 위젯
   ============================================= */
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* =============================================
   FOOTER: 푸터
   ============================================= */
.site-footer {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-sub);
  font-size: 0.875rem;
}





/*******************************************/





/* =============================================
   HEADER: 레이아웃 및 간격
   ============================================= */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s ease;
}

.header-widget {
    padding: 0 20px;
}

/* 로고 영역 */
.custom-logo {
    max-height: 48px;
    width: auto;
    display: block;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

/* 사이트 제목 (텍스트 로고 상태일 때) */
.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.site-title a {
    color: var(--color-text) !important;
}

.site-title a:hover {
    color: var(--color-primary) !important;
}

/* 사이트 설명 (필요 없으면 숨김) */
.site-description {
    display: none;
}

/* =============================================
   NAVIGATION: 메뉴 간격 및 스타일
   ============================================= */
.main-navigation ul li a {
    padding: 0 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
    color: var(--color-primary);
}

/* 드롭다운 메뉴 */
.main-navigation ul ul {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 4px 4px;
}

.main-navigation ul ul li a {
    font-size: 0.9rem;
    color: var(--color-text-sub);
    padding: 10px 16px;
}

.main-navigation ul ul li a:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-alt);
}

/* 모바일 햄버거 메뉴 */
.menu-toggle {
    color: var(--color-text);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.menu-toggle:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
}




/*******************************************/




/* =============================================
   LAYOUT: 전체 컨테이너 너비
   ============================================= */
.site-container,
.grid-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   LAYOUT: 2단 구조 (본문 + 사이드바)
   ============================================= */
.content-area {
    width: calc(100% - 376px); /* 336px 사이드바 + 40px 간격 */
}

.widget-area {
    width: 336px;
}

/* =============================================
   CONTENT: 본문 가독성
   ============================================= */

/* 여백 */
.entry-content {
    padding: 0;
}

.entry-content p,
.entry-content li,
.entry-content td {
    line-height: 1.9;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 문단 간격 */
.entry-content p {
    margin-bottom: 1.6em;
}

/* =============================================
   CONTENT: 목록 여백 조정
   ============================================= */
.entry-content ul,
.entry-content ol {
    margin: 0 0 1.6em 0;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.4em;
}

/* 인용 블록 */
.entry-content blockquote {
    border-left: 3px solid var(--color-primary);
    margin: 2em 0;
    padding: 0.8em 1.4em;
    background-color: var(--color-bg-alt);
    color: var(--color-text-sub);
    font-style: normal;
}

.entry-content blockquote p {
    margin-bottom: 0;
}

/* 구분선 */
.entry-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2.4em 0;
}

/* 인라인 코드 */
.entry-content code {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.875em;
    color: var(--color-text);
}

/* 코드 블록 */
.entry-content pre {
    background-color: #1a1a1a;
    color: #e8e8e8;
    border-radius: 4px;
    padding: 1.2em 1.4em;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7;
    margin-bottom: 1.6em;
}

.entry-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* =============================================
   CONTENT: 썸네일 숨김
   ============================================= */
.featured-image.page-header-image-single {
    display: none;
}

/* =============================================
   CONTENT: 이미지 패딩 무력화 (네거티브 마진)
   ============================================= */
.separate-containers .inside-article .entry-content figure,
.separate-containers .inside-article .entry-content .wp-block-image {
    margin-left: -40px !important;
    margin-right: -40px !important;
    max-width: none !important;
    width: calc(100% + 80px) !important;
    box-sizing: border-box !important;
}

.separate-containers .inside-article .entry-content figure img,
.separate-containers .inside-article .entry-content .wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    border-radius: 0;
    margin: 0 !important;
}

/* div.wp-block-image > figure 케이스 (가운데 정렬 등) */
.separate-containers .inside-article .entry-content .wp-block-image figure {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.separate-containers .inside-article .entry-content .wp-block-image figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    border-radius: 0;
    margin: 0 !important;
}

/* =============================================
   CONTENT: 표
   ============================================= */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.6em;
    font-size: 0.95rem;
}

.entry-content th {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
}

.entry-content td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    color: var(--color-text-sub);
}

.entry-content tr:hover td {
    background-color: var(--color-bg-alt);
}

/* =============================================
   POST HEADER: 제목 및 메타 정보
   ============================================= */
.entry-header {
    margin-bottom: 2em;
    padding-bottom: 1.4em;
    border-bottom: 1px solid var(--color-border);
}

.entry-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 0.6em;
    color: var(--color-text);
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.entry-meta a {
    color: var(--color-text-muted);
}

.entry-meta a:hover {
    color: var(--color-primary);
}

/* =============================================
   RESPONSIVE: 모바일 대응
   ============================================= */
@media (max-width: 768px) {
    .site-container,
    .grid-container {
        padding: 0 16px;
    }

    .content-area,
    .widget-area {
        width: 100%;
    }

    .entry-title {
        font-size: 1.4rem;
    }

    .entry-content p,
    .entry-content li {
        line-height: 1.8;
    }
}



/*******************************************/
/* 본문 목차 줄간격 */
#toc-inline .toc-link {
    padding: 0;
}
/* ============================
   목차 (TOC) 공통
   ============================ */

.toc-wrapper {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
    padding: 20px 24px;
    margin: 0 0 40px;
    font-size: 1rem;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.toc-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text, #222);
    letter-spacing: -0.01em;
}

.toc-toggle {
    background: none;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1.5;
    transition: background-color 0.15s, color 0.15s;
}

.toc-toggle:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.toc-list {
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.toc-item {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.toc-link {
    display: block;
    padding: 5px 0;
    font-size: 1rem;
    color: #475569;
    text-decoration: none;
    border-bottom: none;
    line-height: 1.5;
    transition: color 0.15s;
}

.toc-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* H3 들여쓰기 */
.toc-h3 .toc-link {
    padding-left: 16px;
    font-size: 1rem;
    color: #64748b;
}

.toc-h3 .toc-link::before {
    content: "–";
    margin-right: 6px;
    color: #94a3b8;
}

/* ============================
   목차 - 사이드바 고정형
   ============================ */

.toc-sidebar {
    margin: 0;
    border: none;
    border-radius: 0;
    background: #fff;
    padding: 10px;
}

.toc-sidebar .toc-header {
    display: block;
    margin-bottom: 20px;
}

.toc-sidebar .toc-title {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text, #222);
    border-bottom: 2px solid var(--color-primary);
    width: 100%;
}

.toc-sidebar.is-sticky {
    position: fixed;
    z-index: 100;
    background: #fff;
    padding: 10px;
}

/* 사이드바 목차 하이라이트 */
.toc-sidebar .toc-link.is-active {
    color: var(--color-primary);
    font-weight: 600;
}

.toc-sidebar .toc-h3 .toc-link.is-active {
    color: var(--color-primary);
    font-weight: 600;
}

/* 사이드바 목차 최대 높이 + 스크롤 */
.toc-sidebar .toc-list {
    max-height: 60vh;
    overflow-y: auto;
}

/* ============================
   모바일: 사이드바 목차 숨김
   ============================ */

@media (max-width: 768px) {
    .toc-sidebar {
        display: none;
    }

    .toc-wrapper {
        padding: 16px 18px;
        margin-bottom: 32px;
    }
}







/*******************************************/








/*******************************************/








/*******************************************/








/*************** 개인 수정 ****************************/
/* =============================================
   META: 작성자 숨김
   ============================================= */
.entry-meta .byline,
.entry-meta .author {
    display: none;
}

/* =============================================
   SIDEBAR: 패딩 조정
   ============================================= */
.widget-area .widget {
    padding: 10px;
}

/* =============================================
   SIDEBAR: 검색 위젯
   ============================================= */

/* 검색 레이블 - 위젯 타이틀과 동일한 스타일 */
.wp-block-search__label {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0;
    margin-bottom: 16px;
    display: block;
}

/* input 높이 조정 */
.wp-block-search__input {
    height: 36px;
    padding: 0 10px;
    font-size: 0.875rem;
    font-family: 'Pretendard', sans-serif;
    border: 1px solid var(--color-border);
    border-radius: 4px 0 0 4px;
    box-shadow: none;
    outline: none;
}

.wp-block-search__input:focus {
    border-color: var(--color-primary);
}

/* 검색 버튼 높이 input에 맞춤 */
.wp-block-search__button {
    height: 36px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-family: 'Pretendard', sans-serif;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wp-block-search__button:hover {
    background-color: var(--color-primary-dark);
}

/* 사이드바 소제목 아래에 언더라인 */
.widget h2 {
    border-bottom: 2px solid var(--color-primary);
}










/* 개인 커스텀 */
/* 하이라이트 */
mark.highlight-yellow {
    background: linear-gradient(transparent 60%,#fff352 60%)
}
mark.highlight-red {
    background: linear-gradient(transparent 60%,#ea618e 60%)
}
mark.highlight-blue {
    background: linear-gradient(transparent 60%,#b2cbe4 60%)
}
mark.highlight-green {
    background: linear-gradient(transparent 60%,#a7d28d 60%)
}
mark.highlight-orange {
    background: linear-gradient(transparent 60%,#fad09e 60%)
}
mark.highlight-pink {
    background: linear-gradient(transparent 60%,#f5b2b2 60%)
}

/* kbd 태그 */
kbd {
    display: inline-block;
    font-family: 'Pretendard', -apple-system, sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1;
    padding: 6px 5px 2px;
    margin: 0 2px;
    background: rgba(134, 170, 190, 0.12);
    border: 1px solid rgba(134, 170, 190, 0.35);
    border-radius: 4px;
    color: #3d7a96;
    white-space: nowrap;
    letter-spacing: 0.02em;
    vertical-align: baseline;
}