/* ============================================================
   บริษัท ธัมกฎหมาย จำกัด — Tham Law Co., Ltd.
   เว็บไซต์สำนักงานกฎหมาย
   ============================================================ */

:root {
  --navy: #0e2a47;
  --navy-dark: #0a1f35;
  --navy-mid: #14395e;
  --gold: #b08d4f;
  --gold-light: #c9a76b;
  --gold-dark: #8f6f38;
  --cream: #f7f4ee;
  --paper: #ffffff;
  --ink: #1f2733;
  --ink-soft: #4a5563;
  --line: #e4ddcf;
  --red: #a6282a;
  --shadow-sm: 0 2px 10px rgba(14,42,71,.08);
  --shadow-md: 0 8px 28px rgba(14,42,71,.12);
  --shadow-lg: 0 18px 50px rgba(14,42,71,.16);
  --radius: 6px;
  --font: "TH Chakra Petch","Chakra Petch","TH K2D","K2D","Bai Jamjuree","IBM Plex Sans Thai","Noto Sans Thai",sans-serif;
  --serif: "TH Chakra Petch","Chakra Petch","Noto Serif Thai",serif;
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior:smooth; }

body {
  font-family: var(--font);
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
}

img { max-width:100%; display:block; }
a { color:var(--navy); text-decoration:none; transition:color .2s; }
a:hover { color:var(--gold-dark); }

.container { width:min(1180px,92%); margin-inline:auto; }

