/* ═══════════════════════════════════════════════════════
   CFA.PREP v2 — Learning Page Styles
   Unified design: spacious, readable, green accents
   Based on duration.html reference design
   ═══════════════════════════════════════════════════════ */

/* ── Reset (page-level) ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1F2937;
  background: #FFFFFF;
  line-height: 1.6;
}

.learn-page {
  min-height: 100vh;
  background: #FFFFFF;
}

/* ═══ HEADER ═══ */
.lp-header {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-header-nav {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.lp-back {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #F1F5F9;
  color: #64748B;
  font-size: 18px;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}
.lp-back:hover { background: #E2E8F0; color: #0F172A; }

.lp-header-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1E3A5F;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-header-nav a {
  color: #6B7280;
  text-decoration: none;
  font-size: 0.875rem;
  margin-left: 1.5rem;
}
.lp-header-nav a:hover { color: #1E3A5F; }

.lp-calc-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  flex-shrink: 0;
}
.lp-calc-btn:hover { background: #047857; }

/* ═══ HERO ═══ */
.lp-hero {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 40%, #F0F9FF 100%);
  color: #1F2937;
  padding: 3.5rem 2rem;
  text-align: center;
  border-bottom: 3px solid #059669;
}

.lp-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.lp-hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #059669;
  color: #FFFFFF;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.lp-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1E3A5F;
}

.lp-hero p,
.lp-hero-desc {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #4B5563;
}

.lp-hero-meta {
  display: flex;
  gap: 16px;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #6B7280;
  justify-content: center;
}

.lp-hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.lp-hero-cta a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.lp-hero-cta a.primary {
  background: #059669;
  color: #FFFFFF;
}
.lp-hero-cta a.primary:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}
.lp-hero-cta a.secondary {
  border: 2px solid #059669;
  color: #059669;
}
.lp-hero-cta a.secondary:hover {
  background: rgba(5,150,105,0.06);
}

/* ═══ MAIN CONTENT ═══ */
.lp-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ── Section styling ── */
.lp-section {
  margin-bottom: 2.5rem;
}

.lp-content h2,
.lp-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  color: #1E3A5F;
  border-bottom: 3px solid #059669;
  padding-bottom: 0.65rem;
  border-top: none;
  padding-top: 0;
}

.lp-content h2:first-child,
.lp-section:first-child h2 {
  margin-top: 0;
}

.lp-content h3,
.lp-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1.5rem 0 0.85rem;
  color: #374151;
}

.lp-content p,
.lp-section p {
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #4B5563;
}

.lp-content ul,
.lp-content ol,
.lp-section ul,
.lp-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  list-style: revert;
}

