/*
Theme Name: CashUp24
Theme URI: https://cashup24.com
Author: CashUp24
Description: 가성비 IT 정보 블로그 테마 - cashup24.com
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cashup24
*/

/* ===== CSS Variables ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBE5F5;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --bg-white: #FFFFFF;
  --bg-light: #F9FAFB;
  --bg-gray: #F3F4F6;
  --border: #E5E7EB;
  --border-dark: #D1D5DB;
  --sidebar-width: 270px;
  --font-main: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }

/* ===== Typography ===== */
body { font-size: 18px; }

h1 { font-size: 34px; font-weight: 800; line-height: 1.3; letter-spacing: -2px; }
h2 { font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: -0.3px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.4; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.45; }
h5 { font-size: 15px; font-weight: 600; line-height: 1.5; }
h6 { font-size: 13px; font-weight: 600; line-height: 1.5; }

strong, b { font-weight: 500; }

/* ===== Layout ===== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.site-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: #F5F5F5;
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

/* Logo */
.sidebar-logo {
  padding: 40px 20px 24px;
  margin-bottom: 24px;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
}

.sidebar-logo-img {
  width: 220px;
  height: auto;
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

/* Navigation */
.sidebar-nav {
  padding: 0 18px 0 18px;
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
  top: -10px;
}

.sidebar-nav ul { display: flex; flex-direction: column; width: 100%; }

.sidebar-nav li { border-bottom: 1px solid var(--border); position: relative; }
.sidebar-nav li:last-child { border-bottom: none; }

.sidebar-nav li a {
  display: block;
  padding: 2px 12px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  color: #000;
  line-height: 1.9;
  letter-spacing: -1px;
  transition: all var(--transition);
  text-align: right;
}

/* 사이드바 카테고리 색 막대 */
.sidebar-nav .menu-item-19574 > a::before { content:""; display:inline-block; width:4px; height:16px; background:var(--cat-red); margin-right:8px; vertical-align:middle; border-radius:2px; }
.sidebar-nav .menu-item-19573 > a::before { content:""; display:inline-block; width:4px; height:16px; background:var(--cat-orange); margin-right:8px; vertical-align:middle; border-radius:2px; }
.sidebar-nav .menu-item-19575 > a::before { content:""; display:inline-block; width:4px; height:16px; background:var(--cat-purple); margin-right:8px; vertical-align:middle; border-radius:2px; }
.sidebar-nav .menu-item-19813 > a::before { content:""; display:inline-block; width:4px; height:16px; background:var(--cat-green); margin-right:8px; vertical-align:middle; border-radius:2px; }
.sidebar-nav .menu-item-20165 > a::before { content:""; display:inline-block; width:4px; height:16px; background:var(--cat-blue); margin-right:8px; vertical-align:middle; border-radius:2px; }

.sidebar-nav li a:hover,
.sidebar-nav li.current-menu-item > a,
.sidebar-nav li.current-menu-ancestor > a {
  background: #E9E9E9;
  color: var(--primary);
}

.sidebar-nav .sub-menu {
  position: absolute;
  left: -18px;
  right: -18px;
  background: #F5F5F5;
  border-top: 1px solid var(--border);
  padding: 4px 18px 8px;
  z-index: 200;
  display: none;
}

.sidebar-nav li.menu-item-has-children:hover .sub-menu,
.sidebar-nav li.current-menu-ancestor .sub-menu {
  display: block;
}

.sidebar-nav .sub-menu li a {
  font-size: 16px;
  padding: 2px 12px;
  letter-spacing: -1px;
  color: #000;
  text-align: left;
}
.sidebar-nav .sub-menu li a::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #333;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* Recent Posts in Sidebar */
.sidebar-recent {
  margin-top: auto;
  margin-bottom: 100px;
  padding: 16px 33px 0;
}

/* 사이드바 하단 아이콘 */
.sidebar-bottom-icons {
  display: flex;
  gap: 16px;
  padding: 20px 30px 0;
  margin-top: 16px;
  justify-content: flex-end;
}

.sidebar-bottom-icons a {
  color: #000;
  transition: color var(--transition);
}

.sidebar-bottom-icons a:hover { color: var(--primary); }

.sidebar-bottom-icons svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.sidebar-recent-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.sidebar-recent ul { display: flex; flex-direction: column; gap: 0; }

.sidebar-recent li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.sidebar-recent li a {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.sidebar-recent li a:hover { color: var(--primary); }

/* ===== Main Content ===== */
.site-main {
  flex: 1;
  min-width: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

.wrap {
  max-width: 1300px;
  margin: 0 auto;
}

/* ===== Hero Section (Home) ===== */
.hero-section {
  padding: 40px 70px;
  background: #F7F7F7;
  border-bottom: 1px solid var(--border);
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 400px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.hero-title {
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  line-height: 1.75;
  margin-bottom: 20px;
  letter-spacing: -1.6px;
}

.hero-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #000;
  letter-spacing: -1.6px;
}

.hero-checklist .check-icon {
  font-size: 23px;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  line-height: 1;
  align-self: flex-start;
}

.hero-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 3fr 2fr;
  gap: 14px;
  height: 100%;
}

.hero-images .hero-img-item {
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.22);
}

.hero-images .hero-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-images .hero-img-item:first-child {
  grid-row: span 2;
}

.hero-images .hero-img-item:nth-child(3) {
  width: 80%;
}

/* ===== Section Title ===== */
.section-wrap {
  padding: 70px 70px;
}

.section-gray {
  background: #F7F7F7;
}

.section-wrap + .section-wrap {
  padding-top: 0;
}

.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-title::before {
  content: '';
  display: block;
  width: 15px;
  height: 15px;
  background: var(--primary);
  flex-shrink: 0;
  transform: rotate(45deg);
}

/* ===== Post Grid (3 columns) ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 12px;
  row-gap: 23px;
}

.post-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 19px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-card-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-gray);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}

.post-card-body {
  padding: 20px 30px;
  flex: 1;
  background: #f3f4f6;
}

.post-card-rank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
}

.post-card-rank .views {
  color: var(--text-muted);
  font-weight: 400;
}

.post-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.post-card-title a:hover { color: var(--primary); }

/* ===== Recent Section ===== */
.recent-grid {
  grid-template-columns: repeat(3, 1fr);
}

.recent-section {
  padding-bottom: 100px;
}

.recent-section .post-card-thumb {
  aspect-ratio: 3/2;
}

.recent-section .post-card-body {
  background: #F3F4F6;
}

.recent-card-cat {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.recent-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 4px;
}

.recent-card-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-dark);
}

