/*
Theme Name: Fault Ratio Theme
Theme URI: https://faultratio.rand3.com
Description: Custom theme for car insurance fault ratio information platform
Author: ROBOTION
Version: 1.0
Template: twentytwentyfive
*/

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

:root {
  --fr-primary: #1a365d;
  --fr-primary-light: #2b6cb0;
  --fr-accent: #e53e3e;
  --fr-accent-light: #fc8181;
  --fr-bg: #ffffff;
  --fr-bg-alt: #f7fafc;
  --fr-bg-dark: #1a202c;
  --fr-text: #2d3748;
  --fr-text-light: #718096;
  --fr-text-muted: #a0aec0;
  --fr-border: #e2e8f0;
  --fr-border-light: #edf2f7;
  --fr-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --fr-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --fr-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --fr-radius: 12px;
  --fr-radius-sm: 8px;
  --fr-radius-lg: 16px;
  --fr-transition: 200ms ease;
  --fr-max-width: 1200px;
  --fr-content-width: 780px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--fr-text);
  background: var(--fr-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fr-border-light);
  padding: 0 24px;
}
.site-header .header-inner {
  max-width: var(--fr-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fr-primary);
  font-weight: 700;
  font-size: 1.1em;
}
.site-header .brand img { height: 36px; width: 36px; border-radius: 8px; }
.site-header nav a {
  color: var(--fr-text);
  text-decoration: none;
  font-size: 0.92em;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--fr-radius-sm);
  transition: background var(--fr-transition), color var(--fr-transition);
}
.site-header nav a:hover {
  background: var(--fr-bg-alt);
  color: var(--fr-primary-light);
}

/* === SINGLE POST === */
.wp-site-blocks, .entry-content, .wp-block-post-content {
  max-width: var(--fr-content-width) !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
}
.entry-header, .wp-block-post-title {
  max-width: var(--fr-content-width);
  margin: 48px auto 24px !important;
  padding: 0 24px;
}
.wp-block-post-title, .entry-title {
  font-size: 2em !important;
  font-weight: 800 !important;
  color: var(--fr-primary) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em;
}
article .entry-content h2,
.wp-block-post-content h2 {
  font-size: 1.45em;
  font-weight: 700;
  color: var(--fr-primary);
  margin: 2.5em 0 1em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--fr-border-light);
}
article .entry-content h3,
.wp-block-post-content h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--fr-text);
  margin: 2em 0 0.8em;
}
article .entry-content p,
.wp-block-post-content p {
  font-size: 1.05em;
  line-height: 1.8;
  color: var(--fr-text);
  margin-bottom: 1.2em;
}
article .entry-content img,
.wp-block-post-content img {
  border-radius: var(--fr-radius);
  max-width: 100%;
  height: auto;
}
article .entry-content table,
.wp-block-post-content table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--fr-radius);
  overflow: hidden;
  box-shadow: var(--fr-shadow-sm);
}
article .entry-content table th {
  background: var(--fr-primary) !important;
  color: #fff !important;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
}
article .entry-content table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--fr-border-light);
}
article .entry-content table tr:nth-child(even) { background: var(--fr-bg-alt); }

article .entry-content blockquote {
  background: #f0f4f8;
  border-left: 4px solid var(--fr-primary-light);
  padding: 16px 20px;
  margin: 1.5em 0;
  border-radius: 0 var(--fr-radius-sm) var(--fr-radius-sm) 0;
  font-size: 0.95em;
  color: var(--fr-text);
}

article .entry-content ul, article .entry-content ol { padding-left: 1.5em; margin: 1em 0; }
article .entry-content li { margin-bottom: 0.5em; line-height: 1.7; }

/* Featured image */
.wp-post-image, .wp-block-post-featured-image img {
  border-radius: var(--fr-radius-lg) !important;
  max-height: 400px;
  object-fit: cover;
  width: 100% !important;
}

/* Legal notice */
.legal-notice { margin-top: 2em !important; font-size: 0.85em !important; }
.ai-notice { font-size: 0.85em !important; color: var(--fr-text-muted) !important; }

/* === FOOTER === */
.wp-block-template-part footer,
footer.site-footer {
  background: var(--fr-bg-dark) !important;
  color: #cbd5e0 !important;
  padding: 48px 24px !important;
  margin-top: 80px !important;
}
footer a { color: #90cdf4 !important; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .wp-block-post-title, .entry-title { font-size: 1.5em !important; }
  article .entry-content h2 { font-size: 1.25em; }
  .wp-site-blocks, .entry-content, .wp-block-post-content { padding: 0 16px !important; }
  .site-header .header-inner { height: 56px; }
  article .entry-content table { font-size: 0.9em; display: block; overflow-x: auto; }
}

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