/*
Theme Name: Songpaart Child
Theme URI: https://songpaart.tiond.com
Description: 송파 미술학원 탐색 플랫폼 전용 테마
Author: ROBOTION
Template: twentytwentyfive
Version: 1.0
Text Domain: songpaart
*/

:root {
  --sp-primary: #1a365d;
  --sp-primary-light: #2b4c7e;
  --sp-accent: #c49a6c;
  --sp-accent-light: #d4b896;
  --sp-accent-hover: #b38854;
  --sp-bg: #faf9f7;
  --sp-bg-warm: #f5f0eb;
  --sp-bg-card: #ffffff;
  --sp-text: #2d3748;
  --sp-text-light: #718096;
  --sp-text-muted: #a0aec0;
  --sp-border: #e8e0d8;
  --sp-border-light: #f0ebe5;
  --sp-shadow-sm: 0 1px 3px rgba(26,54,93,0.06);
  --sp-shadow-md: 0 4px 16px rgba(26,54,93,0.08);
  --sp-shadow-lg: 0 8px 32px rgba(26,54,93,0.10);
  --sp-radius-sm: 6px;
  --sp-radius-md: 12px;
  --sp-radius-lg: 20px;
  --sp-max-width: 1200px;
  --sp-content-width: 780px;
  --sp-gap: 8px;
  --sp-transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after { box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--sp-bg);
  color: var(--sp-text);
  line-height: 1.75;
  font-size: 16.5px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ====== HEADER ====== */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sp-border-light);
  transition: box-shadow var(--sp-transition);
}
.sp-header.scrolled { box-shadow: var(--sp-shadow-sm); }
.sp-header-inner {
  max-width: var(--sp-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.sp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--sp-primary);
}
.sp-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.sp-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sp-logo-sub {
  font-size: 0.72rem;
  color: var(--sp-text-light);
  font-weight: 400;
  display: block;
  margin-top: -2px;
}

/* NAV */
.sp-nav { display: flex; align-items: center; gap: 4px; }
.sp-nav a {
  color: var(--sp-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--sp-radius-sm);
  transition: all var(--sp-transition);
}
.sp-nav a:hover {
  background: var(--sp-bg-warm);
  color: var(--sp-primary);
}
.sp-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.sp-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sp-text);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--sp-transition);
}

/* MOBILE NAV */
@media (max-width: 768px) {
  .sp-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--sp-border-light);
    box-shadow: var(--sp-shadow-md);
  }
  .sp-nav.open { display: flex; }
  .sp-nav a { width: 100%; padding: 12px 16px; }
  .sp-menu-toggle { display: block; }
}

/* ====== SINGLE POST ====== */
.sp-single-wrap {
  max-width: var(--sp-content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.sp-single-hero {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--sp-radius-lg);
  margin-bottom: 40px;
}
.sp-single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--sp-text-light);
}
.sp-single-cat {
  background: var(--sp-bg-warm);
  color: var(--sp-accent-hover);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
}
.sp-single-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--sp-primary);
  margin: 0 0 32px;
}

/* POST CONTENT */
.sp-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sp-accent-light);
  letter-spacing: -0.02em;
  line-height: 1.4;
}
.sp-content h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--sp-primary-light);
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--sp-accent);
}
.sp-content p {
  margin: 0 0 20px;
  line-height: 1.8;
  word-break: keep-all;
}
.sp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sp-radius-md);
  margin: 32px 0;
  box-shadow: var(--sp-shadow-sm);
}
.sp-content ul, .sp-content ol {
  margin: 16px 0 24px;
  padding-left: 24px;
}
.sp-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.sp-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--sp-bg-warm);
  border-left: 4px solid var(--sp-accent);
  border-radius: 0 var(--sp-radius-sm) var(--sp-radius-sm) 0;
  font-style: normal;
  color: var(--sp-text);
}
.sp-content blockquote p { margin-bottom: 0; }
.sp-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  font-size: 0.92rem;
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  border: 1px solid var(--sp-border);
}
.sp-content th {
  background: var(--sp-primary);
  color: #fff;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
.sp-content td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--sp-border-light);
}
.sp-content tr:last-child td { border-bottom: none; }
.sp-content tr:nth-child(even) td { background: var(--sp-bg); }
.sp-content .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
}
.sp-content .table-wrap table { margin: 0; }