.recent-section .post-card-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.35;
}

/* ===== TOP 3 Section overrides ===== */
.top3-section .post-card-thumb {
  aspect-ratio: 3/2;
}

.top3-section .post-card-rank {
  font-size: 20px;
  font-weight: 700;
  gap: 20px;
}

.top3-section .post-card-rank .views {
  font-size: 15px;
}

.top3-section .post-card-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.35;
}

/* ===== TOP 5 Section (Category popular) ===== */
.top5-section .post-grid {
  grid-template-columns: repeat(5, 1fr);
}

.top5-section .post-card-thumb {
  aspect-ratio: 3/2;
}

.top5-section .post-card-rank {
  font-size: 18px;
  font-weight: 700;
  gap: 12px;
}

.top5-section .post-card-rank .views {
  font-size: 14px;
}

.top5-section .post-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.35;
}

.post-card-excerpt {
  font-size: 18px;
  color: #000;
  margin-top: 8px;
  line-height: 1.6;
  letter-spacing: -1.6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Top 3 Cards ===== */
.top-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition);
}

.top-card:hover { box-shadow: var(--shadow-md); }

.top-card-rank {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  min-width: 32px;
}

.top-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.top-card-title a:hover { color: var(--primary); }

/* ===== Features Section ===== */
.features-section {
  background: #F7F7F7;
  padding: 40px 70px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 100px;
}

.features-header-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.6px;
  line-height: 1.35;
}

.features-header-desc {
  font-size: 19px;
  font-weight: 600;
  color: #000;
  line-height: 1.75;
  letter-spacing: -1.6px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
}

.feature-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.6px;
}

.feature-desc {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  line-height: 1.75;
  letter-spacing: -1.6px;
}

.feature-desc a {
  color: var(--primary);
  text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
  background: #F3F4F6;
  border-top: 1px solid var(--border);
  padding: 70px 70px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 10fr 40fr 25fr 25fr;
  gap: 40px;
  margin-bottom: 32px;
  align-items: start;
}

.footer-spacer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: start;
}

