:root {
  --primary: #00A8E1;
  --primary-dark: #0084B0;
  --primary-soft: rgba(0, 168, 225, 0.06);
  --primary-soft-strong: rgba(0, 168, 225, 0.18);
  --accent: #003DA5;
  --text: #111111;
  --muted: #5f6368;
  --line: #e6e7eb;
  --surface: #ffffff;
  --surface-soft: #f3f6fb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans Thai", sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.75;
}

.container { width: min(1140px, 92%); margin: 0 auto; }
.narrow { width: min(760px, 92%); margin: 0 auto; }
.section { padding: 56px 0; }
.section-soft { background: var(--surface-soft); }

/* ============ Topbar ============ */
.topbar {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 30;
  /* backdrop-filter removed: causes severe scroll jank because the browser
     reblurs the background every frame as content scrolls underneath */
}
.topbar-inner {
  min-height: 64px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.18rem;
}
.brand-logo { flex-shrink: 0; display: block; height: 32px; width: auto; }
.top-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top-actions a { text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem; }
.top-actions a:hover { color: var(--primary); }
.top-actions a[aria-current="page"] { color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 2px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

/* ============ Breadcrumb ============ */
.breadcrumb { font-size: 0.88rem; color: var(--muted); margin: 24px 0 8px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ============ Article hero ============ */
.article-hero { padding: 32px 0 24px; border-bottom: 1px solid var(--line); }
.article-hero .kicker {
  font-size: 0.78rem;
  letter-spacing: 1.4px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.article-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.25; margin: 0 0 16px; font-weight: 800; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.article-meta .dot { color: #ccc; }
.article-author { font-weight: 700; color: var(--text); }
.article-read-time { display: inline-flex; align-items: center; gap: 6px; }
.article-cover {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 16px;
  margin: 20px 0 8px;
  border: 1px solid var(--line);
}

/* ============ Article body ============ */
.article-body { padding: 36px 0 60px; font-size: 1.06rem; color: #222; }
.article-body p { margin: 0 0 20px; }
.article-body h2 { font-size: 1.55rem; margin: 40px 0 14px; font-weight: 800; line-height: 1.3; color: var(--text); }
.article-body h3 { font-size: 1.18rem; margin: 28px 0 12px; font-weight: 700; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--primary); font-weight: 800; }
.article-body a { color: var(--primary); font-weight: 700; }
.article-body a:hover { text-decoration: underline; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 12px 12px 0;
  font-size: 1.02rem;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.96rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.article-body th, .article-body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.article-body thead { background: #fafafc; }
.article-body th { font-weight: 800; }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body tbody td.highlight { background: var(--primary-soft); color: var(--text); }
.article-body .tldr {
  background: linear-gradient(180deg, rgba(0,168,225,0.05), rgba(0,61,165,0.04));
  border: 1px solid rgba(0,168,225,0.18);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 28px;
}
.article-body .tldr h2 { margin: 0 0 8px; font-size: 1rem; color: var(--primary); letter-spacing: 0.04em; text-transform: uppercase; }
.article-body .tldr p { margin: 0; font-size: 0.98rem; color: #2f3136; }
.article-body figure { margin: 24px 0; }
.article-body figure img { width: 100%; max-height: 400px; object-fit: contain; background: #f3f6fb; border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.article-body figcaption { font-size: 0.86rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Product spec card */
.product-spec-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 22px 0;
}
.product-spec-card img { width: 140px; height: 140px; object-fit: contain; background: #fff; border-radius: 10px; padding: 8px; border: 1px solid var(--line); }
.product-spec-card h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--primary); }
.product-spec-card .price { display: inline-block; background: var(--primary); color: #fff; font-weight: 800; padding: 4px 10px; border-radius: 999px; font-size: 0.92rem; margin-bottom: 8px; }
.product-spec-card p { margin: 0; font-size: 0.95rem; color: #4a4d53; line-height: 1.65; }
@media (max-width: 600px) {
  .product-spec-card { grid-template-columns: 1fr; }
  .product-spec-card img { width: 100%; height: 200px; }
}

/* ============ CTA inline ============ */
.article-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  margin: 32px 0;
  text-align: center;
}
.article-cta h3 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.article-cta p { margin: 0 0 16px; color: rgba(255,255,255,0.94); }
.article-cta .btn { background: #fff; color: var(--primary); padding: 12px 26px; border-radius: 999px; font-weight: 800; }
.article-cta .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* ============ Related articles ============ */
.related { background: var(--surface-soft); padding: 56px 0; }
.related h2 { font-size: 1.5rem; margin: 0 0 24px; font-weight: 800; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.related-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.related-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(17,17,17,0.06); }
.related-card .tag { font-size: 0.74rem; letter-spacing: 1.2px; color: var(--primary); font-weight: 800; text-transform: uppercase; }
.related-card h3 { margin: 0; font-size: 1.04rem; font-weight: 700; line-height: 1.45; }
.related-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* ============ Blog index page ============ */
.blog-hero {
  background: linear-gradient(135deg, #003066 0%, #00A8E1 60%, #003DA5 130%);
  color: #fff;
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(0,61,165,0.35), transparent 60%),
              radial-gradient(circle at 15% 90%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; line-height: 1.2; font-weight: 800; }
.blog-hero p { color: rgba(255,255,255,0.9); margin: 0; font-size: 1.08rem; max-width: 640px; }
.blog-hero .kicker { color: rgba(255,255,255,0.7); font-size: 0.8rem; letter-spacing: 1.6px; font-weight: 700; margin-bottom: 8px; }

.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; margin-top: 32px; }
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(17,17,17,0.07); border-color: rgba(0,168,225,0.3); }
.post-card .tag { font-size: 0.75rem; letter-spacing: 1.4px; color: var(--primary); font-weight: 800; text-transform: uppercase; }
.post-card h2 { margin: 0; font-size: 1.32rem; font-weight: 800; line-height: 1.35; }
.post-card p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.7; }
.post-card .post-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.post-card .read-more { color: var(--primary); font-weight: 700; font-size: 0.95rem; margin-top: auto; }
@media (max-width: 740px) { .posts-grid { grid-template-columns: 1fr; } }

/* ============ Footer ============ */
.site-footer { background: #0a1832; color: #eee; padding: 40px 16px 56px; text-align: center; font-size: 14px; line-height: 1.8; }
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer small { color: #aaa; }

/* ============ LINE FAB ============ */
.line-fab {
  position: fixed; right: 16px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; background: #06c755; color: #fff;
  border-radius: 999px; box-shadow: 0 10px 28px rgba(6,199,85,0.45);
  font-weight: 800; text-decoration: none; font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.line-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(6,199,85,0.55); }
@media (max-width: 680px) {
  .line-fab { padding: 11px 14px; font-size: 0.9rem; }
  .line-fab .line-fab-label { display: none; }
}
