/* ==========================================================================
   doc.css — สไตล์กลางของหน้าเอกสาร (ข้อกำหนด / คืนเงิน / ความเป็นส่วนตัว / ราคา)
   ใช้ตัวแปรสีชุดเดียวกับ style.css เท่านั้น
   (หมายเหตุ: privacy.html เวอร์ชันเดิมอ้าง --text-primary / --bg-dark / --yuu-farm
    ซึ่งไม่มีอยู่จริงใน style.css ทำให้สีไม่ขึ้นตามที่ตั้งใจ — ไฟล์นี้แก้ให้ถูกแล้ว)
   ========================================================================== */

.doc-container {
  max-width: 860px;
  margin: 120px auto 80px;
  padding: 0 20px;
  font-family: 'Sarabun', 'Inter', sans-serif;
  color: var(--text-body);
  line-height: 1.85;
}

.doc-container.doc-wide {
  max-width: 1100px;
}

.doc-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ink-brand);
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.3;
}

.doc-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.doc-meta {
  text-align: center;
  color: var(--text-light);
  font-size: 0.92rem;
  margin-bottom: 44px;
}

.doc-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 42px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(156, 127, 19, 0.14);
}

.doc-content h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink-brand);
  margin-top: 26px;
  margin-bottom: 10px;
}

.doc-content p {
  margin-bottom: 16px;
}

.doc-content ul,
.doc-content ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
}

.doc-content li {
  margin-bottom: 9px;
}

.doc-content a {
  color: var(--ink-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-content a:hover {
  color: var(--text-dark);
}

/* ---- กล่องเน้นข้อความสำคัญ ---- */
.doc-callout {
  background: rgba(249, 217, 73, 0.09);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 22px 0;
}

.doc-callout.doc-warn {
  background: rgba(255, 179, 0, 0.14);
  border-left-color: var(--brand-bright);
}

.doc-callout p:last-child {
  margin-bottom: 0;
}

.doc-callout-title {
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  margin-bottom: 6px;
}

/* ---- ตาราง ---- */
.doc-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.97rem;
  min-width: 520px;
}

.doc-table thead th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  white-space: nowrap;
}

.doc-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: top;
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table tbody tr:nth-child(even) {
  background: rgba(249, 250, 251, 0.7);
}

.doc-price {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ---- กล่องข้อมูลนิติบุคคล (ใช้ท้ายทุกหน้าเอกสาร) ---- */
.doc-entity {
  background: var(--white);
  border: 1px solid rgba(156, 127, 19, 0.17);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 48px;
  box-shadow: var(--shadow-soft);
}

.doc-entity h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.15rem;
}

.doc-entity dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 10px 20px;
}

.doc-entity dt {
  font-weight: 600;
  color: var(--text-light);
}

.doc-entity dd {
  margin: 0;
  color: var(--text-dark);
}

/* ---- ปุ่มกลับ / CTA ---- */
.doc-cta {
  text-align: center;
  margin: 48px 0 0;
}

.doc-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ---- สารบัญย่อ ---- */
.doc-toc {
  background: rgba(249, 250, 251, 0.9);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 36px;
}

.doc-toc-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.doc-toc ol {
  margin: 0;
  padding-left: 20px;
}

.doc-toc li {
  margin-bottom: 5px;
}

.doc-toc a {
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.2s ease;
}

.doc-toc a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- แถบข้อมูลนิติบุคคลท้ายหน้าหลัก (index.html) ---- */
.footer-legal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px 0;
  text-align: center;
  font-family: 'Sarabun', 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-legal-line strong {
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 640px) {
  .doc-container {
    margin-top: 100px;
  }

  .doc-title {
    font-size: 1.75rem;
  }

  .doc-entity dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .doc-entity dt {
    margin-top: 10px;
  }
}
