/* ================================================================
   국민성장펀드 안내 — 딥 그린 팔레트 (#15803D)
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:       #15803D;
  --brand-dark:  #14532D;
  --brand-light: #DCFCE7;
  --brand-alt:   #4ADE80;
  --gold:        #F59E0B;
  --bg:          #F0FDF4;
  --surface:     #FFFFFF;
  --surface2:    #F8FAFC;
  --border:      #E2E8F0;
  --text:        #0F172A;
  --text-muted:  #64748B;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 4px 20px rgba(21,128,61,.10);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --danger:      #DC2626;
  --success:     #059669;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--bg); color: var(--text); line-height: 1.7; min-height: 100vh; padding: 0; }
a { color: var(--brand); text-decoration: none; }

/* ===== Header (풀블리드 · 좌측 정렬) ===== */
.main-header {
  width: 100%;
  background: linear-gradient(135deg, #15803D 0%, #14532D 100%);
  color: #fff;
  padding: 2.2rem 1rem 1.8rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.main-header::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(245,158,11,.20), transparent 70%);
  pointer-events: none;
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1rem;
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.header-text { flex: 1; min-width: 0; }
.main-header h1 { font-size: 1.65rem; color: #fff; margin: 0 0 .25rem; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; }
.main-header h1 a.logo-link { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.main-header .logo-emoji { font-size: 1.5rem; }
.main-header .subtitle { font-size: .95rem; color: rgba(255,255,255,.85); margin: 0; }
.btn-share-header {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(4px); padding: .55rem 1rem; font-size: .9rem; font-weight: 600;
  border-radius: 999px; cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.btn-share-header:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }

/* Top AdSense (풀블리드) */
.ad-container { text-align: center; margin: 1rem auto; max-width: 800px; }
.ad-container.top-ad { width: 100%; max-width: none; background: #f9fafb; padding: 8px 0; border-bottom: 1px solid #e5e7eb; margin: 0; }
.ad-container.bottom-ad { margin-top: 1.5rem; }

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.layout-container { display: flex; gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.main-column { flex: 3; min-width: 0; }
.app-sidebar { flex: 1; min-width: 280px; position: sticky; top: 1.5rem; align-self: flex-start; max-height: calc(100vh - 3rem); overflow-y: auto; scrollbar-width: none; }
.app-sidebar::-webkit-scrollbar { display: none; }
@media (max-width: 1024px) {
  .layout-container { flex-direction: column; }
  .app-sidebar { display: none; }
}

/* ===== Sections ===== */
.calculator-section, .info-section, .scenario-section, .popular-section, .faq-section {
  background: #fff; padding: 1.8rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.calculator-section h2, .info-section h2, .scenario-section h2, .popular-section h2, .faq-section h2 {
  color: var(--brand-dark); margin: 0 0 12px; font-size: 1.4rem; font-weight: 800;
}
.calculator-section p, .info-section p { color: #334155; margin-bottom: 10px; line-height: 1.8; }
.calculator-section ul, .info-section ul { padding-left: 1.5rem; list-style: disc; margin: 12px 0; }
.calculator-section ul li, .info-section ul li { margin-bottom: 8px; line-height: 1.8; color: #334155; }
.calculator-section ul li::marker, .info-section ul li::marker { color: var(--brand); }
.section-intro { color: #64748b; margin-bottom: 1rem; font-size: 14px; }

/* ===== Bracket Table ===== */
.table-scroll { overflow-x: auto; }
.bracket-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bracket-table th { background: var(--brand); color: #fff; padding: 10px 12px; text-align: left; font-weight: 700; }
.bracket-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.bracket-table tr:hover { background: #f0fdf4; }
.bracket-table .amt { font-weight: 800; color: var(--brand-dark); }
.bracket-table .muted { color: #64748b; font-size: 12.5px; display: block; margin-top: 2px; }
.bracket-note { background: #f0fdf4; border-left: 3px solid var(--brand); padding: 12px 14px; margin: 12px 0; font-size: 13.5px; color: var(--brand-dark); border-radius: 0 8px 8px 0; line-height: 1.7; }

/* ===== Hero info card (highlight) ===== */
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.hero-stat { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #bbf7d0; border-radius: 12px; padding: 14px; text-align: center; }
.hero-stat-num { font-size: 22px; font-weight: 900; color: var(--brand-dark); }
.hero-stat-lbl { font-size: 13px; color: #475569; margin-top: 2px; }

/* ===== Scenario Grid ===== */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.scenario-card { display: block; padding: 14px 16px; background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #bbf7d0; border-radius: 12px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.scenario-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(21,128,61,.15); border-color: var(--brand); }
.scenario-head { font-weight: 800; color: var(--brand-dark); font-size: 15px; }
.scenario-sub { font-size: 13px; color: #475569; margin-top: 2px; }
.scenario-note { font-size: 12px; color: #64748b; margin-top: 4px; }

/* ===== Popular Grid ===== */
.popular-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.popular-tag { display: inline-flex; align-items: center; padding: 6px 12px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; font-size: 13px; color: var(--brand-dark); text-decoration: none; transition: all .15s; }
.popular-tag:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ===== Related Grid (자매 사이트) ===== */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.related-link { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.related-link:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); border-color: var(--brand); }
.rel-emoji { font-size: 28px; flex-shrink: 0; }
.rel-body { flex: 1; min-width: 0; }
.rel-title { font-size: 14.5px; font-weight: 700; color: var(--brand-dark); margin-bottom: 2px; }
.rel-desc { font-size: 12.5px; color: #64748b; line-height: 1.4; }

/* ===== Info Grid (정부 사이트) ===== */
.info-grid-link { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.gov-link { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; text-decoration: none; color: var(--brand-dark); font-size: 14px; transition: all .15s; }
.gov-link:hover { background: #f0fdf4; border-color: var(--brand); }
.gov-emoji { font-size: 22px; flex-shrink: 0; }

/* ===== FAQ ===== */
.faq-item { padding: 14px 0; border-bottom: 1px solid #e5e7eb; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { font-weight: 700; color: var(--brand-dark); cursor: pointer; padding: 6px 0 6px 1.2rem; font-size: 15px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "▶"; position: absolute; left: 0; font-size: .8rem; color: var(--brand); transition: transform .2s; }
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item p { color: #475569; padding: 8px 0 4px 1.2rem; line-height: 1.8; font-size: 14px; }

/* ===== CTA ===== */
.cta-banner { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 1.6rem; border-radius: 14px; margin: 1rem 0 1.5rem; text-align: center; }
.cta-banner h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.cta-banner p { font-size: 14px; opacity: .92; margin-bottom: 12px; }
.cta-banner a { display: inline-block; background: var(--gold); color: #1f2937; padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; }

/* ===== Footer ===== */
.main-footer { background: #fff; padding: 1.5rem 1rem; text-align: center; color: #64748b; font-size: 13px; line-height: 1.7; border-top: 1px solid var(--border); margin-top: 2rem; }
.main-footer a { color: var(--brand); margin: 0 6px; }

/* ===== 중앙 광고 슬롯 시스템 (W35 표준 · 그린) ===== */
.ad-slot { display: block; width: 100%; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.08); margin: 12px auto; }
.ad-slot.banner-wide { aspect-ratio: 4/1; max-width: 800px; }
.ad-slot.banner-square { aspect-ratio: 1/1; max-width: 320px; }
.ad-slot .ad-inner { position: absolute; inset: 0; padding: 16px 22px; display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.ad-slot.has-image .ad-inner { background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.ad-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.ad-slot .ad-label { position: absolute; top: 6px; right: 10px; font-size: 10px; opacity: .8; z-index: 2; }
.ad-slot .ad-title { font-size: 18px; font-weight: 800; line-height: 1.3; }
.ad-slot .ad-subtitle { font-size: 13px; opacity: .9; line-height: 1.4; }
.ad-slot .ad-cta { display: inline-block; align-self: flex-start; margin-top: 8px; padding: 6px 14px; background: rgba(255,255,255,.25); border-radius: 20px; font-size: 13px; font-weight: 700; }

.ad-slot.kakao-channel,
.ad-slot[data-ad-type="kakao-channel"] { background: #FEE500; }
.ad-slot.kakao-channel .ad-title,
.ad-slot[data-ad-type="kakao-channel"] .ad-title { color: #3C1E1E; }
.ad-slot.kakao-channel .ad-subtitle,
.ad-slot[data-ad-type="kakao-channel"] .ad-subtitle { color: rgba(60,30,30,.85); }
.ad-slot.kakao-channel .ad-cta,
.ad-slot[data-ad-type="kakao-channel"] .ad-cta { background: #3C1E1E; color: #FEE500; }

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .main-header h1 { font-size: 1.4rem; }
  .btn-share-header { align-self: stretch; text-align: center; }
}