.footer-spacer-img {
  width: 56px;
  height: auto;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-brand .footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-brand .footer-logo .logo-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.footer-brand-desc {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  line-height: 1.75;
  letter-spacing: -1.6px;
  margin-bottom: 12px;
}

.footer-email {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.footer-social a:hover { background: var(--primary); }

.footer-social a svg {
  width: 16px;
  height: 16px;
  fill: var(--text-secondary);
  transition: fill var(--transition);
}

.footer-social a:hover svg { fill: white; }

.footer-nav-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-nav ul li a {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  line-height: 1.4;
  letter-spacing: -1.6px;
  transition: color var(--transition);
}

.footer-nav ul li a:hover,
.footer-nav ul li a.active { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Scroll to Top ===== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 999;
  border: none;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}

/* ===== Category Page ===== */
.category-header {
  padding: 0 70px;
  background: #F3F4F6;
  height: 100px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.category-breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  order: 2;
}

.category-breadcrumb a { color: var(--text-muted); }
.category-breadcrumb a:hover { color: var(--primary); }
.category-breadcrumb span { margin: 0 6px; }

.category-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  order: 1;
}

/* Popular Posts Row */
.popular-section {
  padding: 28px 48px;
  border-bottom: 1px solid var(--border);
}

.popular-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.popular-section .section-title::before {
  content: '';
  display: block;
  width: 16px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.popular-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.popular-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.popular-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-gray);
}

.popular-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.popular-card:hover .popular-card-thumb img {
  transform: scale(1.04);
}

.popular-card-body {
  padding: 10px 12px;
}

.popular-card-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.popular-card-rank .views {
  color: var(--text-muted);
  font-weight: 400;
}

.popular-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-card-title a:hover { color: var(--primary); }

/* Post List (Category) */
.post-list-section {
  padding-top: 28px;
  padding-bottom: 40px;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 950px;
  margin: 0 auto;
}

.post-list-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 27px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.post-list-item:first-child { border-top: 1px solid var(--border); }

.post-list-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--bg-gray);
}

.post-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-list-item:hover .post-list-thumb img {
  transform: scale(1.04);
}

.post-list-body { display: flex; flex-direction: column; gap: 8px; }

.post-list-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1.6px;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.post-list-title a:hover { color: var(--primary); }

.post-list-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-list-meta .meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-dark); }

.post-list-meta .meta-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-list-meta svg {
  width: 13px;
  height: 13px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
}

.post-list-excerpt {
  font-size: 17px;
  color: #000;
  line-height: 1.7;
  letter-spacing: -1.6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}

/* Pagination */
.pagination-wrap {
  padding: 20px 48px 40px;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  gap: 6px;
}

.pagination a,
.pagination span {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== Single Post Page ===== */
.single-hero {
  width: 100%;
  height: 320px;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #222;
  position: relative;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.30);
  z-index: 1;
}

.single-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgb(37 37 37 / 72%);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-hero-inner {
  padding: 24px 20px;
  width: 100%;
  text-align: center;
}

.single-category-tag {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0;
  margin-bottom: 12px;
}

.single-title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  text-shadow: 7px 7px 4px rgb(0 0 0 / 70%);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
}

.single-meta .meta-sep { width: 1px; height: 14px; background: rgba(255,255,255,0.5); }

.single-meta a { color: #fff; }

/* Single Content */
.single-content-wrap {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  padding: 0 70px 32px;
  align-items: start;
  margin-top: 100px;
}

.single-content {
  max-width: 780px;
  margin: 0 auto;
  min-width: 0;
}

.single-sidebar {
  position: sticky;
  top: 200px;
  align-self: start;
  max-height: 80vh;
  overflow-y: auto;
}

/* Post Content Typography */
.entry-content {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 100px;
  line-height: 1.8em;
  letter-spacing: -1.2px;
  color: var(--text-primary);
}

.single .entry-content,
.single .entry-content p {
  color: #000;
}

.entry-content h2 {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #111;
  padding: 0 0 0 12px;
  margin: 40px 0 14px;
  border: none;
  background: none;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
}

.entry-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 10px;
}

.entry-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 20px 0;
  max-width: 100%;
  height: auto;
}

.entry-content ul,
.entry-content ol {
  margin: 12px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li {
  font-size: 18px;
  color: #000;
  line-height: 1.8;
}

/* Tip Box */
.entry-content .tip-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--primary-dark);
  line-height: 1.65;
}

/* Warning Box */
.entry-content .warning-box {
  background: #FFFBEB;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14px;
  color: #92400E;
  line-height: 1.65;
}

/* Table */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 18px;
}

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

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

.entry-content tr:hover td { background: var(--bg-light); }
.entry-content tr[style*="#333"] td,
.entry-content tr[style*="#222"] td { color: #fff !important; }
.entry-content tr[style*="#333"]:hover td,
.entry-content tr[style*="#222"]:hover td { background: inherit !important; }

/* Coupang Banner (inside content) */
.coupang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E8212E;
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  transition: background var(--transition);
}

.coupang-btn:hover { background: #c41920; color: white; }

.coupang-btn svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.toc-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.toc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toc-list li a {
  font-size: 14px;
  color: #000;
  line-height: 1.2;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  transition: color var(--transition);
}
.toc-list li a::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: #ccc;
  flex-shrink: 0;
  margin-top: 1px;
}