.lp-content li,
.lp-section li {
  margin-bottom: 0.65rem;
  color: #4B5563;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ═══ CALLOUT ═══ */
.lp-callout {
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}
.lp-callout.insight {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-left: 4px solid #2563EB;
  color: #1E40AF;
}
.lp-callout.warning {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-left: 4px solid #D97706;
  color: #92400E;
}
.lp-callout.tip {
  background: linear-gradient(135deg, #F0F9FF 0%, #ECFDF5 100%);
  border-left: 4px solid #059669;
  color: #065F46;
}
/* Duration-style callout (without modifier class) */
.lp-callout:not(.insight):not(.warning):not(.tip) {
  background: linear-gradient(135deg, #F0F9FF 0%, #ECFDF5 100%);
  border-left: 4px solid #059669;
}
.lp-callout-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}
.lp-callout p {
  margin: 0;
  color: inherit;
  font-size: 0.95rem;
}

/* ═══ FORMULA ═══ */
.lp-formula {
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'IBM Plex Mono', monospace;
  overflow-x: auto;
}
.lp-formula strong { color: #2563EB; }
.lp-formula-title {
  font-weight: 600;
  color: #1E3A5F;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-family: 'Noto Sans KR', sans-serif;
}
.lp-formula-content {
  font-size: 1rem;
  color: #374151;
  line-height: 2;
}
.lp-formula-var {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6B7280;
}

/* ═══ EXAMPLE BOX ═══ */
.lp-example {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
}
.lp-example-title {
  font-weight: 600;
  color: #D97706;
  margin-bottom: 0.75rem;
  font-size: 1.02rem;
}
.lp-example p {
  color: #78350F;
  margin-bottom: 0.75rem;
}
.lp-example-calc {
  background: #FFFFFF;
  padding: 1rem;
  border-radius: 0.375rem;
  margin: 1rem 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: #1F2937;
  overflow-x: auto;
}

/* Learn-tvm style example box (card style) */
.lp-example-header {
  background: #F9FAFB;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  border-bottom: 1px solid #E5E7EB;
}
.lp-example-body {
  padding: 1.25rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.8;
}
.lp-example-steps {
  list-style: none !important;
  padding: 0 !important;
  margin: 12px 0 0 0 !important;
}
.lp-example-steps li {
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid #F1F5F9;
}
.lp-example-steps li:last-child { border-bottom: none; }
.lp-example-steps li .step-num {
  position: absolute; left: 0; top: 10px;
  width: 22px; height: 22px;
  background: #059669; color: #fff;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lp-example-result {
  background: #ECFDF5;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 14px;
  font-weight: 600;
  color: #065F46;
  text-align: center;
  font-size: 1rem;
}

/* ═══ INFOGRAPHIC ═══ */
.lp-infographic {
  background: #F3F4F6;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
}
.lp-infographic svg {
  max-width: 100%;
  height: auto;
  display: inline-block;
}
.lp-infographic-caption {
  font-size: 0.8rem;
  color: #94A3B8;
  margin-top: 8px;
}

/* ═══ COMPARISON TABLE ═══ */
.lp-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.lp-comparison-table thead {
  background: linear-gradient(135deg, #1E3A5F 0%, #059669 100%);
  color: white;
}
.lp-comparison-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}
.lp-comparison-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.9rem;
  color: #334155;
}
.lp-comparison-table tbody tr:last-child td { border-bottom: none; }
.lp-comparison-table tbody tr:hover { background: #F9FAFB; }
.lp-comparison-table .factor { font-weight: 600; color: #1E3A5F; }
.lp-comparison-table .highlight { background: #EFF6FF; font-weight: 700; color: #1E40AF; }
.lp-comparison-table .increase { color: #DC2626; font-weight: 500; }
.lp-comparison-table .decrease { color: #059669; font-weight: 500; }

/* ═══ REAL CASE STUDY ═══ */
.lp-realcase {
  background: linear-gradient(135deg, #F0F9FF 0%, #F0FDF4 100%);
  border: 2px solid #059669;
  padding: 2rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
}
.lp-realcase-header {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #FCD34D;
  border-radius: 0.5rem 0.5rem 0 0;
  margin: -2rem -2rem 1.5rem;
}
.lp-realcase-badge {
  display: inline-block;
  background: #D97706; color: #fff;
  padding: 4px 12px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700;
}
.lp-realcase-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 1rem;
}
.lp-realcase-body {
  font-size: 0.95rem;
  color: #1F2937;
  line-height: 1.85;
}
.lp-realcase-body .persona {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #FFFBEB; border-radius: 10px;
  margin-bottom: 1rem;
}
.lp-realcase-body .persona-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #FCD34D;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.lp-realcase-body .persona-info {
  font-size: 0.85rem; color: #78350F; line-height: 1.5;
}
.lp-realcase-body .persona-info strong {
  font-size: 0.95rem; display: block; margin-bottom: 2px;
}
.lp-realcase-takeaway {
  background: #F0FDF4;
  border-left: 4px solid #059669;
  padding: 14px 18px;
  margin-top: 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem; color: #065F46;
  font-weight: 600; line-height: 1.6;
}
.lp-realcase-item { margin-bottom: 1.5rem; }
.lp-realcase-item h4 {
  font-weight: 600; color: #059669;
  font-size: 1.05rem; margin-bottom: 0.75rem;
}
.lp-realcase-item p {
  color: #1F2937; font-size: 0.95rem;
}

/* ═══ PRACTICE SECTION ═══ */
.lp-practice {
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
}
.lp-practice-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 1.25rem;
}
.lp-practice-q {
  font-size: 0.95rem;
  color: #1E3A5F;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.lp-practice-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
}
.lp-practice-item h4 {
  font-weight: 600; color: #1F2937;
  margin-bottom: 0.75rem; font-size: 1.02rem;
}
.lp-practice-item p {
  color: #4B5563; margin-bottom: 1rem; font-size: 0.95rem;
}
.lp-practice-buttons,
.lp-practice-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.lp-practice-calc {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: #059669;
  color: white;
  border: none;
  border-radius: 0.4rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.3s ease;
  font-family: 'Noto Sans KR', sans-serif;
}
.lp-practice-calc:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}
.lp-practice-toggle,
.lp-practice-answer-toggle,
.lp-answer-toggle {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #E5E7EB;
  color: #1F2937;
  border: none;
  border-radius: 0.4rem;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.lp-practice-toggle:hover,
.lp-practice-answer-toggle:hover,
.lp-answer-toggle:hover {
  background: #D1D5DB;
}
.lp-practice-answer {
  background: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  display: none;
  margin-top: 0.75rem;
}
.lp-practice-answer.show { display: block; }
.lp-answer-content {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: #F3F4F6;
  border-left: 3px solid #059669;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  color: #1F2937;
}
.lp-answer-content.show { display: block; }
.lp-answer-content code {
  background: #FFFFFF;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'IBM Plex Mono', monospace;
  color: #DC2626;
}

/* ═══ RELATED CONTENT ═══ */
.lp-related {
  background: #F9FAFB;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  border-top: 3px solid #059669;
}
.lp-related-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 1.25rem;
}
.lp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.lp-related-card {
  background: #FFFFFF;
  padding: 1.25rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lp-related-card:hover {
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
  transform: translateY(-2px);
}
.lp-related-card h3,
.lp-related-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E3A5F;
  margin-bottom: 0.4rem;
}
.lp-related-card p,
.lp-related-card-desc {
  font-size: 0.82rem;
  color: #6B7280;
  line-height: 1.5;
  margin: 0;
}
.lp-related-emoji { font-size: 22px; flex-shrink: 0; }
.lp-related-body { flex: 1; }
.lp-related-arrow { color: #CBD5E1; font-size: 14px; }
.lp-related-card:hover .lp-related-arrow { color: #059669; }

/* ═══ FLOATING CALC BUTTON (mobile) ═══ */
.lp-float-calc {
  position: fixed; bottom: 20px; right: 16px;
  width: 56px; height: 56px;
  background: #059669; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(5,150,105,.4);
  text-decoration: none; z-index: 50;
  transition: all .2s;
}
.lp-float-calc:hover { background: #047857; transform: scale(1.05); }

/* ═══ FOOTER ═══ */
.lp-footer {
  background: #1F2937;
  color: white;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
}
.lp-footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.lp-footer-section h4 {
  font-weight: 600; margin-bottom: 0.75rem; font-size: 0.9rem;
}
.lp-footer-section a {
  color: #D1D5DB; text-decoration: none;
  display: block; margin-bottom: 0.5rem;
}
.lp-footer-section a:hover { color: #FFFFFF; }
.lp-footer a { color: #64748B; margin: 0 8px; text-decoration: none; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .lp-hero h1 { font-size: 1.65rem; }
  .lp-hero p, .lp-hero-desc { font-size: 0.95rem; }
  .lp-hero { padding: 2.5rem 1.25rem; }
  .lp-content h2, .lp-section h2 { font-size: 1.35rem; }
  .lp-content h3, .lp-section h3 { font-size: 1.1rem; }
  .lp-content { padding: 1.5rem 1.25rem 5rem; max-width: 100%; }
  .lp-header-nav { flex-direction: column; gap: 0.75rem; }
  .lp-header-nav a { margin-left: 0; }
  .lp-comparison-table th, .lp-comparison-table td {
    padding: 0.65rem; font-size: 0.82rem;
  }
  .lp-footer-content { flex-direction: column; }
  .lp-practice-buttons, .lp-practice-btns { flex-direction: column; }
  .lp-practice-calc, .lp-answer-toggle, .lp-practice-toggle { width: 100%; text-align: center; }
  .lp-related-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .lp-float-calc { display: none; }
  .lp-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .lp-hero h1 { font-size: 1.4rem; }
  .lp-content h2, .lp-section h2 { font-size: 1.25rem; }
}
