/*
Theme Name: Gaein HwaeSaeng Info
Theme URI: https://gaeinhoesaeng.rand3.com/
Author: Rand3 Design Studio
Description: 개인회생 절차·기간·서류·심사기준 정보 플랫폼용 프리미엄 커스텀 테마. 딥네이비·블루 기반 디자인 시스템.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: gaeinhw
*/

/* ============ Design Tokens ============ */
:root {
  --navy: #12325B;
  --navy-deep: #0C2445;
  --blue: #2E6BE6;
  --blue-soft: #E8F0FE;
  --amber: #F2A33C;
  --amber-soft: #FDF1E0;
  --bg: #F2F6FC;
  --white: #FFFFFF;
  --ink: #1B2430;
  --gray-700: #46525F;
  --gray-600: #5A6675;
  --gray-400: #9AA6B5;
  --gray-300: #D5DCE8;
  --gray-200: #E6EBF4;
  --border: #E4EAF3;

  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", serif;

  --fs-display: clamp(2.4rem, 4.6vw, 3.75rem);
  --fs-h1: clamp(1.9rem, 3.4vw, 2.75rem);
  --fs-h2: clamp(1.45rem, 2.4vw, 2rem);
  --fs-h3: clamp(1.15rem, 1.7vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 1.4vw, 1.22rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px;
  --s6: 48px; --s7: 64px; --s8: 80px; --s9: 96px; --s10: 128px;

  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px; --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(18, 50, 91, 0.06), 0 2px 8px rgba(18, 50, 91, 0.05);
  --shadow-md: 0 4px 16px rgba(18, 50, 91, 0.08), 0 12px 32px rgba(18, 50, 91, 0.07);
  --shadow-lg: 0 12px 40px rgba(18, 50, 91, 0.14);

  --container: 1160px;
  --content-max: 760px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--navy); }
p { margin: 0 0 1.15em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.6em; line-height: 1.3; letter-spacing: -0.02em; color: var(--navy); font-weight: 800; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
ul, ol { padding-left: 1.35em; margin: 0 0 1.2em; }
li { margin-bottom: 0.4em; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; }
blockquote { margin: 1.6em 0; }
hr { border: 0; border-top: 1px solid var(--gray-200); margin: var(--s5) 0; }
::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ============ Layout ============ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s3); }
.section { padding: var(--s8) 0; }
.section--tint { background: var(--bg); }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: #DCE7F6; }
.section-head { max-width: 720px; margin-bottom: var(--s6); }
.section-head .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em;
  color: var(--blue); text-transform: uppercase; margin-bottom: 12px;
}
.section-head .kicker::before { content: ""; width: 28px; height: 2px; background: var(--amber); border-radius: 2px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--gray-600); font-size: var(--fs-lead); margin: 0; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: var(--r-full);
  font-weight: 700; font-size: 1rem; line-height: 1; cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--blue); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--amber); color: var(--navy-deep); }
.btn--accent:hover { background: #F5B25C; color: var(--navy-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--gray-300); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.btn--light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.28); }
.btn--light:hover { background: rgba(255,255,255,0.2); color: #fff; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 48px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; flex: none; box-shadow: var(--shadow-sm); }
.brand-name { font-size: 1.18rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; line-height: 1.2; }
.brand-tag { display: block; font-size: 0.72rem; font-weight: 500; color: var(--gray-600); letter-spacing: 0.02em; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-weight: 600; font-size: 0.95rem; color: var(--gray-700); border-radius: var(--r-full);
}
.main-nav a:hover { color: var(--blue); background: var(--blue-soft); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--blue); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; width: 48px; height: 48px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--gray-300); border-radius: 12px; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ============ Hero ============ */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; padding: var(--s10) 0 var(--s9); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 360px at 82% 12%, rgba(46, 107, 230, 0.42), transparent 62%),
    radial-gradient(520px 300px at 8% 88%, rgba(242, 163, 60, 0.14), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s7); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  color: #DCE7F6; font-size: var(--fs-xs); font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-full); margin-bottom: var(--s3);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.hero h1 { color: #fff; font-size: var(--fs-display); margin-bottom: var(--s3); }
.hero h1 .accent { color: var(--amber); }
.hero-lead { font-size: var(--fs-lead); color: #C7D5EA; max-width: 560px; margin-bottom: var(--s4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--s4); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 24px; margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid rgba(255,255,255,0.14); }
.hero-fact { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: #C7D5EA; }
.hero-fact strong { color: #fff; display: block; font-size: 1.05rem; line-height: 1.3; }
.hero-fact svg { width: 26px; height: 26px; color: var(--amber); flex: none; }
.hero-media { position: relative; }
.hero-media .img-frame {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.16);
}
.hero-media .img-frame img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hero-media .img-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,50,91,0.02) 55%, rgba(18,50,91,0.45) 100%);
}
.hero-note {
  position: absolute; left: 20px; bottom: 20px; right: 20px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: rgba(12, 36, 69, 0.78); backdrop-filter: blur(8px);
  color: #E4EDFB; font-size: var(--fs-xs); font-weight: 600;
  padding: 12px 16px; border-radius: var(--r-md); border: 1px solid rgba(255,255,255,0.14);
}