/* CALLOUT */
.sp-callout {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf8 100%);
  border: 1px solid #d0d8ea;
  border-radius: var(--sp-radius-md);
  padding: 24px 28px;
  margin: 32px 0;
}
.sp-callout-title {
  font-weight: 700;
  color: var(--sp-primary);
  margin-bottom: 8px;
  font-size: 1rem;
}

/* INLINE CHART */
.sp-bar-chart { margin: 28px 0; }
.sp-bar-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}
.sp-bar-label {
  min-width: 80px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sp-text);
  text-align: right;
}
.sp-bar-track {
  flex: 1;
  height: 28px;
  background: var(--sp-bg-warm);
  border-radius: 14px;
  overflow: hidden;
}
.sp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sp-primary), var(--sp-accent));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.8s ease;
}

/* SUMMARY BOX */
.sp-summary {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-md);
  padding: 24px 28px;
  margin-bottom: 40px;
  box-shadow: var(--sp-shadow-sm);
}
.sp-summary-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sp-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-summary-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--sp-accent);
  border-radius: 2px;
}
.sp-summary ul { margin: 0; padding-left: 20px; }
.sp-summary li { font-size: 0.92rem; color: var(--sp-text); margin-bottom: 6px; }

/* RELATED POSTS */
.sp-related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--sp-border-light);
}
.sp-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sp-primary);
  margin-bottom: 24px;
}
.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.sp-related-card {
  background: var(--sp-bg-card);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  box-shadow: var(--sp-shadow-sm);
  transition: all var(--sp-transition);
  text-decoration: none;
  color: var(--sp-text);
}
.sp-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sp-shadow-md);
}
.sp-related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.sp-related-card-body {
  padding: 16px 18px;
}
.sp-related-card-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: var(--sp-primary);
}

/* ====== FOOTER ====== */
.sp-footer {
  background: var(--sp-primary);
  color: rgba(255,255,255,0.7);
  padding: 56px 24px 32px;
  margin-top: 80px;
}
.sp-footer-inner {
  max-width: var(--sp-max-width);
  margin: 0 auto;
}
.sp-footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.sp-footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
}
.sp-footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.sp-footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--sp-transition);
}
.sp-footer-links a:hover { color: #fff; }
.sp-footer-legal {
  font-size: 0.78rem;
  line-height: 1.8;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  color: rgba(255,255,255,0.45);
}
.sp-footer-legal p { margin: 4px 0; }

/* ====== PAGE TEMPLATE ====== */
.sp-page-wrap {
  max-width: var(--sp-content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.sp-page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--sp-primary);
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.sp-page-content h2 { font-size: 1.3rem; font-weight: 700; color: var(--sp-primary); margin: 40px 0 16px; }
.sp-page-content p { margin: 0 0 16px; line-height: 1.8; }
.sp-page-content ul { margin: 12px 0 20px; padding-left: 24px; }
.sp-page-content li { margin-bottom: 6px; }

/* AI / Legal notices */
.ai-notice, .legal-notice, .affiliate-notice {
  max-width: var(--sp-content-width);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .sp-single-title { font-size: 1.5rem; }
  .sp-content h2 { font-size: 1.25rem; margin-top: 40px; }
  .sp-content h3 { font-size: 1.05rem; }
  .sp-single-wrap { padding: 32px 16px 60px; }
  .sp-page-wrap { padding: 32px 16px 60px; }
  .sp-footer { padding: 40px 16px 24px; }
  .sp-bar-label { min-width: 60px; font-size: 0.8rem; }
  .sp-related-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Remove WP defaults */
.wp-site-blocks, .is-layout-constrained, .has-global-padding { padding: 0 !important; }
.wp-block-post-content { max-width: none; }
