/* ============================================
   LEARN THAI WITH NAM TAN — Shared Stylesheet
   Brand: warm coral + cream + Hasta La Visa blue
   ============================================ */

:root {
  --blue: #0a3d8f;       /* Hasta La Visa blue */
  --blue-soft: #1452b3;
  --gold: #f5b21a;
  --coral: #e85a73;      /* Learn Thai accent */
  --coral-soft: #fce8eb;
  --cream: #fff7ee;
  --paper: #fdf8ed;
  --ink: #2a2a2a;
  --muted: #6b6356;
  --line: #ece5d2;
  --line-soft: #f0e9d8;
  --green: #4a7c3a;
  --max: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Sarabun', 'Inter', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--coral); }

/* ── Navigation (matches main site) ── */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  max-width: 1200px; margin: 0 auto; padding: .8rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .7rem; }
.logo .mark {
  background: var(--blue); color: #fff; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 800; font-size: 1.3rem;
  position: relative;
}
.logo .mark::after {
  content: ''; position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px; background: var(--gold);
  border-radius: 50%; border: 2px solid #fff;
}
.logo .wordmark {
  font-weight: 800; font-size: 1.05rem; line-height: 1.1;
  letter-spacing: .04em; display: block;
}
.logo .wordmark .bk { color: #1a1a1a; }
.logo .wordmark .bl { color: var(--blue); }
.logo .slogan { font-size: .72rem; color: var(--muted); display: block; }
.logo .slogan .t-red { color: var(--coral); font-weight: 600; }
.logo .slogan .t-blue { color: var(--blue); font-weight: 600; }
nav.menu { display: flex; align-items: center; gap: 1.5rem; }
nav.menu a {
  font-weight: 500; color: var(--ink); font-size: .95rem;
  position: relative; padding: .2rem 0;
}
nav.menu a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  height: 2px; width: 0; background: var(--coral); border-radius: 2px;
  transition: width .22s;
}
nav.menu a:hover { color: var(--blue); }
nav.menu a:hover::after { width: 100%; }
nav.menu a.active { color: var(--coral); font-weight: 700; }
nav.menu a.active::after { width: 100%; }
.cta-wa {
  background: var(--gold); color: #2a1c00;
  padding: .55rem 1.1rem; border-radius: 50px;
  font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; gap: .4rem;
}

/* ── Hero (Index page) ── */
.hero {
  background: linear-gradient(135deg, var(--coral-soft) 0%, var(--cream) 100%);
  padding: 60px 1.5rem 70px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.hero .eyebrow {
  color: var(--coral);
  font-weight: 700; letter-spacing: .15em; font-size: .8rem;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: 'Poppins', 'Sarabun', sans-serif;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--coral); }
.hero .lead {
  max-width: 620px; margin: 0 auto 26px;
  font-size: 1.1rem; color: var(--muted);
}
.hero .greet {
  background: #fff; border: 2px dashed var(--coral);
  border-radius: 16px; padding: 18px 22px; max-width: 540px;
  margin: 20px auto 0; text-align: left; font-size: .98rem;
}
.hero .greet b { color: var(--coral); }

/* ── About Nam Tan card ── */
.about-namtan {
  max-width: var(--max); margin: -30px auto 0;
  background: #fff; border-radius: 18px;
  border: 1px solid var(--line);
  padding: 28px; display: grid; grid-template-columns: 100px 1fr; gap: 22px;
  align-items: center;
  box-shadow: 0 6px 30px rgba(232, 90, 115, 0.08);
  position: relative; z-index: 2;
}
.about-namtan .avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.5rem; font-weight: 800;
  font-family: 'Poppins', sans-serif;
}
.about-namtan h2 {
  font-size: 1.3rem; color: var(--blue); margin-bottom: 4px;
  font-family: 'Poppins', sans-serif;
}
.about-namtan .role {
  color: var(--coral); font-size: .9rem; font-weight: 600;
  letter-spacing: .05em; margin-bottom: 10px;
}
.about-namtan p { font-size: .98rem; color: var(--ink); }

