/*
Theme Name: Watthailand
Theme URI: https://watthailand.com
Author: ทีม Watthailand
Description: ธีมสารานุกรมพระเครื่องไทย — แปลงจากเว็บ Astro เดิม (websites/client-sites/buddhakhun) โดยคง URL, ดีไซน์ "Sacred Thai Heritage" และโครงสร้าง SEO เดิมไว้ทุกจุด เพิ่มความสามารถแก้/เพิ่มข้อมูลพระและรุ่นได้จาก wp-admin
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: watthailand
*/

/* โทเคนดีไซน์ทั้งหมดอยู่ใน assets/global.css + assets/sacred.css
   (คัดลอกมาจากเว็บ Astro โดยไม่แก้ เพื่อให้หน้าตาตรงกันทุกพิกเซล)
   ไฟล์นี้เก็บไว้เฉพาะส่วนที่จำเป็นเฉพาะ WordPress */

/* แถบ admin bar ของ WP ดันหน้าเว็บลง — กันไม่ให้ header ทับ */
body.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* คลาสที่ WordPress ใส่ให้รูปในเนื้อหาอัตโนมัติ */
.prose .alignleft {
  float: left;
  margin: 0 1.4rem 1rem 0;
}
.prose .alignright {
  float: right;
  margin: 0 0 1rem 1.4rem;
}
.prose .aligncenter {
  display: block;
  margin-inline: auto;
}
.prose .wp-caption-text,
.prose figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.prose img {
  max-width: 100%;
  height: auto;
}

/* ฟอร์มค้นหาในหน้า 404 */
.search-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}
.search-form input[type="search"] {
  flex: 1 1 240px;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
}
.search-form input[type="search"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Navigation, reading size and complete amulet images — 2026-11-10 */
.card p { font-size: 1rem; line-height: 1.75; font-weight: 400; }
.profile-figure figcaption, .prose figcaption, .prose .wp-caption-text { font-size: .9375rem; line-height: 1.7; letter-spacing: 0; }
.hero-figure .hero-credit { position: static; transform: none; width: auto; max-width: 100%; font-size: .875rem; line-height: 1.7; margin: 1rem 0 0; padding-inline: .5rem; }
.hero-figure { padding-bottom: 0; }
.hero-figure figcaption { bottom: 5rem; }
.card-full-amulet .card-photo { object-fit: contain; background: #151410; padding: .5rem; }
.video-badge { align-self: flex-start; display: inline-block; font-size: .875rem; padding: .15rem .6rem; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-bright); }
button.tl-pin { border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; }
.tl-pin[aria-expanded="true"] .tl-dot { transform: scale(1.4); }
.tl-selection { margin: 1rem; padding: 1rem; border: 1px solid var(--outline); border-radius: var(--radius); }
.tl-selection p { margin: 0 0 .5rem; }
.tl-selection[hidden] { display: none; }
#year-results { scroll-margin-top: 12rem; }
@media (max-width: 900px) {
 .site-header .bar { gap: .5rem; }
 .site-header nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: .25rem .5rem; overflow: visible; padding-bottom: 0; }
 .site-header nav a { min-width: 0; min-height: 44px; display: flex; justify-content: center; align-items: center; white-space: normal; text-align: center; font-size: .875rem; padding: .3rem .15rem; }
 .site-header nav a.nav-cta { padding: .3rem .15rem; }
 .hero-figure figcaption { bottom: 6rem; }
 .timeline { padding-left: .5rem; }
 .timeline li { grid-template-columns: 1fr; gap: .5rem; }
}

/* Keep article covers fully visible in the blog archive. */
.post-type-archive-wt_article .card-grid .card-photo {
	object-fit: contain;
}
