/*
Theme Name: Tech Guide (GeneratePress Child)
Template: generatepress
Version: 1.0.0
Description: IT 기기 가이드 사이트용 GeneratePress 자식 테마
*/

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --line: #e4e7ee;
  --text: #1b2130;
  --muted: #667085;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --dark: #141a2b;
}

/* ===== 기본 ===== */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.75; word-break: keep-all;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { color: #4338ca; }

/* ===== 헤더 ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .inside-header { padding: 0 20px; min-height: 64px; }
.site-header .main-title { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.site-header .main-title a, .site-header .main-title a:hover { color: var(--text); }
.site-header .site-description { display: none; }
.main-navigation, .main-navigation ul ul { background: var(--surface); }
.main-navigation .main-nav ul li a { color: var(--text); font-size: 15px; font-weight: 600; line-height: 64px; padding: 0 14px; }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a { color: var(--accent); background: transparent; }
.main-navigation .main-nav > ul > li[class*="current-menu-"] > a { box-shadow: inset 0 -3px 0 var(--accent); }
.main-navigation ul ul { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(20, 26, 43, .12); padding: 6px; width: 190px; }
.main-navigation .main-nav ul ul li a { line-height: 1.4; padding: 8px 12px; font-size: 14px; font-weight: 500; border-radius: 6px; }
.main-navigation .main-nav ul ul li a:hover { background: var(--accent-soft); }
.main-navigation .menu-toggle, .main-navigation .menu-toggle:hover { color: var(--text); background: transparent; }

/* ===== 레이아웃 ===== */
.site.grid-container { max-width: 1120px; padding: 0 20px; }
.site-content { padding-top: 28px; gap: 28px; }
.separate-containers .site-main { margin: 0; }
.separate-containers .inside-article,
.separate-containers .page-header { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 36px 40px 28px; }
.entry-header .entry-title, .page-header h1 { font-size: 32px; font-weight: 800; line-height: 1.3; letter-spacing: -.8px; }
.entry-content:not(:first-child) { margin-top: 20px; }
.rank-math-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* ===== 사이드바 ===== */
.sidebar .widget { background: transparent; padding: 0; margin: 0 0 18px; }
.separate-containers .inside-left-sidebar, .separate-containers .inside-right-sidebar { margin: 0; position: sticky; top: 92px; }
.sidebar .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget_nav_menu .menu > li { margin-bottom: 20px; padding: 0; }
.sidebar .widget_nav_menu .menu > li > a { display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); padding: 0 10px 6px; }
.sidebar .widget_nav_menu .sub-menu { margin: 0; }
.sidebar .widget_nav_menu .sub-menu li { padding: 0; margin: 0; }
.sidebar .widget_nav_menu .sub-menu a { display: block; padding: 7px 10px; font-size: 15px; font-weight: 500; color: var(--text); border-radius: 8px; line-height: 1.4; }
.sidebar .widget_nav_menu .sub-menu a:hover,
.sidebar .widget_nav_menu .sub-menu .current-menu-item > a { background: var(--accent-soft); color: var(--accent); }