/* Stats row — big numbers */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 6px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-soft) 100%);
  padding: 22px 18px;
  border-radius: 14px;
  color: #fff;
}
.stats-row .stat {
  text-align: center;
  padding: 0 6px;
  border-right: 1px solid rgba(255,255,255,.18);
}
.stats-row .stat:last-child { border-right: none; }
.stats-row .stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.1rem, 5vw, 2.7rem);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -.02em;
}
.stats-row .stat-num sup {
  font-size: .55em;
  color: #fff;
  font-weight: 700;
  margin-left: 2px;
}
.stats-row .stat-num small {
  font-size: .55em;
  color: #fff;
  font-weight: 700;
}
.stats-row .stat-label {
  font-size: .78rem;
  margin-top: 6px;
  opacity: .9;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* Credential badges */
.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
}
.credential-pill {
  background: linear-gradient(135deg, var(--cream) 0%, var(--coral-soft) 100%);
  border: 1.5px solid var(--coral);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.credential-pill .ico {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.credential-pill b {
  color: var(--blue);
  font-size: .92rem;
  display: block;
  line-height: 1.2;
}
.credential-pill span {
  font-size: .78rem;
  color: var(--muted);
  display: block;
  font-weight: 500;
  margin-top: 2px;
}

/* ── Lessons Grid ── */
.lessons-section {
  max-width: var(--max); margin: 50px auto;
  padding: 0 1.2rem;
}
.lessons-section .section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.7rem; color: var(--blue);
  text-align: center; margin-bottom: 8px;
}
.lessons-section .section-sub {
  text-align: center; color: var(--muted);
  margin-bottom: 40px; font-size: 1rem;
}
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.lesson-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 22px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: block; color: inherit;
  position: relative;
}
.lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(10, 61, 143, 0.1);
  border-color: var(--coral);
}
.lesson-card.coming-soon { opacity: .55; pointer-events: none; }
.lesson-card.coming-soon::after {
  content: 'Coming Soon';
  position: absolute; top: 14px; right: 14px;
  background: var(--line); color: var(--muted);
  font-size: .7rem; padding: 3px 9px; border-radius: 50px;
  font-weight: 700; letter-spacing: .05em;
}
.lesson-card.bonus {
  background: linear-gradient(135deg, #fff 0%, var(--coral-soft) 100%);
  border-color: var(--coral);
}
.lesson-card.bonus::after {
  content: '⭐ BONUS';
  position: absolute; top: 14px; right: 14px;
  background: var(--gold); color: #2a1c00;
  font-size: .7rem; padding: 3px 9px; border-radius: 50px;
  font-weight: 800; letter-spacing: .05em;
}
.lesson-card .num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem; font-weight: 800;
  color: var(--coral); line-height: 1;
  display: inline-block; margin-bottom: 8px;
}
.lesson-card .thai-title {
  font-size: 1.1rem; color: var(--blue); font-weight: 700;
  margin-bottom: 2px;
}
.lesson-card .en-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; color: var(--ink); font-weight: 600;
  margin-bottom: 10px;
}
.lesson-card .blurb {
  font-size: .92rem; color: var(--muted);
  margin-bottom: 14px;
}
.lesson-card .read-link {
  color: var(--coral); font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ── Lesson Page (individual lessons) ── */
.lesson-hero {
  background: linear-gradient(135deg, var(--coral-soft) 0%, var(--cream) 100%);
  padding: 50px 1.5rem 55px;
  border-bottom: 1px solid var(--line);
}
.lesson-hero .inner { max-width: var(--max); margin: 0 auto; }
.lesson-hero .breadcrumb {
  font-size: .85rem; color: var(--muted); margin-bottom: 16px;
}
.lesson-hero .breadcrumb a { color: var(--coral); }
.lesson-hero .lesson-num {
  display: inline-block;
  background: var(--coral); color: #fff;
  padding: 4px 14px; border-radius: 50px;
  font-size: .75rem; font-weight: 800;
  letter-spacing: .15em; margin-bottom: 12px;
}
.lesson-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--blue); line-height: 1.2;
  margin-bottom: 8px;
}
.lesson-hero .thai-subtitle {
  font-size: 1.3rem; color: var(--coral);
  font-weight: 600; margin-bottom: 18px;
}
.lesson-hero .intro {
  background: #fff; border-left: 4px solid var(--gold);
  padding: 18px 22px; border-radius: 8px;
  font-size: 1.02rem;
}
.lesson-hero .intro b { color: var(--coral); }

.lesson-body {
  max-width: var(--max); margin: 0 auto; padding: 50px 1.5rem;
}
.lesson-body section { margin-bottom: 50px; }
.lesson-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem; color: var(--blue);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.lesson-body h2 .h2-num {
  background: var(--coral); color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
}
.lesson-body h3 {
  color: var(--blue); margin: 20px 0 12px;
  font-size: 1.05rem; font-weight: 700;
}
.lesson-body p { margin-bottom: 14px; }
.lesson-body .pattern {
  background: var(--coral-soft); padding: 14px 18px;
  border-radius: 10px; font-size: 1rem;
  margin: 14px 0; border-left: 4px solid var(--coral);
}
.lesson-body .pattern b { color: var(--coral); }

