/*
Theme Name: LeakCoverGuide Theme
Theme URI: https://leakcoverguide.mulmangcho.com
Description: 아파트 누수 보험 정보 플랫폼 전용 프리미엄 테마
Author: LeakCoverGuide
Version: 1.0.0
Template: twentytwentyfive
Text Domain: leakcoverguide
*/

:root {
  --lcg-primary: #1B2A4A;
  --lcg-primary-light: #2C3E6B;
  --lcg-accent: #2E7D8C;
  --lcg-accent-light: #3A9AAD;
  --lcg-accent-warm: #D4956A;
  --lcg-bg: #FAFBFC;
  --lcg-bg-warm: #F5F3F0;
  --lcg-surface: #FFFFFF;
  --lcg-surface-alt: #F0F2F5;
  --lcg-text: #1A1A2E;
  --lcg-text-secondary: #5A6275;
  --lcg-text-muted: #8B92A5;
  --lcg-border: #E2E5EB;
  --lcg-border-light: #F0F1F4;
  --lcg-shadow-sm: 0 1px 3px rgba(27,42,74,0.06);
  --lcg-shadow-md: 0 4px 16px rgba(27,42,74,0.08);
  --lcg-shadow-lg: 0 8px 32px rgba(27,42,74,0.12);
  --lcg-shadow-xl: 0 16px 48px rgba(27,42,74,0.16);
  --lcg-radius-sm: 6px;
  --lcg-radius-md: 12px;
  --lcg-radius-lg: 20px;
  --lcg-radius-xl: 28px;
  --lcg-transition: 200ms cubic-bezier(0.4,0,0.2,1);
  --lcg-max-width: 1200px;
  --lcg-content-width: 780px;
}

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

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

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

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--lcg-text);
  background: var(--lcg-bg);
  line-height: 1.75;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* WordPress default overrides */
.wp-site-blocks { padding: 0 !important; }
.has-global-padding { padding: 0 !important; }
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Common Header */
.lcg-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lcg-border-light);
  transition: box-shadow var(--lcg-transition);
}
.lcg-header.scrolled { box-shadow: var(--lcg-shadow-md); }
.lcg-header-inner {
  max-width: var(--lcg-max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lcg-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--lcg-primary);
  font-weight: 700; font-size: 1.1rem;
}
.lcg-logo img {
  width: 36px; height: 36px; object-fit: contain; border-radius: var(--lcg-radius-sm);
}
.lcg-nav { display: flex; gap: 4px; align-items: center; }
.lcg-nav a {
  padding: 8px 14px;
  color: var(--lcg-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--lcg-radius-sm);
  transition: all var(--lcg-transition);
}
.lcg-nav a:hover {
  color: var(--lcg-accent);
  background: rgba(46,125,140,0.06);
}

/* Mobile nav toggle */
.lcg-nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.lcg-nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--lcg-text);
  position: relative;
  transition: all var(--lcg-transition);
}
.lcg-nav-toggle span::before,
.lcg-nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--lcg-text); transition: all var(--lcg-transition);
}
.lcg-nav-toggle span::before { top: -6px; }
.lcg-nav-toggle span::after { top: 6px; }

@media (max-width: 768px) {
  .lcg-nav-toggle { display: flex; }
  .lcg-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--lcg-surface);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--lcg-border);
    box-shadow: var(--lcg-shadow-md);
  }
  .lcg-nav.open { display: flex; }
  .lcg-nav a { padding: 12px 16px; font-size: 1rem; }
}

