/* Mindset section — reading-focused dark theme that pairs with the LIFF
   app palette but emphasizes long-form readability over UI density. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mds-bg: #06101b;
  --mds-bg-card: #0f1f2f;
  --mds-bg-elev: #14283c;
  --mds-border: #1c324a;
  --mds-text: #e8eef5;
  --mds-text-soft: #b4c2d0;
  --mds-text-muted: #7e8a96;
  --mds-accent: #3fbfb5;
  --mds-accent-2: #d4af37;
  --mds-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --mds-radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--mds-bg);
  color: var(--mds-text);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mds-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.mds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  border-bottom: 1px solid var(--mds-border);
}
.mds-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--mds-text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}
.mds-brand img { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--mds-accent-2); }
.mds-brand em { color: var(--mds-accent); font-style: normal; font-weight: 600; }
.mds-nav { display: flex; gap: 20px; }
.mds-nav a { color: var(--mds-text-soft); font-weight: 500; font-size: 14px; }
.mds-nav a:hover { color: var(--mds-accent); text-decoration: none; }

/* ── Main layout ── */
.mds-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Hero / breadcrumb ── */
.mds-hero {
  text-align: center;
  padding: 48px 16px 40px;
  border-bottom: 1px solid var(--mds-border);
  margin-bottom: 40px;
}
.mds-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f3eccd 0%, var(--mds-accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mds-hero p { color: var(--mds-text-soft); font-size: 17px; max-width: 640px; margin: 0 auto; }

.mds-breadcrumb {
  font-size: 14px;
  color: var(--mds-text-muted);
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.mds-breadcrumb a { color: var(--mds-text-soft); }
.mds-breadcrumb span { color: var(--mds-text-muted); }
.mds-breadcrumb-current { color: var(--mds-text); font-weight: 500; }

/* ── Section headers ── */
.mds-main section h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 20px;
  color: var(--mds-text);
  display: flex; align-items: center; gap: 12px;
}
.mds-main section h2::before {
  content: '';
  width: 4px; height: 22px;
  background: var(--mds-accent-2);
  border-radius: 2px;
}

/* ── Card grid (index recent) ── */
.mds-card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.mds-card {
  background: var(--mds-bg-card);
  border: 1px solid var(--mds-border);
  border-radius: var(--mds-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  color: var(--mds-text);
}
.mds-card:hover { transform: translateY(-2px); border-color: var(--mds-accent); box-shadow: var(--mds-shadow); text-decoration: none; }
.mds-card-cover {
  width: 100%; aspect-ratio: 1 / 1;
  background-size: cover; background-position: center;
  background-color: #0a1828;
}
.mds-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.mds-card-theme { color: var(--mds-accent); font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.mds-card-title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.mds-card-desc { color: var(--mds-text-soft); font-size: 14px; line-height: 1.55; flex: 1; }
.mds-card-date { color: var(--mds-text-muted); font-size: 12px; margin-top: 4px; }

/* ── Theme grid (index) ── */
.mds-theme-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.mds-theme-card {
  background: var(--mds-bg-card);
  border: 1px solid var(--mds-border);
  border-radius: var(--mds-radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  color: var(--mds-text);
  transition: border-color 0.15s, transform 0.15s;
}
.mds-theme-card:hover { border-color: var(--mds-accent); transform: translateY(-2px); text-decoration: none; }
.mds-theme-card h3 { font-size: 18px; font-weight: 700; color: var(--mds-text); }
.mds-theme-card p { color: var(--mds-text-soft); font-size: 14px; line-height: 1.55; }

/* ── Row list (cluster) ── */
.mds-row-list { display: flex; flex-direction: column; gap: 14px; }
.mds-row {
  display: flex; gap: 16px;
  background: var(--mds-bg-card);
  border: 1px solid var(--mds-border);
  border-radius: var(--mds-radius);
  padding: 14px;
  color: var(--mds-text);
  transition: border-color 0.15s, transform 0.1s;
}
.mds-row:hover { border-color: var(--mds-accent); transform: translateX(2px); text-decoration: none; }
.mds-row-cover {
  width: 120px; flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background-size: cover; background-position: center;
  border-radius: 8px;
  background-color: #0a1828;
}
.mds-row-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.mds-row-body h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.mds-row-body p { color: var(--mds-text-soft); font-size: 14px; line-height: 1.55; }
.mds-row-date { color: var(--mds-text-muted); font-size: 12px; margin-top: auto; }

/* ── Article ── */
.mds-article {
  max-width: 720px;
  margin: 0 auto;
}
.mds-article-header { margin-bottom: 32px; }
.mds-article-theme {
  color: var(--mds-accent);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 12px;
}
.mds-article-header h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--mds-text);
}
.mds-article-meta { color: var(--mds-text-muted); font-size: 14px; margin-bottom: 24px; }
.mds-article-cover {
  width: 100%; height: auto; max-width: 540px;
  display: block; margin: 0 auto;
  border-radius: var(--mds-radius);
  border: 1px solid var(--mds-border);
}

.mds-article-intro p,
.mds-section p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--mds-text);
  margin-bottom: 20px;
}
.mds-article-intro p:first-child::first-letter {
  font-size: 38px; font-weight: 700; color: var(--mds-accent-2);
  float: left; line-height: 1; margin: 4px 8px 0 0;
}

