/* ==========================================================================
   ML Kids — theme stylesheet
   Finance & parenting content · premium business design
   ========================================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --ink: #0b1f33;
  --ink-2: #33475b;
  --ink-3: #64748b;
  --line: #e3e9f1;
  --primary: #0f3d5c;
  --primary-2: #0a2c44;
  --accent: #10b981;
  --accent-2: #059669;
  --gold: #eab308;
  --gold-soft: #fdf3d3;
  --accent-soft: #e6f8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, .06);
  --shadow-md: 0 12px 32px -14px rgba(11, 31, 51, .22);
  --shadow-lg: 0 34px 70px -26px rgba(11, 31, 51, .32);
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --maxw: 1160px;
  --header-h: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { border-radius: var(--radius-sm); }
a { color: var(--primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 .55em;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .35em; }
blockquote {
  margin: 1.6em 0; padding: .4em 1.4em;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
}
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }
pre { background: var(--primary-2); color: #e7eef7; padding: 1.2em 1.4em; border-radius: var(--radius-sm); overflow: auto; }
pre code { background: transparent; color: inherit; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
th, td { border: 1px solid var(--line); padding: .6em .8em; text-align: left; }
th { background: var(--surface-2); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0; z-index: 300; }
.skip-link:focus { left: 0; color: #fff; }
/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; }
.brand-tag { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .14em; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 999px; }
.main-nav a:hover { color: var(--ink); background: var(--surface-2); }
.main-nav a.active { color: #fff; background: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-switcher .lang { font-size: .82rem; font-weight: 600; color: var(--ink-3); padding: 6px 9px; border-radius: 8px; text-transform: uppercase; letter-spacing: .03em; }
.lang-switcher .lang:hover { color: var(--ink); background: var(--surface-2); }
.lang-switcher .lang.is-active { color: #fff; background: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(16, 185, 129, .22), transparent 60%),
    radial-gradient(900px 480px at -10% 10%, rgba(15, 61, 92, .18), transparent 55%),
    linear-gradient(180deg, #0a2c44 0%, #0f3d5c 100%);
  color: #eaf1f8;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  padding-top: 72px; padding-bottom: 72px;
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(234, 179, 8, .12); border: 1px solid rgba(234, 179, 8, .3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero-title { color: #fff; margin-bottom: 18px; }
.hero-sub { color: #c4d3e2; font-size: 1.12rem; max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 34px; margin: 0; padding: 0; }
.hero-stats li { display: flex; flex-direction: column; margin: 0; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.7rem; color: #fff; line-height: 1; }
.hero-stats span { font-size: .82rem; color: #9fb4c8; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.hero-featured {
  position: relative; display: block; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(1.5deg);
  border: 1px solid rgba(255,255,255,.16);
}
.hero-featured img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-featured-label {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--gold); color: #3a2e04; font-weight: 700; font-size: .78rem;
  padding: 7px 13px; border-radius: 999px;
}
/* ==========================================================================
   Buttons & badges
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .95rem; border-radius: 999px;
  padding: 12px 22px; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(16,185,129,.7); }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

.badge {
  display: inline-flex; align-items: center;
  font-size: .76rem; font-weight: 600; color: var(--primary);
  background: var(--accent-soft); padding: 4px 11px; border-radius: 999px;
  letter-spacing: .01em;
}
.badge:hover { color: #fff; background: var(--accent-2); }
.badge-lg { font-size: .84rem; padding: 7px 15px; }

/* ==========================================================================
   Sections & cards
   ========================================================================== */
.section { padding: 64px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 34px; }
.section-title { margin-bottom: 4px; }
.section-sub { color: var(--ink-3); margin: 0; }
.section-more { margin-top: 32px; text-align: center; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cfe2d8; }
.card-image { display: block; overflow: hidden; background: var(--surface-2); }
.card-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 0; transition: transform .4s ease; }
.card:hover .card-image img { transform: scale(1.04); }
.card-ph {
  display: grid; place-items: center; aspect-ratio: 16/9; width: 100%;
  font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--ink-3); }