/* Common Footer */
.lcg-footer {
  background: var(--lcg-primary);
  color: rgba(255,255,255,0.7);
  padding: 64px 24px 32px;
  margin-top: 80px;
}
.lcg-footer-inner {
  max-width: var(--lcg-max-width);
  margin: 0 auto;
}
.lcg-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.lcg-footer-brand {
  font-size: 1.1rem; font-weight: 700;
  color: #fff; margin-bottom: 12px;
}
.lcg-footer-brand a {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
}
.lcg-footer-logo-image {
  width: 36px; height: 36px; object-fit: contain;
  border-radius: var(--lcg-radius-sm);
}
.lcg-footer-desc {
  font-size: 0.88rem; line-height: 1.7;
  color: rgba(255,255,255,0.55);
}
.lcg-footer h4 {
  font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.lcg-footer-links {
  list-style: none; padding: 0;
}
.lcg-footer-links li { margin-bottom: 8px; }
.lcg-footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none; font-size: 0.88rem;
  transition: color var(--lcg-transition);
}
.lcg-footer-links a:hover { color: rgba(255,255,255,0.9); }
.lcg-footer-legal {
  margin-top: 32px;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.38);
}
.lcg-footer-legal p { margin: 4px 0; }
.lcg-footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
  .lcg-logo img,
  .lcg-footer-logo-image { width: 32px; height: 32px; }
  .lcg-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .lcg-footer-bottom {
    flex-direction: column; gap: 8px; text-align: center;
  }
}

/* Article / Post Styles */
.lcg-article-wrap {
  max-width: var(--lcg-content-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.lcg-article-hero {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--lcg-radius-lg);
  margin-bottom: 40px;
  box-shadow: var(--lcg-shadow-lg);
}
.lcg-article-wrap h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--lcg-primary);
  margin-bottom: 16px;
}
.lcg-article-meta {
  display: flex; gap: 16px; align-items: center;
  font-size: 0.85rem;
  color: var(--lcg-text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lcg-border-light);
}
.lcg-article-wrap h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--lcg-primary);
  margin: 56px 0 20px;
  padding-left: 16px;
  border-left: 3px solid var(--lcg-accent);
  line-height: 1.4;
}
.lcg-article-wrap h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lcg-primary-light);
  margin: 40px 0 16px;
}
.lcg-article-wrap p {
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--lcg-text);
  margin-bottom: 20px;
}
.lcg-article-wrap ul, .lcg-article-wrap ol {
  margin: 16px 0 24px 24px;
  line-height: 1.85;
}
.lcg-article-wrap li { margin-bottom: 8px; }
.lcg-article-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: var(--lcg-radius-md);
  margin: 24px 0;
  box-shadow: var(--lcg-shadow-sm);
}
.lcg-article-wrap blockquote {
  border-left: 3px solid var(--lcg-accent);
  background: var(--lcg-surface-alt);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--lcg-radius-md) var(--lcg-radius-md) 0;
  font-size: 0.98rem;
  color: var(--lcg-text-secondary);
}
.lcg-article-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  font-size: 0.92rem;
  border-radius: var(--lcg-radius-md);
  overflow: hidden;
  box-shadow: var(--lcg-shadow-sm);
}
.lcg-article-wrap table thead th {
  background: var(--lcg-primary);
  color: #fff;
  font-weight: 600;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.88rem;
}
.lcg-article-wrap table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--lcg-border-light);
  vertical-align: top;
}
.lcg-article-wrap table tbody tr:last-child td { border-bottom: none; }
.lcg-article-wrap table tbody tr:nth-child(even) {
  background: var(--lcg-surface-alt);
}
.lcg-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

/* Callout box */
.lcg-callout {
  background: linear-gradient(135deg, rgba(46,125,140,0.06), rgba(46,125,140,0.02));
  border: 1px solid rgba(46,125,140,0.15);
  border-radius: var(--lcg-radius-md);
  padding: 24px;
  margin: 28px 0;
}
.lcg-callout-title {
  font-weight: 700;
  color: var(--lcg-accent);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Info bar chart */
.lcg-bar-chart { margin: 24px 0; }
.lcg-bar-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.lcg-bar-label {
  min-width: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--lcg-text-secondary);
  text-align: right;
}
.lcg-bar-track {
  flex: 1; height: 28px;
  background: var(--lcg-surface-alt);
  border-radius: 14px;
  overflow: hidden;
}
.lcg-bar-fill {
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--lcg-accent), var(--lcg-accent-light));
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: width 1s ease;
}