.toc-list li a:hover { color: var(--primary); }

.toc-list li.active a { color: var(--primary); font-weight: 600; }

.related-section .post-card-thumb { aspect-ratio: 3/2; }

.related-section .post-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1.6px;
}

/* Page Content */
.page-section { padding: 100px 70px; }
.page-content {
  max-width: 860px;
  margin: 0 auto;
}

/* Related Posts */
.related-section {
  padding: 32px 70px 40px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ===== Mobile Header ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  height: 60px;
  background: #A5D6A7;
  border-bottom: 1px solid #81C784;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-logo img { height: 32px; width: auto; }

.mobile-search svg {
  width: 22px;
  height: 22px;
  stroke: #000;
  stroke-width: 2;
  fill: none;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: calc(60px + var(--wp-admin--admin-bar--height, 0px));
  left: 0;
  right: 0;
  background: #A5D6A7;
  border-bottom: 1px solid #81C784;
  z-index: 190;
  padding: 12px 0;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
}

.mobile-menu ul li a {
  display: block;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 600;
  color: #000;
  letter-spacing: -1px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu ul li:last-child a { border-bottom: none; }

.mobile-menu ul li a:hover { color: var(--primary); background: var(--primary-light); }

.mobile-menu.active { display: block; }

/* 모바일 서브메뉴 기본 숨김 */
.mobile-menu .sub-menu { display: none; }
.mobile-menu .menu-item-has-children > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu .menu-item-has-children > a::after {
  content: "\203A";
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.mobile-menu .menu-item-has-children.open > a::after {
  transform: rotate(90deg);
}
.mobile-menu .sub-menu li a {
  padding-left: 40px;
  font-size: 15px;
  font-weight: 500;
  color: #444;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

.menu-overlay.active { display: block; }

body.menu-open { overflow: hidden; }

/* ===== TOC Hide at 1400px ===== */
@media (min-width: 769px) {
  .single-hero-inner { padding: 32px 70px; }
}

@media (max-width: 1445px) {
  .single-content-wrap { grid-template-columns: 1fr; }
  .single-sidebar { display: none; }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
  .mobile-header { display: flex; }
  .site-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 150;
  }
  .site-sidebar.sidebar-open { transform: translateX(0); }
  .site-main {
    margin-left: 0;
    padding-top: calc(60px + var(--wp-admin--admin-bar--height, 0px));
    background: #F7F7F7;
  }
  .hero-section { padding: 0 32px 32px; }
  .hero-images { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .hero-images .hero-img-item:not(:first-child) { display: none; }
  .hero-images .hero-img-item:first-child { grid-row: span 1; }
  .section-wrap { padding: 28px 32px; }
  .features-section { padding: 32px; }
  .site-footer { padding: 32px; }
  .category-header { padding: 24px 32px; }
  .popular-section { padding: 24px 32px; }
  .post-list-section { padding: 24px 32px 32px; }
  .post-list-excerpt { display: none; }
  .post-list-meta { display: none; }
  .post-list-item { align-items: center; }
  .single-hero { height: 320px; }
  .single-content-wrap { padding: 24px 32px; grid-template-columns: 1fr; }
  .single-sidebar { display: none; }
  .related-section { padding: 24px 32px 32px; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  .top5-section .post-grid { grid-template-columns: repeat(3, 1fr); }
  .top5-section .post-grid .post-card:nth-child(n+4) { display: none; }
}

@media (max-width: 768px) {
  .hero-section { padding: 0 24px 24px; }
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-images { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .features-header { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { text-align: center; }
  .footer-brand .footer-logo { justify-content: center; }
  .footer-social { justify-content: center; }
  .footer-nav ul { align-items: center; }
  .footer-spacer { justify-content: center; }
  .footer-bottom { justify-content: center; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .top5-section .post-grid { grid-template-columns: 1fr; }
  .top5-section .post-grid .post-card:nth-child(n+4) { display: none; }
  .post-list-item { grid-template-columns: 130px 1fr; }
  .single-content-wrap { grid-template-columns: 1fr; }
  .single-sidebar { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .section-wrap, .popular-section, .post-list-section,
  .category-header, .single-content-wrap,
  .related-section, .site-footer { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
  .post-grid { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .top5-section .post-grid { grid-template-columns: 1fr; }
  .top5-section .post-grid .post-card:nth-child(n+4) { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .post-list-item { grid-template-columns: 1fr; }
  .post-list-thumb { aspect-ratio: 16/9; }
  .single-title { font-size: 28px; }
}