.card-title { font-size: 1.15rem; margin: 0; line-height: 1.3; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-2); }
.card-excerpt { color: var(--ink-2); font-size: .93rem; margin: 0; }
.card-more { margin-top: auto; font-weight: 600; font-size: .9rem; }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.category-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); color: var(--ink); }
.category-name { font-family: var(--font-head); font-weight: 600; }
.category-count {
  flex: none; font-size: .82rem; font-weight: 700; color: var(--accent-2);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
}

/* Page hero (list / taxonomy) */
.page-hero { background: linear-gradient(180deg, #0a2c44, #0f3d5c); color: #fff; padding: 54px 0 46px; }
.page-title { color: #fff; margin-bottom: 8px; }
.page-sub { color: #b9c9d9; margin: 0; font-size: 1.05rem; }
.page-hero .breadcrumbs a { color: #b9c9d9; }
.page-hero .breadcrumbs span { color: #7f94a8; }

/* Breadcrumbs */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-3); margin-bottom: 22px; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent-2); }
/* ==========================================================================
   Article
   ========================================================================== */
.article { padding: 46px 0 72px; }
.article-container { max-width: 980px; }
.article-header { margin-bottom: 30px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .86rem; color: var(--ink-3); margin-bottom: 14px; }
.article-title { margin-bottom: 14px; }
.lead { font-size: 1.18rem; color: var(--ink-2); margin: 0; }
.featured-image { margin: 26px 0 34px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.featured-image img { width: 100%; border-radius: var(--radius); }
.article-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }

.article-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toc-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.toc ul li { margin-bottom: 8px; }
.toc ul li a { color: var(--ink-2); }
.toc ul li a:hover { color: var(--accent-2); }
.toc ul ul { margin: 6px 0 0 14px; border-left: 1px solid var(--line); padding-left: 12px; }

.article-body { min-width: 0; }
.content { font-size: 1.05rem; }
.content h2 { margin-top: 1.6em; }
.content h3 { margin-top: 1.4em; }
.content a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.content a:hover { color: var(--primary); }
.content img { border-radius: var(--radius); margin: 1.4em 0; }

/* FAQ */
.faq { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line); }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; font-weight: 600; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); font-weight: 400; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 18px 18px; color: var(--ink-2); }

.article-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Reading progress */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); z-index: 200; }

/* ==========================================================================
   404
   ========================================================================== */
.not-found { padding: 120px 0; text-align: center; }
.not-found-inner { max-width: 620px; }
.not-found-code { display: block; font-family: var(--font-head); font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found-title { margin-top: 6px; }
.not-found-text { color: var(--ink-3); margin-bottom: 28px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 44px; }
.page-link { font-weight: 600; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--primary); }
.page-link:hover { border-color: var(--accent); color: var(--accent-2); }
.page-link.is-disabled { color: #b6c2cf; cursor: default; }
.page-info { color: var(--ink-3); font-size: .92rem; }
/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #081a2b; color: #b7c7d6; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-top: 60px; padding-bottom: 46px; }
.footer-tagline { color: #8ea3b5; margin-top: 16px; max-width: 32ch; }
.brand-light .brand-name { color: #fff; }
.footer-title { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #9fb3c4; font-size: .94rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.footer-bottom p { margin: 0; font-size: .86rem; color: #7d92a5; }
.footer-langs { display: flex; gap: 14px; }
.footer-langs a { color: #9fb3c4; font-size: .86rem; font-weight: 600; }
.footer-langs a:hover, .footer-langs a.active { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero-featured { transform: none; max-width: 460px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

@media (max-width: 700px) {
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { border-radius: 10px; }
  .nav-toggle { display: flex; }
  .lang-switcher .lang { padding: 5px 7px; font-size: .74rem; }
  .card-grid, .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { gap: 22px; }
}

/* Utilities & motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}





