/* ═══════════════════════════════════════════════════════════════════
   IDC — Page Kit
   สไตล์ร่วมของหน้ารอง (service / register / academy / about / contact)
   หน้าเหล่านี้ถูก generate จาก shared/_build_pages.py แก้ที่นั่นที่เดียว
   ═══════════════════════════════════════════════════════════════════ */

html, body {
  font-family: 'Noto Sans Thai', 'Kanit', sans-serif;
  color: #1A2B47;
  background: #F5F8FC;
  -webkit-font-smoothing: antialiased;
}

/* ---- utility ที่ใช้ซ้ำ (เผื่อ Tailwind CDN รุ่นเก่าไม่มีให้) ---- */
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* ═══ HERO ของหน้ารอง ═══ */
.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(123, 79, 191, 0.20), transparent 52%),
    radial-gradient(circle at 82% 78%, rgba(74, 144, 226, 0.22), transparent 52%),
    linear-gradient(135deg, #002A55 0%, #003D7A 52%, #1a4a8c 100%);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.page-hero h1 { letter-spacing: -0.02em; }

/* ═══ CTA ปิดท้าย ═══ */
.page-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #002A55 0%, #003D7A 55%, #5B3A93 130%);
}
.page-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ═══ ย่อหน้าเนื้อหา ═══ */
.prose-idc p {
  color: #1A2B47;
  line-height: 1.85;
  margin-bottom: 1.15rem;
  text-wrap: pretty;
}
.prose-idc p:last-child { margin-bottom: 0; }
.prose-idc strong { color: #003D7A; font-weight: 700; }
.prose-idc a {
  color: #003D7A;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #4A90E2;
  text-underline-offset: 3px;
}
.prose-idc a:hover { color: #7B4FBF; }

/* ═══ ขั้นตอนการทำงาน (ลำดับจริง จึงใช้เลขกำกับได้) ═══ */
.step-list {
  position: relative;
  display: grid;
  gap: 0;
  max-width: 46rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1.15rem;
  padding: 0 0 1.75rem 0;
}
.step-item:last-child { padding-bottom: 0; }
/* เส้นเชื่อมระหว่างขั้น */
.step-item::before {
  content: '';
  position: absolute;
  left: 1.3125rem;
  top: 2.75rem;
  bottom: 0;
  width: 2px;
  background: #D6E1EE;
}
.step-item:last-child::before { display: none; }
.step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #003D7A, #7B4FBF);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ═══ FAQ (native details ไม่ต้องใช้ JS) ═══ */
.faq-item {
  border: 1px solid #D6E1EE;
  border-radius: 1rem;
  background: #fff;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.18s ease;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { background: #E8F2FC; }
.faq-item > summary:focus-visible {
  outline: 2px solid #4A90E2;
  outline-offset: -2px;
}
.faq-caret { transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item[open] > summary { background: #E8F2FC; }
.faq-item[open] .faq-caret { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ═══ โฟกัสที่มองเห็นได้ทั่วทั้งหน้า ═══ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .no-print, .page-cta { display: none !important; }
}
