/*
Theme Name:   Digital Wise Child
Theme URI:    https://digitalwise.co.th/
Description:  Child theme ของ GeneratePress สำหรับเว็บไซต์ Digital Wise ใหม่ (SEO/AEO-ready)
Author:       Digital Wise
Template:     generatepress
Version:      1.0.0
Text Domain:  digitalwise-child
*/

/* ============================================
   1. BRAND TOKENS (CSS Variables)
   ที่มา: สกัดจากไฟล์โลโก้ DigitalWise_Logo_CO.ai
   ============================================ */
:root {
  --dw-orange: #F06322;        /* สีหลักแบรนด์ */
  --dw-orange-dark: #C94F16;   /* hover / active state */
  --dw-white: #FFFFFF;
  --dw-dark: #1A1A1A;          /* ข้อความเนื้อหา */
  --dw-gray-light: #F5F5F5;    /* พื้นหลังส่วนคั่น section */
  --dw-gray-border: #E0E0E0;

  --dw-font: 'Prompt', 'Noto Sans Thai', sans-serif;

  --dw-radius: 8px;
  --dw-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ============================================
   2. SELF-HOSTED FONT (Prompt — ฟรี, SIL OFL license)
   แทนที่ DB Heavent เดิม เพื่อไม่ให้มีปัญหาลิขสิทธิ์
   ============================================ */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/prompt-thai-400.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/prompt-thai-500.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/prompt-thai-600.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/prompt-thai-700.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/prompt-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/prompt-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/prompt-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/prompt-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}

/* ============================================
   3. BASE
   ============================================ */
body {
  font-family: var(--dw-font);
  color: var(--dw-dark);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--dw-font);
  font-weight: 600;
}

/* ============================================
   4. COMPONENTS (ตาม wireframe เฟส 2)
   ============================================ */

/* CTA Button — ตัวหนา/ใหญ่ ผ่าน contrast ratio บนพื้นส้ม */
.dw-btn-cta {
  display: inline-block;
  background-color: var(--dw-orange);
  color: var(--dw-white);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--dw-radius);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.dw-btn-cta:hover,
.dw-btn-cta:focus {
  background-color: var(--dw-orange-dark);
  color: var(--dw-white);
}

/* Service / Portfolio Card */
.dw-card {
  background: var(--dw-white);
  border: 1px solid var(--dw-gray-border);
  border-radius: var(--dw-radius);
  padding: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dw-card:hover {
  box-shadow: var(--dw-shadow);
  border-color: var(--dw-orange);
}

/* Stat Block (ตัวเลขผลงาน case study) */
.dw-stat-block {
  text-align: center;
}
.dw-stat-block .dw-stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--dw-orange);
  display: block;
}
.dw-stat-block .dw-stat-label {
  font-size: 14px;
  color: var(--dw-dark);
}

/* FAQ Accordion — เนื้อหาอยู่ใน DOM เสมอ (สำคัญต่อ AEO/SEO) */
.dw-faq-item {
  border-bottom: 1px solid var(--dw-gray-border);
  padding: 16px 0;
}
.dw-faq-question {
  font-weight: 600;
  cursor: pointer;
}
.dw-faq-answer {
  margin-top: 8px;
  color: var(--dw-dark);
  /* ใช้ CSS max-height/display toggle ผ่าน class เท่านั้น
     ห้ามใช้ JS ฉีดเนื้อหาเข้ามาทีหลัง เพราะ AI bot อ่านไม่เห็น */
}

/* Breadcrumb */
.dw-breadcrumb {
  font-size: 13px;
  color: #757575;
  margin-bottom: 16px;
}
.dw-breadcrumb a {
  color: var(--dw-orange);
  text-decoration: none;
}

/* Accessibility: ข้อความเล็กบนพื้นส้มต้องเป็นสีเข้ม ไม่ใช่ขาว (ผ่าน WCAG AA) */
.dw-on-orange-small-text {
  color: var(--dw-dark);
}
