/*
Theme Name: Saejip Guide
Theme URI: https://info.worldofpixelnation.com
Template: twentytwentyfive
Description: Premium child theme for move-in cleaning guide
Version: 1.0
Author: ROBOTION
Text Domain: saejip-guide
*/

:root {
  --sg-primary: #1a73a7;
  --sg-primary-dark: #135a84;
  --sg-primary-light: #e8f4fc;
  --sg-accent: #4ecdc4;
  --sg-accent-light: #e6f9f7;
  --sg-text: #2d3748;
  --sg-text-light: #718096;
  --sg-bg: #ffffff;
  --sg-bg-alt: #f7fafc;
  --sg-bg-warm: #fafafa;
  --sg-border: #e2e8f0;
  --sg-border-light: #edf2f7;
  --sg-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --sg-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --sg-shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --sg-radius-sm: 8px;
  --sg-radius-md: 12px;
  --sg-radius-lg: 16px;
  --sg-radius-xl: 24px;
  --sg-max-width: 1200px;
  --sg-content-width: 780px;
  --sg-gap: 8px;
  --sg-transition: 200ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Noto Sans KR', sans-serif;
  color: var(--sg-text);
  background: var(--sg-bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Remove WordPress traces */
.wp-site-blocks { padding: 0 !important; }
.wp-block-post-content { max-width: 100% !important; padding: 0 !important; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--sg-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-top: 2.5em; margin-bottom: 0.8em; padding-bottom: 0.5em; border-bottom: 2px solid var(--sg-primary-light); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); margin-top: 1.8em; margin-bottom: 0.6em; }

p { margin-bottom: 1.2em; line-height: 1.78; }

a { color: var(--sg-primary); text-decoration: none; transition: color var(--sg-transition); }
a:hover { color: var(--sg-primary-dark); }

/* Content area */
.entry-content, .sg-post-content {
  max-width: var(--sg-content-width);
  margin: 0 auto;
  padding: 0 calc(var(--sg-gap) * 3);
}

.entry-content h2 { color: var(--sg-primary-dark); position: relative; }
.entry-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--sg-accent);
  border-radius: 2px;
  margin-right: 12px;
  vertical-align: middle;
}

/* Tables */
.entry-content table, .sg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5em 0;
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius-md);
  overflow: hidden;
  font-size: 0.92em;
}

.entry-content table thead th, .sg-table thead th {
  background: var(--sg-primary);
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  border: none;
}

.entry-content table tbody td, .sg-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sg-border-light);
}

.entry-content table tbody tr:last-child td { border-bottom: none; }
.entry-content table tbody tr:nth-child(even) { background: var(--sg-bg-alt); }
.entry-content table tbody tr:hover { background: var(--sg-primary-light); }

/* Mobile table scroll */
@media (max-width: 640px) {
  .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Blockquote / Callout */
.entry-content blockquote, .sg-callout {
  background: var(--sg-primary-light);
  border-left: 4px solid var(--sg-primary);
  padding: 20px 24px;
  margin: 1.5em 0;
  border-radius: 0 var(--sg-radius-md) var(--sg-radius-md) 0;
  font-size: 0.95em;
  color: var(--sg-primary-dark);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Lists */
.entry-content ul, .entry-content ol {
  margin: 1em 0 1.5em 1.5em;
  line-height: 1.8;
}
.entry-content li { margin-bottom: 0.4em; padding-left: 0.3em; }
.entry-content ul li::marker { color: var(--sg-accent); }

/* Images in content */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sg-radius-md);
  margin: 1.5em 0;
  box-shadow: var(--sg-shadow-sm);
}

.entry-content figure {
  margin: 2em 0;
  text-align: center;
}

.entry-content figcaption {
  font-size: 0.85em;
  color: var(--sg-text-light);
  margin-top: 8px;
}

/* Summary box */
.sg-summary-box {
  background: linear-gradient(135deg, var(--sg-primary-light), var(--sg-accent-light));
  border-radius: var(--sg-radius-lg);
  padding: 24px 28px;
  margin: 1.5em 0 2em;
  border: 1px solid var(--sg-border);
}
.sg-summary-box strong { color: var(--sg-primary-dark); }

/* Chart bars */
.sg-bar-chart { margin: 1.5em 0; }
.sg-bar-item { display: flex; align-items: center; margin-bottom: 10px; }
.sg-bar-label { width: 120px; font-size: 0.88em; color: var(--sg-text-light); flex-shrink: 0; }
.sg-bar-track { flex: 1; height: 28px; background: var(--sg-bg-alt); border-radius: 14px; overflow: hidden; }
.sg-bar-fill { height: 100%; background: linear-gradient(90deg, var(--sg-primary), var(--sg-accent)); border-radius: 14px; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: #fff; font-size: 0.78em; font-weight: 600; transition: width 0.6s ease; }

/* Step diagram */
.sg-steps { display: flex; gap: 0; margin: 2em 0; flex-wrap: wrap; justify-content: center; }
.sg-step { flex: 1; min-width: 120px; max-width: 180px; text-align: center; padding: 16px 12px; position: relative; }
.sg-step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--sg-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9em; margin-bottom: 8px; }
.sg-step-text { font-size: 0.85em; color: var(--sg-text); line-height: 1.4; }
.sg-step:not(:last-child)::after { content: ''; position: absolute; top: 32px; right: -8px; width: 16px; height: 2px; background: var(--sg-border); }

@media (max-width: 640px) {
  .sg-steps { flex-direction: column; align-items: center; }
  .sg-step { max-width: 280px; }
  .sg-step:not(:last-child)::after { display: none; }
  .sg-bar-label { width: 80px; font-size: 0.8em; }
}

/* Notices */
.ai-notice, .legal-notice {
  font-size: 0.85em !important;
  color: #888 !important;
}

.legal-notice {
  background: #f8f9fa !important;
  border-left: 3px solid #cbd5e1 !important;
  padding: 10px 14px !important;
  border-radius: 0 6px 6px 0 !important;
}

/* Buttons */
.sg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--sg-primary);
  color: #fff;
  border: none;
  border-radius: var(--sg-radius-md);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--sg-transition);
  text-decoration: none;
}
.sg-btn:hover { background: var(--sg-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--sg-shadow-md); }

/* Related posts cards */
.sg-related-posts { margin: 3em 0 2em; }
.sg-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 16px; }
.sg-related-card {
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius-md);
  overflow: hidden;
  transition: all var(--sg-transition);
  background: var(--sg-bg);
}
.sg-related-card:hover { box-shadow: var(--sg-shadow-md); transform: translateY(-2px); }
.sg-related-card img { width: 100%; height: 140px; object-fit: cover; }
.sg-related-card .sg-rc-body { padding: 14px 16px; }
.sg-related-card .sg-rc-title { font-size: 0.95em; font-weight: 600; color: var(--sg-text); line-height: 1.4; }

/* TOC */
.sg-toc {
  background: var(--sg-bg-alt);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius-md);
  padding: 20px 24px;
  margin: 1.5em 0 2em;
}
.sg-toc-title { font-weight: 700; margin-bottom: 12px; color: var(--sg-primary-dark); font-size: 0.95em; }
.sg-toc ol { margin: 0; padding-left: 1.2em; }
.sg-toc li { margin-bottom: 6px; font-size: 0.9em; }
.sg-toc a { color: var(--sg-text); }
.sg-toc a:hover { color: var(--sg-primary); }

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .sg-fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .sg-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print */
@media print {
  body { font-size: 12pt; }
  .sg-toc, .sg-related-posts, .sg-btn { display: none; }
}