/* ============ Quick cards ============ */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.quick-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s4); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit; transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  position: relative; overflow: hidden;
}
.quick-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue), var(--amber)); opacity: 0; transition: opacity 0.22s var(--ease); }
.quick-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: inherit; }
.quick-card:hover::before { opacity: 1; }
.quick-card .qc-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); }
.quick-card .qc-icon svg { width: 24px; height: 24px; }
.quick-card h3 { font-size: 1.08rem; margin: 0; }
.quick-card p { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; }
.quick-card .qc-link { font-size: var(--fs-xs); font-weight: 700; color: var(--blue); margin-top: auto; }

/* ============ Timeline ============ */
.timeline-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: var(--gray-300); }
.timeline li { position: relative; padding: 0 0 var(--s4) 64px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .tl-node {
  position: absolute; left: 0; top: 2px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 0 0 5px var(--bg);
}
.timeline li:last-child .tl-node { border-color: var(--amber); color: var(--amber); }
.timeline h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline p { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; }
.tl-img { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.tl-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ============ Post cards ============ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.post-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: inherit; }
.post-card .pc-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--gray-200); }
.post-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.post-card:hover .pc-thumb img { transform: scale(1.05); }
.post-card .pc-body { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .pc-cat { font-size: var(--fs-xs); font-weight: 700; color: var(--blue); }
.post-card h3 { font-size: 1.08rem; margin: 0; line-height: 1.45; }
.post-card .pc-ex { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .pc-meta { font-size: var(--fs-xs); color: var(--gray-400); margin-top: auto; }

/* ============ Carousel ============ */
.carousel { position: relative; }
.carousel-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; display: flex; gap: var(--s4); margin: 0 -8px; padding: 8px; }
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-item { scroll-snap-align: center; flex: 0 0 340px; position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.carousel-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.carousel-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 44px 20px 18px;
  background: linear-gradient(180deg, transparent, rgba(12,36,69,0.82));
  color: #fff; font-weight: 700; font-size: 0.98rem;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gray-300);
  background: rgba(255,255,255,0.95); color: var(--navy); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease);
}
.carousel-btn:hover { background: var(--navy); color: #fff; }
.carousel-btn.prev { left: -6px; }
.carousel-btn.next { right: -6px; }

/* ============ Finance lookup ============ */
.finance { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.finance-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: var(--s5); align-items: center; padding: var(--s6); }
.finance-hero .img-frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.finance-hero .img-frame img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.finance-search { display: flex; gap: 10px; margin-top: var(--s3); }
.finance-search input {
  flex: 1; min-height: 52px; padding: 0 18px; border: 1px solid var(--gray-300);
  border-radius: var(--r-full); font-size: 1rem; font-family: inherit; background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.finance-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); background: #fff; }
.finance-status { font-size: var(--fs-sm); color: var(--gray-600); min-height: 24px; margin-top: 12px; }
.finance-results { list-style: none; margin: 0; padding: 0 0 var(--s4); max-height: 260px; overflow-y: auto; }
.finance-results li { border-top: 1px solid var(--gray-200); }
.finance-results button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 20px; font-family: inherit; font-size: 0.98rem; color: var(--ink); min-height: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.finance-results button:hover { background: var(--bg); }
.finance-results .s-code { font-size: var(--fs-xs); color: var(--gray-400); font-variant-numeric: tabular-nums; }
.finance-detail { border-top: 1px solid var(--gray-200); padding: var(--s5); background: var(--bg); }
.fd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--s3); flex-wrap: wrap; }
.fd-head h3 { margin: 0; font-size: 1.3rem; }
.fd-head .fd-meta { font-size: var(--fs-xs); color: var(--gray-600); }
.fd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s4); }
.fd-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s3); box-shadow: var(--shadow-sm); }
.fd-card .label { font-size: var(--fs-xs); color: var(--gray-600); font-weight: 600; margin-bottom: 6px; }
.fd-card .value { font-size: 1.35rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.fd-card .sub { font-size: var(--fs-xs); color: var(--gray-400); margin-top: 4px; }
.fd-table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.fd-note { font-size: var(--fs-xs); color: var(--gray-600); margin-top: var(--s3); line-height: 1.6; }
.fd-note a { text-decoration: underline; }

/* ============ Article content ============ */
.article-wrap { max-width: var(--content-max); margin: 0 auto; }
.article-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; margin-bottom: var(--s6); box-shadow: var(--shadow-md); }
.article-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.article-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,50,91,0.05), rgba(18,50,91,0.4)); }
.entry-content { font-size: 1.0625rem; line-height: 1.85; color: #26303D; }
.entry-content h2 {
  margin-top: var(--s7); padding-top: var(--s4); font-size: var(--fs-h2);
  border-top: 3px solid var(--navy); padding-left: 18px; position: relative;
}
.entry-content h2::before { content: ""; position: absolute; left: 0; top: var(--s4); width: 3px; height: 1.2em; background: var(--amber); border-radius: 2px; }
.entry-content h3 { margin-top: var(--s5); font-size: 1.25rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--r-md); margin: var(--s4) auto; box-shadow: var(--shadow-sm); }
.entry-content img.aligncenter { display: block; }