.mds-section { margin: 36px 0; }
.mds-section h2 {
  font-size: 24px; font-weight: 700;
  margin: 40px 0 18px;
  display: flex; align-items: center; gap: 12px;
  color: var(--mds-text);
}
.mds-section h2::before {
  content: '';
  width: 4px; height: 22px;
  background: var(--mds-accent-2);
  border-radius: 2px;
}

/* ── Takeaways ── */
.mds-takeaways {
  background: var(--mds-bg-elev);
  border: 1px solid var(--mds-border);
  border-left: 4px solid var(--mds-accent-2);
  border-radius: var(--mds-radius);
  padding: 20px 24px;
  margin: 40px 0;
}
.mds-takeaways h2 { font-size: 18px; margin: 0 0 12px; }
.mds-takeaways h2::before { display: none; }
.mds-takeaways ul { list-style: none; }
.mds-takeaways li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--mds-text);
  line-height: 1.65;
}
.mds-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--mds-accent);
  font-weight: 700;
}

/* ── FAQ ── */
.mds-faq { margin: 40px 0; }
.mds-faq-item {
  background: var(--mds-bg-card);
  border: 1px solid var(--mds-border);
  border-radius: var(--mds-radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.mds-faq-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--mds-text);
  margin-bottom: 8px;
}
.mds-faq-item p {
  color: var(--mds-text-soft);
  line-height: 1.7;
}

/* ── CTA ── */
.mds-cta {
  max-width: 720px;
  margin: 60px auto 0;
  background: linear-gradient(135deg, #14283c 0%, #1c3a55 100%);
  border: 1px solid var(--mds-accent);
  border-radius: var(--mds-radius);
  padding: 28px;
  text-align: center;
}
.mds-cta h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.mds-cta p { color: var(--mds-text-soft); margin-bottom: 16px; font-size: 15px; }
.mds-cta-btn {
  display: inline-block;
  background: var(--mds-accent-2);
  color: #0a1828;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  transition: transform 0.1s;
}
.mds-cta-btn:hover { transform: translateY(-1px); text-decoration: none; }

/* ── Related ── */
.mds-related { max-width: 1100px; margin: 60px auto 0; }
.mds-related-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.mds-related-card {
  background: var(--mds-bg-card);
  border: 1px solid var(--mds-border);
  border-radius: var(--mds-radius);
  padding: 18px 20px;
  color: var(--mds-text);
  display: block;
  transition: border-color 0.15s;
}
.mds-related-card:hover { border-color: var(--mds-accent); text-decoration: none; }
.mds-related-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.mds-related-card p { color: var(--mds-text-soft); font-size: 14px; line-height: 1.55; }

/* ── Empty state ── */
.mds-empty {
  text-align: center;
  color: var(--mds-text-muted);
  padding: 40px 20px;
  font-size: 15px;
}

/* ── Footer ── */
.mds-footer {
  border-top: 1px solid var(--mds-border);
  margin-top: 80px;
  padding: 40px 24px 60px;
  background: #04080f;
}
.mds-footer-inner { max-width: 1100px; margin: 0 auto; }
.mds-disclaimer {
  color: var(--mds-text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 3px solid var(--mds-text-muted);
}
.mds-disclaimer strong { color: var(--mds-text-soft); }
.mds-footer-bottom {
  color: var(--mds-text-muted);
  font-size: 13px;
  text-align: center;
}
.mds-footer-bottom a { color: var(--mds-text-soft); margin: 0 4px; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .mds-header { padding: 14px 16px; flex-wrap: wrap; }
  .mds-nav { gap: 14px; }
  .mds-main { padding: 24px 16px 60px; }
  .mds-hero { padding: 32px 8px 28px; }
  .mds-hero h1 { font-size: 28px; }
  .mds-article-header h1 { font-size: 26px; }
  .mds-row { flex-direction: column; }
  .mds-row-cover { width: 100%; aspect-ratio: 16 / 9; }
  .mds-article-intro p, .mds-section p { font-size: 16px; }
}