/* ---------- Topbar ---------- */
.topbar {
  background:var(--navy-dark);
  color:#cfd8e3;
  font-size:14.5px;
  padding:9px 0;
}
.topbar .container {
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-wrap:wrap;
}
.topbar a { color:#cfd8e3; }
.topbar a:hover { color:var(--gold-light); }
.topbar-left { display:flex; gap:22px; flex-wrap:wrap; }
.topbar-left span { display:inline-flex; align-items:center; gap:7px; }
.topbar-right { display:flex; gap:16px; }

/* ---------- Header ---------- */
.site-header {
  background:var(--paper);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:200;
  box-shadow:0 1px 0 rgba(14,42,71,.04);
}
.header-inner {
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; padding:14px 0;
}
.brand { display:flex; align-items:center; gap:12px; }
.brand-mark {
  width:52px; height:52px; flex:none;
  background:linear-gradient(135deg,var(--navy),var(--navy-mid));
  border-radius:4px;
  display:flex; align-items:center; justify-content:center;
  color:var(--gold-light);
  font-family:var(--serif);
  font-size:26px;
  box-shadow:var(--shadow-sm);
}
.brand-name { font-size:23px; font-weight:700; color:var(--navy); letter-spacing:.5px; line-height:1.25; }
.brand-sub { font-size:12.5px; color:var(--ink-soft); letter-spacing:2.5px; text-transform:uppercase; }

.nav { display:flex; align-items:center; gap:4px; }
.nav a {
  padding:9px 14px;
  font-size:16.5px;
  font-weight:600;
  color:var(--ink);
  border-radius:6px;
}
.nav a:hover { color:var(--navy); background:var(--cream); }
.nav a.active { color:var(--gold-dark); }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 26px;
  border-radius:4px;
  font-size:16.5px; font-weight:600;
  cursor:pointer; border:none;
  transition:all .25s;
}
.btn-gold { background:var(--gold); color:#fff; box-shadow:0 4px 14px rgba(176,141,79,.35); }
.btn-gold:hover { background:var(--gold-dark); color:#fff; transform:translateY(-2px); }
.btn-navy { background:var(--navy); color:#fff; }
.btn-navy:hover { background:var(--navy-mid); color:#fff; transform:translateY(-2px); }
.btn-outline { background:transparent; color:var(--navy); border:2px solid var(--navy); }
.btn-outline:hover { background:var(--navy); color:#fff; }
.btn-outline-light { background:transparent; color:#fff; border:2px solid rgba(255,255,255,.7); }
.btn-outline-light:hover { background:#fff; color:var(--navy); border-color:#fff; }

.nav-cta { margin-left:10px; }

/* Hamburger */
.nav-toggle { display:none; background:none; border:none; cursor:pointer; padding:6px; }
.nav-toggle span {
  display:block; width:26px; height:3px; background:var(--navy);
  margin:5px 0; border-radius:3px; transition:.3s;
}

/* ---------- Hero ---------- */
.hero {
  position:relative;
  background:linear-gradient(115deg,var(--navy-dark) 0%,var(--navy) 55%,var(--navy-mid) 100%);
  color:#fff;
  overflow:hidden;
}
.hero::before {
  content:""; position:absolute; inset:0;
  background:url('../images/law-hero-banner.png') center/cover no-repeat;
  opacity:.55;
  pointer-events:none;
}
.hero::after {
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(circle at 85% 20%, rgba(176,141,79,.1), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(20,57,94,.3), transparent 50%);
  pointer-events:none;
}
.hero .container { position:relative; z-index:2; padding:110px 0 130px; }
.hero-eyebrow {
  display:inline-flex; align-items:center; gap:9px;
  color:var(--gold-light); font-weight:600; letter-spacing:1.5px;
  font-size:15px; text-transform:uppercase; margin-bottom:18px;
}
.hero-eyebrow::before { content:""; width:34px; height:2px; background:var(--gold); }
.hero h1 {
  font-size:clamp(34px,5.2vw,56px);
  line-height:1.22; font-weight:700; max-width:760px;
  text-shadow:0 2px 20px rgba(0,0,0,.25);
}
.hero h1 .hl { color:var(--gold-light); }
.hero p.lead {
  max-width:640px; font-size:19px; color:#d7e0ea;
  margin:22px 0 34px;
}
.hero-actions { display:flex; gap:16px; flex-wrap:wrap; }
.hero-meta {
  margin-top:42px; display:flex; gap:38px; flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.16); padding-top:26px;
}
.hero-meta-item b { display:block; font-size:24px; color:var(--gold-light); }
.hero-meta-item span { font-size:14.5px; color:#b9c6d4; }

/* ---------- Section base ---------- */
.section { padding:78px 0; }
.section-cream { background:var(--cream); }
.section-navy { background:var(--navy); color:#fff; }
.section-head { max-width:720px; margin-bottom:46px; }
.section-head.center { margin-inline:auto; text-align:center; }
.section-tag {
  display:inline-block; color:var(--gold-dark); font-weight:700;
  font-size:14.5px; letter-spacing:2px; text-transform:uppercase; margin-bottom:10px;
}
.section-navy .section-tag { color:var(--gold-light); }
.section-title { font-size:clamp(27px,3.4vw,38px); font-weight:700; color:var(--navy); line-height:1.3; }
.section-navy .section-title { color:#fff; }
.section-sub { color:var(--ink-soft); margin-top:14px; font-size:17.5px; }
.section-navy .section-sub { color:#c3cfdb; }

/* ---------- Feature cards (services) ---------- */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }
.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:26px; }
.card {
  background:var(--paper); border-radius:var(--radius);
  border:1px solid var(--line); box-shadow:var(--shadow-sm);
  padding:30px 28px; transition:all .3s; position:relative; overflow:hidden;
}
.card::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:4px;
  background:var(--gold); opacity:0; transition:opacity .3s;
}
.card:hover { transform:translateY(-5px); box-shadow:var(--shadow-md); border-color:#d8c9a4; }
.card:hover::before { opacity:1; }
.card-icon {
  width:100%; height:180px; border-radius:6px;
  overflow:hidden; margin-bottom:20px;
}
.card-icon img {
  width:100%; height:100%; object-fit:cover;
  transition:transform .4s;
}
.card:hover .card-icon img { transform:scale(1.08); }
.card h3 { font-size:20.5px; color:var(--navy); margin-bottom:10px; font-weight:700; }
.card p { color:var(--ink-soft); font-size:15.5px; line-height:1.7; }
.card-link { display:inline-flex; align-items:center; gap:6px; margin-top:14px; font-weight:600; color:var(--gold-dark); font-size:15px; }

/* ---------- Why us ---------- */
.why-wrap { display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center; }
.why-visual {
  background:linear-gradient(135deg,var(--navy),var(--navy-mid));
  border-radius:8px; min-height:430px; position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  color:var(--gold-light); font-family:var(--serif); font-size:34px;
}
.why-visual::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(14,42,71,.3) 0%, rgba(14,42,71,.7) 100%);
  pointer-events:none; z-index:1;
}
.why-list { display:flex; flex-direction:column; gap:22px; }
.why-item { display:flex; gap:18px; }
.why-num {
  flex:none; width:46px; height:46px; border-radius:50%;
  background:var(--cream); border:1.5px solid var(--gold);
  color:var(--gold-dark); font-weight:700; font-size:19px;
  display:flex; align-items:center; justify-content:center;
}
.why-item h4 { font-size:18.5px; color:var(--navy); margin-bottom:5px; }
.why-item p { color:var(--ink-soft); font-size:15.5px; }

/* ---------- Stats band ---------- */
.stats {
  background:linear-gradient(120deg,var(--gold-dark),var(--gold));
  color:#fff;
}
.stats-inner { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; padding:44px 0; text-align:center; }
.stat b { display:block; font-size:40px; font-weight:700; font-family:var(--serif); }
.stat span { font-size:15px; opacity:.92; }

/* ---------- Article / judgment cards ---------- */
.post-card {
  background:var(--paper); border-radius:var(--radius); overflow:hidden;
  border:1px solid var(--line); box-shadow:var(--shadow-sm);
  transition:all .3s; display:flex; flex-direction:column;
}
.post-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-md); }
.post-thumb { height:205px; background:linear-gradient(135deg,var(--navy-mid),var(--navy)); position:relative; overflow:hidden; }
.post-thumb img { width:100%; height:100%; object-fit:cover; opacity:.92; transition:transform .4s; }
.post-card:hover .post-thumb img { transform:scale(1.05); }
.post-cat {
  position:absolute; left:14px; top:14px; background:var(--gold); color:#fff;
  font-size:13px; font-weight:600; padding:4px 12px; border-radius:4px; letter-spacing:.3px;
}
.post-body { padding:22px 24px 24px; display:flex; flex-direction:column; flex:1; }
.post-date { font-size:13.5px; color:var(--ink-soft); display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.post-body h3 { font-size:19px; line-height:1.45; color:var(--navy); margin-bottom:9px; }
.post-body h3 a:hover { color:var(--gold-dark); }
.post-body p { font-size:15px; color:var(--ink-soft); flex:1; }
.post-more { margin-top:14px; font-weight:700; color:var(--gold-dark); font-size:14.5px; display:inline-flex; align-items:center; gap:6px; }

/* ---------- Testimonials ---------- */
.testi-card {
  background:var(--paper); border-radius:var(--radius); padding:30px 28px;
  border:1px solid var(--line); box-shadow:var(--shadow-sm); position:relative;
}
.testi-card::before { content:"“"; position:absolute; top:8px; right:22px; font-family:var(--serif); font-size:80px; color:#efe6d2; line-height:1; }
.testi-card p { font-size:15.5px; color:var(--ink-soft); font-style:italic; margin-bottom:20px; }
.testi-who { display:flex; align-items:center; gap:13px; }
.testi-ava {
  width:48px; height:48px; border-radius:50%; flex:none;
  background:linear-gradient(135deg,var(--navy),var(--navy-mid));
  color:var(--gold-light); font-weight:700; font-size:17px;
  display:flex; align-items:center; justify-content:center;
}
.testi-who b { display:block; color:var(--navy); font-size:15.5px; }
.testi-who span { font-size:13.5px; color:var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background:linear-gradient(115deg,var(--navy-dark),var(--navy));
  color:#fff; position:relative; overflow:hidden;
}
.cta-band::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 80% 30%, rgba(176,141,79,.2), transparent 50%); }
.cta-inner { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:28px; flex-wrap:wrap; padding:56px 0; }
.cta-inner h2 { font-size:clamp(24px,3vw,32px); line-height:1.35; }
.cta-inner p { color:#c3cfdb; margin-top:8px; max-width:560px; }

/* ---------- Forms ---------- */
.contact-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:44px; }
.form-card {
  background:var(--paper); border:1px solid var(--line); border-radius:8px;
  box-shadow:var(--shadow-md); padding:36px 34px;
}
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-weight:600; font-size:15px; color:var(--navy); margin-bottom:6px; }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:12px 15px; border:1.5px solid var(--line); border-radius:4px;
  font-family:var(--font); font-size:15.5px; color:var(--ink); background:var(--paper);
  transition:border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:var(--gold);
}
.form-group textarea { min-height:130px; resize:vertical; }
.form-note { font-size:13px; color:var(--ink-soft); margin-top:8px; }

.contact-info { display:flex; flex-direction:column; gap:20px; }
.info-item { display:flex; gap:16px; align-items:flex-start; }
.info-icon {
  flex:none; width:52px; height:52px; border-radius:6px;
  overflow:hidden;
}
.info-icon img {
  width:100%; height:100%; object-fit:cover;
}
.info-item b { display:block; color:var(--navy); font-size:16.5px; }
.info-item span, .info-item a { color:var(--ink-soft); font-size:15.5px; line-height:1.6; }

/* ---------- Footer ---------- */
.site-footer { background:var(--navy-dark); color:#aebccc; font-size:15px; }
.footer-top { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:38px; padding:62px 0 44px; }
.site-footer h4 { color:#fff; font-size:17px; margin-bottom:18px; position:relative; padding-bottom:10px; }
.site-footer h4::after { content:""; position:absolute; left:0; bottom:0; width:34px; height:2px; background:var(--gold); }
.site-footer ul { list-style:none; }
.site-footer ul li { margin-bottom:9px; }
.site-footer ul a { color:#aebccc; }
.site-footer ul a:hover { color:var(--gold-light); }
.footer-brand p { margin:14px 0 18px; line-height:1.75; font-size:14.5px; }
.social-row { display:flex; gap:10px; }
.social-row a {
  width:38px; height:38px; border-radius:4px; background:rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center; color:#cfd8e3; font-size:16px;
}
.social-row a:hover { background:var(--gold); color:#fff; }
.footer-contact li { display:flex; gap:10px; align-items:flex-start; }
.footer-contact i { color:var(--gold-light); margin-top:3px; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.1); padding:18px 0; text-align:center; font-size:13.5px; color:#7f8fa0; }
.footer-bottom .container { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position:relative;
  background:linear-gradient(115deg,var(--navy-dark),var(--navy-mid));
  color:#fff; padding:80px 0;
  overflow:hidden;
}
.page-hero::before {
  content:""; position:absolute; inset:0;
  background:url('../images/law-hero-banner.png') center/cover no-repeat;
  opacity:.5;
  pointer-events:none;
}
.page-hero .container { position:relative; z-index:2; }
.page-hero h1 { font-size:clamp(28px,3.6vw,40px); font-weight:700; }
.page-hero p { color:#c3cfdb; margin-top:10px; max-width:680px; font-size:17px; }
.breadcrumb { display:flex; gap:8px; font-size:14px; color:#8fa3b7; margin-bottom:16px; flex-wrap:wrap; }
.breadcrumb a { color:#c3cfdb; }
.breadcrumb a:hover { color:var(--gold-light); }
.breadcrumb span { color:var(--gold-light); }

/* ---------- About / team ---------- */
.team-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.team-card {
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; box-shadow:var(--shadow-sm); transition:all .3s; text-align:center;
}
.team-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-md); }
.team-photo { height:250px; background:linear-gradient(135deg,var(--navy),var(--navy-mid)); display:flex; align-items:center; justify-content:center; color:var(--gold-light); font-size:64px; font-family:var(--serif); }
.team-body { padding:20px 18px 24px; }
.team-body h3 { color:var(--navy); font-size:19px; }
.team-body .role { color:var(--gold-dark); font-weight:600; font-size:14px; margin:3px 0 8px; }
.team-body p { font-size:13.8px; color:var(--ink-soft); line-height:1.65; }

.timeline { position:relative; padding-left:34px; }
.timeline::before { content:""; position:absolute; left:9px; top:6px; bottom:6px; width:2px; background:var(--line); }
.tl-item { position:relative; margin-bottom:26px; }
.tl-item::before {
  content:""; position:absolute; left:-30px; top:7px; width:14px; height:14px;
  border-radius:50%; background:var(--gold); border:3px solid var(--cream);
}
.tl-item b { display:block; color:var(--navy); font-size:16.5px; }
.tl-item span { color:var(--gold-dark); font-weight:700; font-size:14px; display:block; margin-bottom:4px; }
.tl-item p { color:var(--ink-soft); font-size:15px; }

/* ---------- Service detail rows ---------- */
.service-block { display:grid; grid-template-columns:120px 1fr; gap:26px; padding:34px 0; border-bottom:1px solid var(--line); }
.service-block:last-child { border-bottom:none; }
.service-block .sb-icon {
  width:90px; height:90px; border-radius:8px;
  overflow:hidden;
}
.service-block .sb-icon img {
  width:100%; height:100%; object-fit:cover;
}
.service-block h3 { color:var(--navy); font-size:22px; margin-bottom:10px; }
.service-block p { color:var(--ink-soft); margin-bottom:12px; }
.tag-list { display:flex; flex-wrap:wrap; gap:8px; }
.tag-list span {
  background:var(--cream); border:1px solid var(--line); color:var(--navy);
  font-size:13.5px; padding:5px 14px; border-radius:4px; font-weight:600;
}

/* ---------- Article detail ---------- */
.article-wrap { max-width:800px; margin-inline:auto; }
.article-hero-img { height:340px; border-radius:8px; overflow:hidden; margin-bottom:30px; }
.article-meta { display:flex; gap:20px; flex-wrap:wrap; color:var(--ink-soft); font-size:14.5px; margin:16px 0 26px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.article-body h2 { color:var(--navy); font-size:24px; margin:34px 0 14px; }
.article-body h3 { color:var(--navy); font-size:20px; margin:26px 0 10px; }
.article-body p { margin-bottom:16px; }
.article-body ul, .article-body ol { margin:0 0 16px 24px; }
.article-body li { margin-bottom:8px; }
.article-body blockquote {
  border-left:4px solid var(--gold); background:var(--cream);
  padding:16px 22px; margin:22px 0; border-radius:0 6px 6px 0; color:var(--navy);
}
.callout {
  background:var(--cream); border:1px solid #e8ddc4; border-radius:6px;
  padding:20px 24px; margin:24px 0;
}
.callout b { color:var(--gold-dark); }
.article-tags { display:flex; gap:8px; flex-wrap:wrap; margin-top:30px; padding-top:22px; border-top:1px solid var(--line); }

/* ---------- Table ---------- */
table.tbl { width:100%; border-collapse:collapse; margin:20px 0; font-size:15px; }
.tbl th { background:var(--navy); color:#fff; text-align:left; padding:12px 16px; font-weight:600; }
.tbl td { border:1px solid var(--line); padding:12px 16px; }
.tbl tr:nth-child(even) td { background:var(--cream); }

/* ---------- Judgment card ---------- */
.judg-card {
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:30px 32px; box-shadow:var(--shadow-sm); margin-bottom:26px;
}
.judg-head { display:flex; align-items:center; gap:14px; margin-bottom:14px; flex-wrap:wrap; }
.judg-no {
  background:var(--navy); color:var(--gold-light); font-weight:700;
  padding:7px 16px; border-radius:6px; font-size:15px;
}
.judg-cat { background:var(--cream); border:1px solid var(--line); color:var(--gold-dark); font-size:13px; font-weight:600; padding:5px 13px; border-radius:4px; }
.judg-card h3 { color:var(--navy); font-size:20px; margin-bottom:10px; }
.judg-card p { color:var(--ink-soft); font-size:15.5px; }
.judg-law { margin-top:14px; font-size:14px; color:var(--gold-dark); font-weight:600; }
.judg-img {
  width:100%; height:180px; border-radius:6px; overflow:hidden; margin-bottom:16px;
}
.judg-img img {
  width:100%; height:100%; object-fit:cover; transition:transform .4s;
}
.judg-card:hover .judg-img img { transform:scale(1.06); }

/* ---------- Trust strip (ใบอนุญาต/ความน่าเชื่อถือ) ---------- */
.trust-strip {
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.trust-inner {
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; flex-wrap:wrap; padding:20px 0;
}
.trust-item { display:flex; align-items:center; gap:12px; }
.trust-icon {
  flex:none; width:44px; height:44px; border-radius:50%;
  background:var(--cream); border:1px solid var(--gold);
  color:var(--gold-dark); font-size:19px;
  display:flex; align-items:center; justify-content:center;
}
.trust-item b { display:block; color:var(--navy); font-size:15.5px; line-height:1.35; }
.trust-item span { font-size:13px; color:var(--ink-soft); }

/* ---------- Team photo real ---------- */
.team-photo { position:relative; height:250px; overflow:hidden; }
.team-photo img { width:100%; height:100%; object-fit:cover; }
.team-card:hover .team-photo img { transform:scale(1.05); transition:transform .4s; }

/* ---------- Testimonial with photo ---------- */
.testi-ava { overflow:hidden; }
.testi-ava img { width:100%; height:100%; object-fit:cover; }

/* ---------- FAQ accordion ---------- */
.faq-wrap { max-width:820px; margin-inline:auto; }
.faq-item {
  background:var(--paper); border:1px solid var(--line);
  border-radius:8px; margin-bottom:12px; overflow:hidden;
}
.faq-q {
  width:100%; text-align:left; background:none; border:none; cursor:pointer;
  padding:18px 22px; font-family:var(--font); font-size:16.5px; font-weight:600;
  color:var(--navy); display:flex; justify-content:space-between; align-items:center; gap:14px;
}
.faq-q .plus { color:var(--gold-dark); font-size:20px; flex:none; transition:transform .3s; }
.faq-item.open .faq-q .plus { transform:rotate(45deg); }
.faq-a { display:none; padding:0 22px 18px; color:var(--ink-soft); font-size:15.5px; line-height:1.75; }
.faq-item.open .faq-a { display:block; }
.faq-a a { color:var(--gold-dark); font-weight:600; }

/* ---------- Case studies ---------- */
.case-card {
  background:var(--paper); border:1px solid var(--line); border-radius:8px;
  padding:26px 26px; box-shadow:var(--shadow-sm); position:relative; overflow:hidden;
  border-top:4px solid var(--gold);
}
.case-tag {
  display:inline-block; background:var(--navy); color:var(--gold-light);
  font-size:12.5px; font-weight:600; padding:4px 12px; border-radius:4px; margin-bottom:12px;
  letter-spacing:.5px;
}
.case-card h3 { color:var(--navy); font-size:18px; margin-bottom:8px; line-height:1.45; }
.case-card p { color:var(--ink-soft); font-size:14.5px; line-height:1.7; }
.case-result {
  margin-top:14px; background:var(--cream); border:1px solid #e8ddc4;
  border-radius:6px; padding:10px 14px; font-size:14px; color:var(--gold-dark); font-weight:600;
}

/* ---------- QR box ---------- */
.qr-flex { display:flex; align-items:center; gap:30px; flex-wrap:wrap; }
.qr-box {
  flex:none; width:190px; padding:14px; background:#fff;
  border:1px solid var(--line); border-radius:10px; text-align:center;
  box-shadow:var(--shadow-sm);
}
.qr-box img { width:100%; }
.qr-box span { display:block; margin-top:8px; font-size:14px; font-weight:600; color:var(--navy); }
.qr-desc { flex:1; min-width:240px; }
.qr-desc h3 { color:var(--navy); font-size:21px; margin-bottom:8px; }
.qr-desc p { color:var(--ink-soft); font-size:15.5px; margin-bottom:14px; }

/* ---------- Urgency bar ---------- */
.urgency-bar {
  background:var(--red); color:#fff; text-align:center;
  padding:10px 16px; font-size:15.5px; font-weight:600; letter-spacing:.3px;
}
.urgency-bar a { color:#fff; text-decoration:underline; font-weight:700; }
.urgency-bar a:hover { color:#ffe3e3; }

/* ---------- Ticker (แถบประกาศวิ่ง) ---------- */
.ticker {
  background:var(--navy); color:#d7e0ea; overflow:hidden;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.ticker-track {
  display:inline-flex; align-items:center; gap:0; white-space:nowrap;
  padding:9px 0; font-size:14.5px;
  animation:tickerMove 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state:paused; }
.ticker-item { display:inline-flex; align-items:center; gap:8px; padding:0 34px; }
.ticker-item::before { content:"✦"; color:var(--gold-light); font-size:11px; }
.ticker-item a { color:var(--gold-light); font-weight:600; }
.ticker-item a:hover { text-decoration:underline; }
@keyframes tickerMove { from { transform:translateX(0); } to { transform:translateX(-50%); } }

/* ---------- Share buttons ---------- */
.share-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.share-row .lbl { font-weight:600; color:var(--navy); font-size:15px; }
.share-btn {
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 16px; border-radius:6px; border:none; cursor:pointer;
  font-size:14px; font-weight:600; font-family:var(--font); transition:all .2s;
}
.share-line { background:#06c755; color:#fff; }
.share-line:hover { background:#05a847; color:#fff; }
.share-fb { background:#1877f2; color:#fff; }
.share-fb:hover { background:#1464d9; color:#fff; }
.share-copy { background:var(--navy); color:#fff; }
.share-copy:hover { background:var(--navy-mid); color:#fff; }
.share-msg { font-size:13px; color:var(--ink-soft); }

/* ---------- Related articles ---------- */
.related-title { font-size:22px; color:var(--navy); font-weight:700; margin-bottom:18px; }
.related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:900px){ .related-grid{ grid-template-columns:1fr; } }
.related-card {
  background:var(--paper); border:1px solid var(--line); border-radius:8px;
  overflow:hidden; transition:all .3s; display:block;
}
.related-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.related-thumb { height:130px; background:linear-gradient(135deg,var(--navy-mid),var(--navy)); }
.related-thumb img { width:100%; height:100%; object-fit:cover; }
.related-body { padding:14px 16px; }
.related-body .rcat { font-size:12px; color:var(--gold-dark); font-weight:600; }
.related-body h4 { font-size:15.5px; color:var(--navy); line-height:1.45; margin-top:5px; }

/* ---------- Ring stats (วงกลมสถิติ) ---------- */
.ring-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; padding:44px 0; text-align:center; }
@media (max-width:900px){ .ring-grid{ grid-template-columns:repeat(2,1fr); gap:30px; } }
.ring-box { position:relative; width:150px; height:150px; margin:0 auto 12px; }
.ring-box svg { width:150px; height:150px; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:rgba(255,255,255,.2); stroke-width:10; }
.ring-fg {
  fill:none; stroke:var(--gold-light); stroke-width:10; stroke-linecap:round;
  stroke-dasharray:377; stroke-dashoffset:377; transition:stroke-dashoffset 1.6s ease;
}
.ring-box.in .ring-fg { stroke-dashoffset:0; }
.ring-num {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:30px; font-weight:700; color:#fff; font-family:var(--serif);
}
.ring-label { color:rgba(255,255,255,.85); font-size:15px; }

/* ---------- Case wizard (คัดกรองคดี) ---------- */
.wizard {
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--shadow-md); max-width:760px; margin-inline:auto; overflow:hidden;
}
.wizard-steps {
  display:flex; background:var(--navy); color:#fff; font-size:13.5px;
}
.wizard-step {
  flex:1; text-align:center; padding:13px 6px; position:relative; font-weight:600;
  color:rgba(255,255,255,.55);
}
.wizard-step.active { color:var(--gold-light); }
.wizard-step.active::after {
  content:""; position:absolute; left:20%; right:20%; bottom:0; height:3px; background:var(--gold);
}
.wizard-body { padding:30px 30px 26px; }
.wizard-title { font-size:20px; color:var(--navy); font-weight:700; margin-bottom:6px; }
.wizard-desc { color:var(--ink-soft); font-size:15px; margin-bottom:20px; }
.wizard-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:640px){ .wizard-options{ grid-template-columns:1fr; } }
.wiz-opt {
  text-align:left; background:var(--cream); border:1.5px solid var(--line);
  border-radius:10px; padding:16px 18px; cursor:pointer; font-family:var(--font);
  transition:all .2s; display:flex; align-items:center; gap:12px;
}
.wiz-opt:hover { border-color:var(--gold); background:#fbf7ee; transform:translateY(-2px); }
.wiz-opt.sel { border-color:var(--gold); background:#f7efdf; box-shadow:0 0 0 3px rgba(176,141,79,.18); }
.wiz-opt .wi { font-size:24px; flex:none; }
.wiz-opt b { display:block; color:var(--navy); font-size:15.5px; }
.wiz-opt span { font-size:13px; color:var(--ink-soft); }
.wizard-nav { display:flex; justify-content:space-between; margin-top:22px; gap:12px; }
.wizard-result {
  background:var(--cream); border:1px solid #e8ddc4; border-radius:10px;
  padding:22px 24px; margin-top:8px; display:none;
}
.wizard-result.show { display:block; }
.wizard-result h3 { color:var(--navy); font-size:18px; margin-bottom:8px; }
.wizard-result p { color:var(--ink-soft); font-size:15px; margin-bottom:14px; }
.wizard-result .tag-list { margin-bottom:14px; }
.restart-btn {
  background:none; border:none; color:var(--gold-dark); cursor:pointer;
  font-size:14px; font-weight:600; font-family:var(--font); text-decoration:underline;
  margin-top:14px;
}

/* ---------- Misc ---------- */
.section-head-row { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:40px; flex-wrap:wrap; }
.section-head-row .section-head { margin-bottom:0; }
.link-more { font-weight:700; color:var(--gold-dark); font-size:15px; white-space:nowrap; }
.link-more:hover { color:var(--navy); }

.back-top {
  position:fixed; right:22px; bottom:22px; width:46px; height:46px;
  background:var(--navy); color:var(--gold-light); border:none; border-radius:6px;
  font-size:19px; cursor:pointer; box-shadow:var(--shadow-md);
  opacity:0; pointer-events:none; transition:all .3s; z-index:150;
}
.back-top.show { opacity:1; pointer-events:auto; }
.back-top:hover { background:var(--navy-mid); }

.line-float {
  position:fixed; right:22px; bottom:80px; z-index:150;
  background:#06c755; color:#fff; border-radius:50%; width:54px; height:54px;
  display:flex; align-items:center; justify-content:center; font-size:24px;
  box-shadow:0 6px 18px rgba(6,199,85,.4); transition:transform .25s;
}
.line-float:hover { transform:scale(1.08); color:#fff; }

/* ---------- วิดเจ็ตแชทปรึกษาทนาย ---------- */
.chat-fab {
  position:fixed; right:22px; bottom:146px; z-index:155;
  width:58px; height:58px; border-radius:50%;
  background:linear-gradient(135deg,var(--navy),var(--navy-mid));
  color:var(--gold-light); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:24px;
  box-shadow:0 8px 22px rgba(14,42,71,.38);
  transition:transform .25s;
}
.chat-fab:hover { transform:scale(1.08); }
.chat-fab .badge {
  position:absolute; top:-3px; right:-3px; min-width:20px; height:20px;
  background:var(--red); color:#fff; border-radius:10px; font-size:11.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; padding:0 5px;
  animation:chatPulse 1.6s infinite;
}
@keyframes chatPulse {
  0% { box-shadow:0 0 0 0 rgba(166,40,42,.45); }
  70% { box-shadow:0 0 0 10px rgba(166,40,42,0); }
  100% { box-shadow:0 0 0 0 rgba(166,40,42,0); }
}

.chat-panel {
  position:fixed; right:22px; bottom:216px; z-index:160;
  width:min(360px, calc(100vw - 44px));
  background:var(--paper); border-radius:14px; overflow:hidden;
  box-shadow:var(--shadow-lg); border:1px solid var(--line);
  opacity:0; transform:translateY(18px) scale(.97); pointer-events:none;
  transition:all .3s ease;
}
.chat-panel.open { opacity:1; transform:none; pointer-events:auto; }
.chat-head {
  background:linear-gradient(135deg,var(--navy),var(--navy-mid));
  color:#fff; padding:13px 16px; display:flex; align-items:center; gap:11px;
}
.chat-ava {
  width:40px; height:40px; border-radius:50%; flex:none;
  background:rgba(255,255,255,.1); border:1.5px solid var(--gold);
  color:var(--gold-light); font-weight:700; font-size:19px;
  display:flex; align-items:center; justify-content:center;
}
.chat-title { font-size:15.5px; font-weight:700; line-height:1.3; }
.chat-status { font-size:12.5px; color:#9fe1cb; display:flex; align-items:center; gap:6px; }
.chat-status .dot {
  width:8px; height:8px; border-radius:50%; background:#4cd964; display:inline-block;
  animation:chatBlink 1.4s infinite;
}
@keyframes chatBlink { 50% { opacity:.35; } }
.chat-close {
  margin-left:auto; background:none; border:none; color:#fff; font-size:24px;
  cursor:pointer; line-height:1; padding:4px;
}
.chat-body { padding:16px; background:#f5f7fa; max-height:330px; overflow-y:auto; }
.chat-msg {
  max-width:88%; padding:10px 14px; border-radius:12px; font-size:14.5px;
  line-height:1.6; margin-bottom:10px;
}
.chat-msg.bot {
  background:var(--paper); border:1px solid var(--line);
  border-top-left-radius:4px; color:var(--ink);
}
.chat-msg.user {
  background:var(--navy); color:#fff; margin-left:auto;
  border-top-right-radius:4px;
}
.chat-msg.typing { color:var(--ink-soft); font-style:italic; }
.chat-quick { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.cq {
  text-align:left; background:var(--paper); border:1.5px solid var(--gold);
  color:var(--navy); border-radius:20px; padding:9px 15px; font-size:13.5px;
  font-family:var(--font); font-weight:600; cursor:pointer; transition:all .2s;
}
.cq:hover { background:var(--gold); color:#fff; border-color:var(--gold); }
.chat-cta { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
.chat-cta a {
  flex:1; min-width:130px; text-align:center; padding:11px 10px; border-radius:8px;
  font-size:13.5px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; gap:6px;
}
.chat-cta .c-line { background:#06c755; color:#fff; }
.chat-cta .c-line:hover { background:#05a847; color:#fff; }
.chat-cta .c-tel { background:var(--navy); color:#fff; }
.chat-cta .c-tel:hover { background:var(--navy-mid); color:#fff; }
.chat-note { font-size:11.5px; color:var(--ink-soft); text-align:center; margin-top:9px; }
.chat-note a { color:var(--gold-dark); font-weight:600; }

/* ---------- ตัวหนังสือส่วนหัวของทุกหน้า ค่อยๆ เลื่อนขึ้นตอนเปิดหน้า ---------- */
@keyframes riseUp {
  from { opacity:0; transform:translateY(38px); }
  to   { opacity:1; transform:none; }
}
.hero .container > *,
.page-hero .container > * {
  animation: riseUp .9s cubic-bezier(.22,.61,.36,1) both;
}
.hero .container > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay:.15s; }
.hero .container > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay:.3s; }
.hero .container > :nth-child(4) { animation-delay:.45s; }
.hero .container > :nth-child(5) { animation-delay:.6s; }

/* Reveal animation */
.reveal { opacity:0; transform:translateY(26px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in { opacity:1; transform:none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero .container > *, .page-hero .container > * {
    opacity:1; transform:none; animation:none; transition:none;
  }
}

/* ---------- Splash intro (ชื่อบริษัทลอยออกมาตรงกลาง) ---------- */
.splash {
  position: fixed; inset:0; z-index:5000;
  background:linear-gradient(135deg,var(--navy-dark) 0%,var(--navy) 60%,var(--navy-mid) 100%);
  display:flex; align-items:center; justify-content:center;
  opacity:1; transition:opacity .8s ease .2s; pointer-events:auto;
}
.splash.hide { opacity:0; pointer-events:none; }
.splash-inner { text-align:center; animation:splashRise 1.1s cubic-bezier(.22,.61,.36,1) both; }
.splash-mark {
  width:104px; height:104px; margin:0 auto 26px;
  background:rgba(255,255,255,.07); border:2.5px solid var(--gold);
  border-radius:18px; display:flex; align-items:center; justify-content:center;
  color:var(--gold-light); font-size:56px; font-weight:700; font-family:Georgia,serif;
  box-shadow:0 0 0 10px rgba(176,141,79,.08), 0 0 0 20px rgba(176,141,79,.04);
}
.splash-name {
  color:#fff; font-size:clamp(28px,5.5vw,46px); font-weight:700;
  letter-spacing:2px; line-height:1.3; text-shadow:0 3px 20px rgba(0,0,0,.35);
}
.splash-line { width:64px; height:2px; background:var(--gold); margin:22px auto; }
.splash-en {
  color:var(--gold-light); font-size:15px; letter-spacing:5px;
  text-transform:uppercase; margin-bottom:14px;
}
.splash-tag { color:#aebccc; font-size:15px; letter-spacing:1px; }

@keyframes splashRise {
  from { opacity:0; transform:translateY(42px) scale(.97); }
  to   { opacity:1; transform:none; }
}

@media (prefers-reduced-motion: reduce) {
  .splash { opacity:0; pointer-events:none; }
  .splash-inner { animation:none; }
}

/* เลื่อนหัวเว็บให้เริ่มขึ้นหลัง splash จางหาย (หน้าแรก) */
body.splash-on .hero .container > * { animation-delay:2.9s; }
body.splash-on .hero .container > :nth-child(2) { animation-delay:3.05s; }
body.splash-on .hero .container > :nth-child(3) { animation-delay:3.2s; }
body.splash-on .hero .container > :nth-child(4) { animation-delay:3.35s; }
body.splash-on .hero .container > :nth-child(5) { animation-delay:3.5s; }

/* ---------- ฉากไว้อาลัยราชวงศ์จักรี (ช่วง 2 ของ splash) ---------- */
.mourn {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(160deg,#111111 0%,#1a1a1a 55%,#0c0c0c 100%);
  opacity:0; pointer-events:none; transition:opacity .9s ease;
  overflow-y:auto;
}
.mourn.show { opacity:1; pointer-events:auto; }
.mourn-inner { text-align:center; padding:40px 30px; animation:splashRise 1.2s cubic-bezier(.22,.61,.36,1) both; }
.mourn-crown { margin-bottom:18px; }
.mourn-crown svg { filter:drop-shadow(0 4px 14px rgba(201,167,107,.25)); }
.mourn-portrait {
  position:relative; width:136px; height:168px; margin:0 auto 18px;
  border:2px solid var(--gold-light); border-radius:70px 70px 8px 8px;
  background:#151515; overflow:hidden;
  box-shadow:0 8px 26px rgba(201,167,107,.22), inset 0 0 0 4px #161616;
}
.mourn-portrait img {
  position:absolute; inset:6px; width:calc(100% - 12px); height:calc(100% - 12px);
  object-fit:cover; object-position:top; z-index:2;
  border-radius:64px 64px 5px 5px;
  filter:grayscale(1) contrast(1.05) brightness(1.02);
}
.mourn-portrait-ph {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:var(--gold-light); font-size:42px; font-weight:600; letter-spacing:5px;
}
.mourn-name {
  color:#e8e2d2; font-size:15px; letter-spacing:1px; line-height:1.9;
  max-width:560px; margin:0 auto 22px; font-weight:500;
}
.mourn-line {
  width:200px; height:1px; margin:0 auto 26px;
  background:linear-gradient(90deg,transparent,var(--gold),transparent);
}
.mourn-khrap {
  color:var(--gold-light); font-size:16px; letter-spacing:3px;
  margin-bottom:14px; font-weight:500;
}
.mourn-title {
  color:#f5f2ea; font-size:clamp(26px,4.6vw,40px); font-weight:700;
  letter-spacing:2px; line-height:1.4; margin-bottom:16px;
}
.mourn-sub {
  color:#b8b8b8; font-size:16px; line-height:1.9; max-width:520px; margin:0 auto;
  letter-spacing:.5px;
}
.mourn-candle { color:var(--gold); font-size:26px; margin:26px 0; }
.mourn-btn {
  display:inline-flex; align-items:center; gap:10px;
  background:var(--gold); color:#fff; border:none; cursor:pointer;
  padding:14px 34px; border-radius:6px; font-size:16.5px; font-weight:600;
  font-family:var(--font); letter-spacing:1px;
  box-shadow:0 6px 20px rgba(176,141,79,.3);
  transition:all .3s;
}
.mourn-btn:hover { background:var(--gold-dark); transform:translateY(-2px); }
.mourn-btn .arr { font-size:18px; }

@media (prefers-reduced-motion: reduce) {
  .mourn, .mourn-inner { animation:none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid-3 { grid-template-columns:repeat(2,1fr); }
  .team-grid { grid-template-columns:repeat(2,1fr); }
  .why-wrap { grid-template-columns:1fr; gap:36px; }
  .contact-grid { grid-template-columns:1fr; }
  .footer-top { grid-template-columns:1fr 1fr; }
  .nav {
    position:fixed; inset:0 0 0 auto; width:min(320px,84vw);
    background:var(--paper); flex-direction:column; align-items:stretch;
    padding:80px 24px 30px; gap:6px;
    box-shadow:var(--shadow-lg);
    transform:translateX(100%); transition:transform .35s; z-index:300;
  }
  .nav.open { transform:none; }
  .nav a { padding:12px 16px; font-size:17px; }
  .nav-cta { margin-left:0; margin-top:14px; }
  .nav-toggle { display:block; z-index:310; position:relative; }
  .nav-overlay {
    position:fixed; inset:0; background:rgba(10,31,53,.55);
    opacity:0; pointer-events:none; transition:opacity .3s; z-index:290;
  }
  .nav-overlay.show { opacity:1; pointer-events:auto; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns:1fr; }
  .team-grid { grid-template-columns:1fr; }
  .footer-top { grid-template-columns:1fr; }
  .stats-inner { grid-template-columns:repeat(2,1fr); }
  .form-row { grid-template-columns:1fr; }
  .service-block { grid-template-columns:1fr; }
  .topbar-right { display:none; }
  .section { padding:56px 0; }
  .hero .container { padding:70px 0 80px; }
}