/* TOC */
.lcg-toc {
  background: var(--lcg-surface);
  border: 1px solid var(--lcg-border);
  border-radius: var(--lcg-radius-md);
  padding: 24px 28px;
  margin: 0 0 40px;
}
.lcg-toc-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--lcg-primary);
  margin-bottom: 14px;
}
.lcg-toc ol {
  list-style: none; padding: 0; margin: 0;
  counter-reset: toc;
}
.lcg-toc li {
  counter-increment: toc;
  margin-bottom: 6px;
}
.lcg-toc li::before {
  content: counter(toc) ".";
  color: var(--lcg-accent);
  font-weight: 600;
  margin-right: 8px;
  font-size: 0.88rem;
}
.lcg-toc a {
  color: var(--lcg-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--lcg-transition);
}
.lcg-toc a:hover { color: var(--lcg-accent); }

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

/* CTA Button */
.lcg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--lcg-accent);
  color: #fff;
  border: none; border-radius: var(--lcg-radius-sm);
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--lcg-transition);
}
.lcg-btn:hover {
  background: var(--lcg-accent-light);
  box-shadow: var(--lcg-shadow-md);
  transform: translateY(-1px);
}

/* Legal notice in articles */
.legal-notice {
  font-size: 0.85em !important;
  color: #777 !important;
  background: #f8f9fa !important;
  border-left: 3px solid #cbd5e1 !important;
  padding: 10px 14px !important;
  margin-top: 2em !important;
  border-radius: 0 6px 6px 0 !important;
}
.ai-notice {
  font-size: 0.85em !important;
  color: #888 !important;
  margin-top: 2em !important;
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
  .lcg-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .lcg-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page template */
.lcg-page-wrap {
  max-width: var(--lcg-content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.lcg-page-wrap h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--lcg-primary);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--lcg-border);
}
.lcg-page-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lcg-primary);
  margin: 40px 0 16px;
}
.lcg-page-wrap p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--lcg-text);
}

/* Finance page */
.lcg-finance-wrap {
  max-width: var(--lcg-max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.lcg-search-box {
  display: flex; gap: 12px;
  margin: 32px 0;
}
.lcg-search-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--lcg-border);
  border-radius: var(--lcg-radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--lcg-transition);
  outline: none;
}
.lcg-search-input:focus { border-color: var(--lcg-accent); }
.lcg-search-btn {
  padding: 14px 32px;
  background: var(--lcg-accent);
  color: #fff;
  border: none;
  border-radius: var(--lcg-radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--lcg-transition);
}
.lcg-search-btn:hover { background: var(--lcg-accent-light); }

.lcg-company-card {
  background: var(--lcg-surface);
  border-radius: var(--lcg-radius-lg);
  box-shadow: var(--lcg-shadow-md);
  padding: 32px;
  margin: 24px 0;
}
.lcg-company-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--lcg-primary);
  margin-bottom: 8px;
}
.lcg-company-meta {
  font-size: 0.88rem;
  color: var(--lcg-text-muted);
  margin-bottom: 24px;
}
.lcg-ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.lcg-ratio-card {
  background: var(--lcg-surface-alt);
  border-radius: var(--lcg-radius-md);
  padding: 20px;
  text-align: center;
}
.lcg-ratio-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--lcg-accent);
}
.lcg-ratio-label {
  font-size: 0.82rem;
  color: var(--lcg-text-muted);
  margin-top: 4px;
}

/* Print */
@media print {
  .lcg-header, .lcg-footer, .lcg-nav { display: none !important; }
  .lcg-article-wrap { padding: 0; max-width: 100%; }
}
