:root {
  --brand-blue: #0284c7;
  --brand-blue-dark: #0369a1;
  --brand-light: #e0f2fe;
  --text-muted: #64748b;
  --bg-soft: #f8fafc;
  --border-soft: #e2e8f0;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1e293b;
  background: #fff;
}

.text-brand { color: var(--brand-blue) !important; }

.site-logo {
  display: block;
  width: auto;
  max-width: 160px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.site-logo-footer {
  max-width: 140px;
  height: 42px;
}

.navbar-brand {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.btn-brand {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  font-weight: 600;
}
.btn-brand:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #fff;
}

.btn-outline-brand {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  font-weight: 600;
}
.btn-outline-brand:hover {
  background: var(--brand-blue);
  color: #fff;
}

.btn-line {
  background: #06c755;
  border-color: #06c755;
  color: #fff;
  font-weight: 600;
}
.btn-line:hover { background: #05b34c; color: #fff; }

.nav-link.active { color: var(--brand-blue) !important; font-weight: 600; }
.nav-link:hover { color: var(--brand-blue); }

.footer-link { color: #94a3b8; text-decoration: none; }
.footer-link:hover { color: #fff; }

.page-hero {
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff 60%);
  padding: 3rem 0;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 700; }

.section-padding { padding: 3.5rem 0; }
.section-title { font-size: clamp(1.3rem, 3vw, 1.65rem); font-weight: 700; margin-bottom: 0.75rem; }
.section-intro { color: var(--text-muted); line-height: 1.75; max-width: 42rem; }

/* กรอบรูปคงที่ — ไฟล์ต้นฉบับขนาดไม่เท่าก็ crop ให้สม่ำเสมอ */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: 0.75rem;
}

.img-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Hero / เกี่ยวกับเรา */
.img-frame.hero-img {
  aspect-ratio: 16 / 10;
  max-height: min(400px, 52vw);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

/* รูปใหญ่ในหน้าบริการ (คอลัมน์เต็ม) */
.img-frame.service-img {
  aspect-ratio: 4 / 3;
  max-height: min(360px, 70vw);
}

/* รูปบนการ์ดหน้าแรก + บทความ — สัดส่วนเดียวกันทุกใบ */
.service-card .img-frame,
.article-card .img-frame {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  flex-shrink: 0;
}

/* รูปหัวบทความเต็มความกว้าง */
.img-frame.article-lead-img {
  aspect-ratio: 16 / 9;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.service-card,
.article-card {
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.service-card:hover,
.article-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.service-card > .img-frame:first-child,
.article-card > .img-frame:first-child {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.trust-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  color: #475569;
}
.trust-list li:last-child { border-bottom: none; }

.contact-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.policy-page { padding: 2.5rem 0 4rem; }
.policy-page h2 { font-size: 1.1rem; margin-top: 1.75rem; color: var(--brand-blue-dark); }
.policy-page p, .policy-page li { color: #475569; line-height: 1.7; }

.article-body h2 { font-size: 1.2rem; margin-top: 2rem; color: var(--brand-blue-dark); }
.article-body p { color: #475569; line-height: 1.8; }

.badge-service {
  background: var(--brand-light);
  color: var(--brand-blue-dark);
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .page-hero { text-align: center; }
  .page-hero .hero-actions { justify-content: center; }
}