/* ===== 홈 · 모음 페이지 ===== */
.hub-intro { color: var(--muted); margin: 0 0 22px; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); margin: 32px 0 10px; }
.home-banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-banner { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.home-banner:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(20, 26, 43, .1); color: var(--text); }
.home-banner .pic { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.home-banner .txt { display: flex; flex-direction: column; padding: 14px 18px 16px; }
.home-banner .big { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.home-banner .sub { font-size: 13px; color: var(--muted); }
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hub-card { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.hub-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(20, 26, 43, .08); color: var(--text); }
.hub-card .e { grid-row: 1 / 3; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--accent-soft); border-radius: 50%; }
.hub-card .n { font-size: 17px; font-weight: 700; line-height: 1.3; }
.hub-card .d { font-size: 13px; color: var(--accent); font-weight: 600; }
.hub-card .d::after, .read-more::after { content: " →"; }

/* ===== 글 본문 ===== */
.entry-content { counter-reset: stepnum; }
.entry-content p { margin: 0 0 14px; }
.entry-content em { font-style: normal; font-weight: 700; color: var(--accent); }
.entry-content h2 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.4; margin: 52px 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--text); counter-reset: stepnum; }
.entry-content h3 { position: relative; font-size: 19px; font-weight: 700; line-height: 1.5; margin: 32px 0 10px; padding-left: 36px; counter-increment: stepnum; }
.entry-content h3::before { content: counter(stepnum); position: absolute; left: 0; top: 2px; width: 25px; height: 25px; line-height: 25px; text-align: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; border-radius: 50%; }
.entry-content h4 { font-size: 16px; font-weight: 700; margin: 24px 0 4px; color: var(--accent); }
.entry-content ul, .entry-content ol { margin: 8px 0 16px 22px; }
.entry-content li { margin: 4px 0; }
.entry-content li::marker { color: var(--accent); font-weight: 700; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
.entry-content table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 14.5px; }
.entry-content th { background: var(--dark); color: #fff; font-weight: 600; padding: 10px 12px; text-align: left; white-space: nowrap; border: 0; }
.entry-content td { padding: 10px 12px; border: 0; border-top: 1px solid var(--line); line-height: 1.5; }
.entry-content tr:nth-child(odd) td { background: #fafbfd; }

.summary-box { background: var(--accent-soft); border-radius: 12px; padding: 16px 20px 8px; margin: 20px 0; }
.summary-box .summary-title { font-weight: 700; margin-bottom: 4px; }

/* 쿠팡 상품 구역 */
.notice { font-size: 13px; color: var(--muted); background: #fafbfd; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.entry-content .disclosure { text-align: center; color: var(--text); margin: 0 0 20px; }
.cta-box { background: #fff8c5; border: 1px solid #f1df86; padding: 26px 20px; margin: 28px 0; text-align: center; }
.cta-box a { font-size: 22px; font-weight: 700; line-height: 1.5; color: #1a56db; text-decoration: underline; text-underline-offset: 4px; }
.cta-box a:hover { color: #1e40af; }
.entry-content .cta-box p { margin: 6px 0 0; color: var(--text); }
@media (max-width: 768px) { .cta-box a { font-size: 19px; } }
.coupang-slot { aspect-ratio: 16 / 9; max-width: 480px; margin: 24px auto; border: 2px dashed var(--line); border-radius: 12px; background: #fafbfd; }
.coupang-figure { margin: 24px 0; text-align: center; }
.info-card { margin: 20px 0; }
.info-card img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.coupang-figure img { max-width: min(360px, 100%); height: auto; border-radius: 12px; border: 1px solid var(--line); }
.product-table .p-name { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.product-table .p-name img { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 6px; background: #fff; }
.product-table .p-price { font-weight: 700; white-space: nowrap; }
.btn-go { display: inline-block; padding: 4px 12px; font-size: 13px; font-weight: 600; color: #fff; background: var(--dark); border-radius: 6px; white-space: nowrap; }
.btn-go:hover { background: var(--accent); color: #fff; }
.product-card { display: flex; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.product-card img { width: 200px; height: 200px; object-fit: contain; flex: none; border-radius: 8px; background: #fff; }
.entry-content .product-card ul { margin: 0 0 12px 18px; }
.btn-buy { display: inline-block; padding: 10px 22px; font-size: 15px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 10px; }
.btn-buy:hover { background: #4338ca; color: #fff; }
@media (max-width: 768px) {
  .product-card { flex-direction: column; align-items: flex-start; }
  .product-card img { width: 140px; height: 140px; }
}

/* 목차 (Easy Table of Contents) */
div#ez-toc-container { display: block; width: auto; background: #fafbfd; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 20px 0; box-shadow: none; }
div#ez-toc-container .ez-toc-title { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
div#ez-toc-container ul li, div#ez-toc-container ul li a { font-size: 15px; color: var(--text); font-weight: 500; }
div#ez-toc-container ul li a:hover { color: var(--accent); }

/* 관련 글 */
.related { margin-top: 44px; }
.link-card { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 10px; color: var(--text); }
.link-card:hover { border-color: var(--accent); color: var(--text); }
.link-card .lc-thumb { width: 56px; height: 56px; flex: none; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.link-card .lc-title { font-weight: 700; line-height: 1.4; }
.link-card .read-more { font-size: 13px; color: var(--accent); font-weight: 600; }
.entry-content .related-list { list-style: none; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related-list li { margin: 0; }
.related-list a { display: inline-block; padding: 5px 12px; font-size: 14px; font-weight: 500; color: var(--text); background: #fafbfd; border: 1px solid var(--line); border-radius: 20px; }
.related-list a:hover { border-color: var(--accent); color: var(--accent); }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; gap: 10px; font-weight: 600; padding: 14px 16px; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq-item[open] { border-color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer { padding: 0 16px 2px; color: #414b5e; }

/* ===== 목록 페이지 (카테고리) ===== */
.separate-containers .site-main > .page-header { margin-bottom: 16px; padding: 24px 40px; }
.blog .inside-article, .archive .inside-article { padding: 24px 28px; margin-bottom: 14px; }
.blog .entry-title, .archive .entry-title { font-size: 20px; }

/* ===== 푸터 ===== */
.site-footer { margin-top: 64px; }
.site-info { background: var(--dark); color: #8a93a8; font-size: 13px; }
.site-info .inside-site-info { padding: 24px 20px; }
.site-info a { color: #c5cbd9; }

/* ===== 모바일 ===== */
@media (max-width: 768px) {
  .site-content { padding-top: 16px; }
  .separate-containers .inside-article, .separate-containers .page-header { padding: 24px 18px 20px; }
  .entry-header .entry-title, .page-header h1 { font-size: 25px; }
  .home-banners, .hub-grid { grid-template-columns: 1fr; }
  .entry-content h2 { font-size: 21px; margin-top: 40px; }
  .entry-content h3 { font-size: 18px; }
  .separate-containers .inside-left-sidebar, .separate-containers .inside-right-sidebar { position: static; margin-top: 28px; }
  .sidebar .widget_nav_menu .sub-menu li { display: inline-block; }
  .sidebar .widget_nav_menu .sub-menu a { background: var(--surface); border: 1px solid var(--line); margin: 0 4px 6px 0; }
  .main-navigation .main-nav ul li a { line-height: 46px; }
  .main-navigation ul ul { border: 0; box-shadow: none; width: auto; }
}