/* Vocab tables */
.vocab-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); margin: 14px 0 22px;
  font-size: .98rem;
}
.vocab-table thead { background: var(--blue); color: #fff; }
.vocab-table th {
  padding: 12px 14px; text-align: left;
  font-weight: 700; font-size: .88rem;
  letter-spacing: .05em; text-transform: uppercase;
}
.vocab-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--line-soft);
}
.vocab-table tbody tr:nth-child(even) td { background: var(--cream); }
.vocab-table .pronounce {
  color: var(--coral); font-style: italic; font-weight: 500;
}
.vocab-table .thai {
  font-weight: 600; color: var(--ink); font-size: 1.05rem;
}

/* Tips list */
.tips-list { list-style: none; padding: 0; }
.tips-list li {
  background: #fff; border-left: 4px solid var(--gold);
  padding: 14px 18px; border-radius: 8px;
  margin-bottom: 10px; font-size: .98rem;
  position: relative; padding-left: 48px;
}
.tips-list li::before {
  content: counter(tip);
  counter-increment: tip;
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  background: var(--gold); color: #2a1c00;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.tips-list { counter-reset: tip; }
.tips-list b { color: var(--coral); }

/* Exercise + practice boxes */
.exercise-box {
  background: var(--cream); border: 2px dashed var(--coral);
  padding: 20px 22px; border-radius: 12px;
  margin: 14px 0; font-size: .98rem;
}
.exercise-box p { margin-bottom: 10px; }
.exercise-box p:last-child { margin-bottom: 0; }
.fill-blank {
  display: inline-block; min-width: 100px;
  border-bottom: 2px solid var(--coral);
  margin: 0 4px;
}

.practice-box {
  background: #fff; padding: 22px;
  border-radius: 12px; border: 1px solid var(--line);
  margin: 14px 0;
}
.practice-box .practice-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin: 14px 0;
}
.practice-box .col-box {
  background: var(--cream); padding: 14px 16px;
  border-radius: 8px; border: 1px solid var(--line-soft);
}
.practice-box .col-box h4 {
  color: var(--coral); font-size: .8rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px;
}
.practice-box .col-box ul { list-style: none; padding: 0; }
.practice-box .col-box li { padding: 3px 0; font-size: .94rem; }
.practice-box .col-box li b { color: var(--blue); }
.practice-box .write-lines {
  list-style: none; padding: 0; counter-reset: line;
}
.practice-box .write-lines li {
  border-bottom: 1.5px solid var(--line);
  padding: 18px 0 6px 28px; position: relative;
  font-size: .85rem; color: var(--muted);
}
.practice-box .write-lines li::before {
  content: counter(line) '.';
  counter-increment: line;
  position: absolute; left: 0; top: 18px;
  color: var(--coral); font-weight: 700; font-size: .95rem;
}

/* Nav between lessons */
.lesson-nav {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; margin-top: 40px;
}
.lesson-nav a {
  background: #fff; padding: 16px 18px;
  border-radius: 10px; border: 1px solid var(--line);
  text-align: center; transition: all .15s;
  display: flex; flex-direction: column; gap: 4px;
  font-size: .95rem;
}
.lesson-nav a:hover {
  background: var(--coral-soft); border-color: var(--coral);
  transform: translateY(-2px);
}
.lesson-nav a .label {
  font-size: .7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
}
.lesson-nav a .title { color: var(--blue); font-weight: 700; }
.lesson-nav a.center .label { color: var(--coral); }
.lesson-nav a.disabled { opacity: .4; pointer-events: none; }

/* CTA bottom */
.bottom-cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-soft) 100%);
  color: #fff; padding: 50px 1.5rem;
  text-align: center; margin-top: 60px;
}
.bottom-cta h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem; margin-bottom: 14px;
}
.bottom-cta p { font-size: 1rem; opacity: .92; margin-bottom: 22px; max-width: 600px; margin-left: auto; margin-right: auto; }
.bottom-cta .btn {
  background: var(--gold); color: #2a1c00;
  padding: .8rem 1.6rem; border-radius: 50px;
  font-weight: 700; font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .15s;
}
.bottom-cta .btn:hover { transform: translateY(-2px); }
.bottom-cta .signature {
  font-size: .85rem; opacity: .8;
  margin-top: 26px; font-style: italic;
}

footer.site-footer {
  background: #1a1a1a; color: #ccc;
  padding: 30px 1.5rem; text-align: center;
  font-size: .85rem;
}
footer.site-footer a { color: var(--gold); }

/* Responsive */
@media (max-width: 700px) {
  body { font-size: 16px; }
  nav.menu { display: none; }
  .about-namtan { grid-template-columns: 1fr; text-align: center; }
  .about-namtan .avatar { margin: 0 auto; }
  .lesson-nav { grid-template-columns: 1fr; }
  .vocab-table { font-size: .92rem; }
  .vocab-table th, .vocab-table td { padding: 9px 10px; }
  .lesson-hero { padding: 40px 1.2rem 45px; }
  .lesson-body { padding: 36px 1.2rem; }
  .logo .slogan { display: none; }
}
