/* ============================================================
   article.css — หน้าอ่านบทความ
   Layout : Main content + Sidebar (desktop)
   Font   : Kanit (ดึงจาก style.css)
   ============================================================ */

/* ── Article page body ─────────────────────────────────── */
.article-page { background: #F5F3EE; }

/* ── Outer layout (main + sidebar) ────────────────────── */
.article-layout {
  display: block;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 18px 64px;
  gap: 32px;
}

/* ════════════════════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: .78rem;
  color: #888;
  margin-bottom: 20px;
}
.breadcrumb a { color: #888; text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb__sep { color: #bbb; }
.breadcrumb__current { color: #555; font-weight: 500; }

/* ════════════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════════════ */
.article-main {
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

/* Article header */
.article-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: #1A3A2A;
  line-height: 1.3;
  margin-bottom: 14px;
}

/* Meta info */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .78rem;
  color: #999;
  margin-bottom: 22px;
}
.meta-item { display: flex; align-items: center; gap: 4px; }
.meta-icon { font-size: .85rem; }
.meta-divider { color: #ddd; }

/* Cover image */
.article-cover {
  margin: 0 0 24px;
  border-radius: 12px;
  overflow: hidden;
}
.article-cover__img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* Excerpt */
.article-excerpt {
  background: #F0EDE6;
  border-left: 3px solid #C8960C;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: .95rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 28px;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════
   PROSE — Article body
════════════════════════════════════════════════════════ */
.article-body {
  font-size: 1rem;
  line-height: 1.9;
  color: #333;
}
.article-body h1,
.article-body h2,
.article-body h3 {
  font-weight: 800;
  color: #1A3A2A;
  margin: 1.6rem 0 .6rem;
  line-height: 1.3;
}
.article-body h2 {
  font-size: 1.25rem;
  padding-left: 12px;
  border-left: 3px solid #C8960C;
}
.article-body h3 { font-size: 1.05rem; color: #2D5A3D; }
.article-body p  { margin-bottom: 1rem; }
.article-body ul,
.article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { color: #1A3A2A; font-weight: 700; }
.article-body a {
  color: #C8960C;
  border-bottom: 1px solid rgba(200,150,12,.3);
  text-decoration: none;
}
.article-body a:hover { color: #8B6508; }
.article-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 16px 0;
}
.article-body blockquote {
  border-left: 3px solid #C8960C;
  padding: 10px 16px;
  background: #FAF6EE;
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
  margin: 16px 0;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .9rem;
}
.article-body th {
  background: #1A3A2A;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
}
.article-body td {
  padding: 9px 14px;
  border-bottom: 1px solid #eee;
}
.article-body tr:nth-child(even) td { background: #FAFAF8; }

/* ════════════════════════════════════════════════════════
   ARTICLE CTA BOX
════════════════════════════════════════════════════════ */
.article-cta-box {
  margin: 36px 0 24px;
  background: linear-gradient(135deg, #1A3A2A, #2D5A3D);
  border-radius: 14px;
  padding: 24px 22px;
  text-align: center;
}
.article-cta-box__text {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  margin-bottom: 14px;
}
.article-cta-box__btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.article-cta-box .btn-cta {
  max-width: 300px;
  padding: 14px 28px;
  font-size: 1rem;
}
.article-cta-box__tel {
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}
.article-cta-box__tel:hover { color: #fff; }

/* Back button */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1A3A2A;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(26,58,42,.2);
  transition: all .15s;
}
.article-back:hover {
  background: #1A3A2A;
  color: #fff;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════ */
.article-sidebar { display: none; } /* hidden on mobile */

.sidebar-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  margin-bottom: 20px;
}

/* Brand card */
.sidebar-brand {
  text-align: center;
  border-top: 3px solid #C8960C;
}
.sidebar-brand__logo {
  max-width: 120px;
  height: auto;
  margin: 0 auto 10px;
}
.sidebar-brand__name {
  font-weight: 800;
  color: #1A3A2A;
  font-size: .95rem;
  margin-bottom: 14px;
}
.sidebar-brand__line {
  display: block;
  background: #06C755;
  color: #fff;
  padding: 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  margin-bottom: 8px;
  transition: opacity .15s;
}
.sidebar-brand__line:hover { opacity: .88; color: #fff; }
.sidebar-brand__tel {
  display: block;
  color: #E53935;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
}
.sidebar-brand__tel:hover { color: #c62828; }

/* Related articles */
.sidebar-related__title {
  font-size: .92rem;
  font-weight: 800;
  color: #1A3A2A;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.sidebar-related__list { display: flex; flex-direction: column; gap: 10px; }

.related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px;
  border-radius: 8px;
  transition: background .15s;
}
.related-item:hover { background: #F5F3EE; }
.related-item__img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.related-item__img-ph {
  width: 52px;
  height: 52px;
  background: #F0EDE6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.related-item__title {
  font-size: .82rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════
   DESKTOP ≥ 900px — 2-column layout
════════════════════════════════════════════════════════ */
@media (min-width: 900px) {

  .article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    align-items: start;
    padding: 40px 24px 80px;
  }

  .article-sidebar { display: block; }

  .article-main { padding: 40px 48px; }

  .article-cover__img { max-height: 460px; }

  .article-cta-box__btns { flex-direction: row; justify-content: center; }
}

/* ════════════════════════════════════════════════════════
   TABLET 600-899px
════════════════════════════════════════════════════════ */
@media (min-width: 600px) and (max-width: 899px) {
  .article-main { padding: 32px 36px; }
  .article-cover__img { max-height: 380px; }
}

/* ════════════════════════════════════════════════════════
   MOBILE < 600px
════════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  .article-layout { padding: 16px 12px 60px; }
  .article-main   { padding: 20px 16px; border-radius: 10px; }
  .article-title  { font-size: 1.35rem; }
  .article-meta   { font-size: .72rem; }
  .article-cover__img { max-height: 220px; }
  .article-body   { font-size: .95rem; }
}