.entry-content table { border: 1px solid var(--gray-300); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.entry-content th {
  background: var(--navy); color: #fff; font-weight: 700; text-align: left;
  padding: 13px 16px; font-size: var(--fs-sm); line-height: 1.5;
}
.entry-content td { padding: 12px 16px; border-top: 1px solid var(--gray-200); font-size: var(--fs-sm); vertical-align: top; }
.entry-content tr:nth-child(even) td { background: #F8FAFD; }
.table-wrap { overflow-x: auto; margin: var(--s4) 0; border-radius: var(--r-md); }

.entry-content blockquote {
  background: var(--blue-soft); border-left: 4px solid var(--blue);
  padding: 18px 22px; border-radius: 0 var(--r-md) var(--r-md) 0; color: #2A3A55;
}
.entry-content blockquote p { margin: 0; font-size: 1.02rem; }

.callout {
  background: var(--amber-soft); border: 1px solid #F3D9AE; border-left: 4px solid var(--amber);
  border-radius: 0 var(--r-md) var(--r-md) 0; padding: 18px 22px; margin: var(--s4) 0;
}
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy-deep); }

.legal-notice, .ai-notice { max-width: var(--content-max); margin-left: auto; margin-right: auto; }

/* inline charts */
.chart-bar { margin: var(--s4) 0; }
.chart-bar .bar-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 12px; margin-bottom: 10px; }
.chart-bar .bar-label { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); }
.chart-bar .bar-track { height: 22px; background: var(--gray-200); border-radius: var(--r-full); overflow: hidden; }
.chart-bar .bar-fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--blue), #5B8DEF); }
.chart-bar .bar-fill.is-amber { background: linear-gradient(90deg, var(--amber), #F7BE74); }
.chart-bar .bar-val { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.steps { list-style: none; counter-reset: step; margin: var(--s4) 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 var(--s3) 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem;
}
.steps li strong { color: var(--navy); }

/* ============ TOC (easy-table-of-contents) ============ */
.ez-toc-container {
  background: var(--white) !important; border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important; padding: 20px 24px !important;
  box-shadow: var(--shadow-sm) !important; margin: var(--s4) 0 !important;
}
.ez-toc-title { color: var(--navy) !important; font-weight: 800 !important; font-size: 1.05rem !important; }
.ez-toc-list li a { color: var(--gray-700) !important; font-weight: 600; }
.ez-toc-list li a:hover { color: var(--blue) !important; }

/* ============ Related posts ============ */
.related { margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--gray-200); }
.related h2 { font-size: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }

/* ============ Footer ============ */
.site-footer { background: var(--navy-deep); color: #AFC2DD; font-size: var(--fs-sm); }
.footer-top { padding: var(--s8) 0 var(--s6); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s6); }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: #8FA6C6; }
.footer-brand p { color: #AFC2DD; max-width: 340px; margin-top: 14px; line-height: 1.7; }
.footer-col h3 { color: #fff; font-size: 0.98rem; margin-bottom: var(--s2); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #AFC2DD; }
.footer-col a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12); padding: var(--s4) 0 var(--s5);
  font-size: 0.8em; line-height: 1.75; color: #8FA6C6;
}
.footer-legal p { margin: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: var(--s3) 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.8em; color: #7E94B2; }

/* ============ Page hero (static) ============ */
.page-hero { background: var(--navy); color: #fff; padding: var(--s8) 0 var(--s6); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 320px at 85% 10%, rgba(46,107,230,0.4), transparent 60%); }
.page-hero h1 { color: #fff; position: relative; }
.page-hero p { color: #C7D5EA; position: relative; max-width: 640px; }

/* ============ Pagination ============ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: var(--s6); }
.pagination .page-numbers {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-300); border-radius: var(--r-sm); background: var(--white);
  color: var(--gray-700); font-weight: 700; padding: 0 12px;
}
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ============ Reveal motion ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-grid, .timeline-wrap, .finance-hero { grid-template-columns: 1fr; gap: var(--s5); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .carousel-item { flex-basis: 300px; }
}
@media (max-width: 768px) {
  .section { padding: var(--s7) 0; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--white);
    border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-md);
    padding: var(--s2) var(--s3) var(--s3);
    display: none; z-index: 99;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { width: 100%; min-height: 48px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .hero { padding: var(--s8) 0 var(--s7); }
  .hero-facts { gap: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .fd-cards { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: var(--s4); }
  .chart-bar .bar-row { grid-template-columns: 92px 1fr 56px; gap: 8px; }
}
@media (max-width: 480px) {
  .quick-grid, .post-grid { grid-template-columns: 1fr; }
  .carousel-item { flex-basis: 86%; }
  .carousel-btn { display: none; }
  .entry-content th, .entry-content td { padding: 10px 12px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
