:root {
  --purple: #7B5FE0;
  --purple-dark: #5B3FBF;
  --pink: #FF6B9D;
  --yellow: #FFC93C;
  --teal: #22D3B4;
  --navy: #3A2E5C;
  --cream: #FFF8F0;
  --white: #FFFFFF;
  --shadow: 0 10px 30px rgba(58, 46, 92, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Kanit", "Segoe UI", Tahoma, sans-serif;
  color: var(--navy);
  background: var(--cream);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(58,46,92,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--purple-dark);
}

.logo img { width: 36px; height: 36px; }

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav a {
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav a:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--purple-dark);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 64px 0 40px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.25;
  margin-bottom: 18px;
  color: var(--purple-dark);
}

.hero h1 span { color: var(--pink); }

.hero p {
  font-size: 1.08rem;
  margin-bottom: 26px;
  color: #55496f;
  max-width: 480px;
}

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--pink);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(255,107,157,0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--purple-dark);
  border: 2px solid var(--purple);
}

.btn:hover { transform: translateY(-2px); }

.hero-img img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }

/* Section generic */
section { padding: 70px 0; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }

.section-head .tag {
  display: inline-block;
  background: rgba(123,95,224,0.1);
  color: var(--purple-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-head h2 { font-size: 2rem; color: var(--navy); margin-bottom: 10px; }
.section-head p { color: #6b5d87; }

.alt-bg { background: #FFF0F5; }

/* Stories */
.featured-story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  background: var(--white);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}

.featured-story img { border-radius: 18px; }
.featured-story h3 { font-size: 1.3rem; margin: 10px 0 10px; }
.featured-story p { color: #6b5d87; margin-bottom: 18px; }

.sub-heading {
  font-size: 1.1rem;
  color: var(--purple-dark);
  margin-bottom: 16px;
}

.story-list { display: flex; flex-direction: column; gap: 18px; }

.story-card {
  background: var(--white);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.story-card .num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.story-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.story-card p { font-size: 0.92rem; color: #6b5d87; margin: 0 0 10px; }

.story-card.coming-soon {
  background: transparent;
  border: 2px dashed #d8b7c9;
  box-shadow: none;
}
.story-card.coming-soon .num {
  background: transparent;
  border: 2px dashed var(--pink);
  color: var(--pink);
}
.story-card.coming-soon h3 { color: #8477a0; }

/* Podcast */
.podcast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.podcast-grid img { border-radius: 24px; box-shadow: var(--shadow); }

.episode-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }

.episode {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}

.episode .play {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.episode .ep-title { font-weight: 600; font-size: 0.98rem; }
.episode .ep-meta { font-size: 0.82rem; color: #8477a0; }

.episode audio { width: 100%; max-width: 360px; height: 34px; }

.script-box {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #55496f;
}
.script-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--purple-dark);
  font-size: 0.85rem;
}
.script-box p { margin-top: 8px; line-height: 1.55; }

.featured-episode {
  border: 2px solid var(--pink);
  background: #FFF5F8;
}

.coming-soon-ep {
  background: transparent;
  border: 2px dashed #d8b7c9;
  box-shadow: none;
  align-items: center;
}
.coming-soon-ep .play {
  background: transparent;
  border: 2px dashed var(--pink);
  color: var(--pink);
}
.coming-soon-ep .ep-title { color: #8477a0; font-weight: 500; }

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.product-card {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.product-card .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--pink);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.product-card:hover { transform: translateY(-6px); }

.product-card img { margin: 0 auto 16px; max-height: 150px; }

.product-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.product-card .price { color: var(--pink); font-weight: 700; margin-bottom: 14px; }

/* Radio */
.radio-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.radio-wrap img { border-radius: 24px; box-shadow: var(--shadow); }

.radio-player {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}

.radio-player .now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.live-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #FF4747;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,71,71,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(255,71,71,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,71,71,0); }
}

audio { width: 100%; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact-grid img { border-radius: 24px; box-shadow: var(--shadow); }

.contact-form {
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; display: block; }

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e4dcf5;
  font-family: inherit;
  font-size: 0.95rem;
  background: #FBF9FF;
}

.contact-form textarea { min-height: 110px; resize: vertical; }

.contact-info { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }

.contact-info .item { display: flex; gap: 12px; align-items: center; font-size: 0.95rem; }

.contact-info .icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(123,95,224,0.12);
  color: var(--purple-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.line-qr {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #EAFBF4;
  border: 1px dashed var(--teal);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #1a7a63;
}

.line-qr .icon {
  width: auto;
  height: auto;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 10px;
}

.line-qr .qr-img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  background: var(--white);
  padding: 4px;
  flex-shrink: 0;
}

.form-status { font-size: 0.9rem; color: var(--teal); font-weight: 600; min-height: 20px; }

/* Footer */
footer {
  background: var(--navy);
  color: #d8d0ec;
  padding: 46px 0 24px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-grid h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a:hover { color: var(--yellow); }

.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; }
.footer-logo img { width: 32px; height: 32px; }

.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--pink); }

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  color: #a99fc4;
}

/* Back to top */
.back-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 90;
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* Responsive */
@media (max-width: 900px) {
  .hero .container, .featured-story, .podcast-grid, .radio-wrap, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-img { order: -1; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav ul {
    position: fixed;
    top: 66px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 0.25s;
  }
  nav ul.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .products-grid { grid-template-columns: 1fr; }
  section { padding: 50px 0; }
}

/* Article pages */
.article-page { padding: 50px 0 100px; }

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-weight: 600;
  color: var(--purple-dark);
}
.back-link:hover { color: var(--pink); }

.article-hero {
  border-radius: 24px;
  box-shadow: var(--shadow);
  max-width: 420px;
  margin-bottom: 30px;
}

.article-header .tag { margin-bottom: 12px; }
.article-header h1 { font-size: 2.1rem; color: var(--purple-dark); line-height: 1.3; margin-bottom: 10px; }
.article-meta { color: #8477a0; font-size: 0.9rem; margin-bottom: 36px; }

.article-body { max-width: 780px; }
.article-body h2 { font-size: 1.5rem; color: var(--purple-dark); margin: 40px 0 16px; }
.article-body h3 { font-size: 1.15rem; color: var(--navy); margin: 28px 0 10px; }
.article-body p { margin-bottom: 14px; color: #3a2e5c; line-height: 1.8; }
.article-body ul { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 30px;
  font-size: 0.92rem;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
}
.article-body th, .article-body td {
  border: 1px solid #eee3fb;
  padding: 10px 14px;
  text-align: left;
}
.article-body th { background: var(--purple); color: var(--white); font-weight: 600; }
.article-body tr:nth-child(even) td { background: #FBF9FF; }

.article-body .source-list { margin: 0 0 8px 22px; }
.article-body .source-list li { margin-bottom: 8px; }
.article-body .source-list a { color: var(--purple-dark); font-weight: 600; text-decoration: underline; }

.forest-entry {
  background: var(--white);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.forest-entry h3 { margin-top: 0; color: var(--purple-dark); }
.forest-entry p { margin-bottom: 10px; font-size: 0.95rem; }
.forest-entry .fe-label { font-weight: 700; color: var(--navy); }
