/* RAM CMS v1.5.0 | Compact premium comparison & service overview
 * Scope: public <main> sections #เปรียบเทียบ and #บริการ only.
 * Image assets, attributes, dimensions, srcset, aspect-ratio and object-fit
 * are deliberately untouched.  Works on legacy 38 service pages.
 */

/* Harmonized editorial headings for both sections */
body main section:is(#เปรียบเทียบ, #บริการ) {
  box-sizing: border-box;
  padding-block: clamp(32px, 3.35vw, 46px) !important;
}
body main section#เปรียบเทียบ {
  background:
    radial-gradient(ellipse 65% 82% at 99% 3%, rgba(35, 154, 82, .085), transparent 75%),
    linear-gradient(160deg, #eaf2ec 0%, #f4f8f5 56%, #edf5ef 100%);
}
body main section#บริการ {
  background:
    radial-gradient(ellipse 52% 62% at 0% 0%, rgba(111, 204, 86, .065), transparent 74%),
    linear-gradient(180deg, #f9fcfa 0%, #f1f7f3 100%);
}
body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head,
body main section#บริการ > .container > .section-head.center {
  display: grid;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 17px;
  text-align: left;
}
body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head .kicker,
body main section#บริการ > .container > .section-head.center .kicker {
  width: max-content;
  max-width: 100%;
  margin-inline: 0;
  padding: 5px 10px;
  border: 1px solid #cce7d1;
  border-radius: 7px;
  background: linear-gradient(120deg, #e6f4e9, #edf8ed);
  color: #136f3a;
  font: 850 10px/1.3 system-ui, 'Noto Sans Thai', Tahoma, sans-serif;
  letter-spacing: .085em;
}
body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head h2 {
  max-width: 100%;
  margin: 0;
  color: #112b1d;
  font-size: clamp(22px, 2.27vw, 31px) !important;
  line-height: 1.32;
  font-weight: 900;
  letter-spacing: -.028em;
  overflow-wrap: break-word;
}
body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head h2 :is(strong, .keyword) {
  color: #128047;
}
body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head p {
  max-width: 1060px;
  margin: 0;
  color: #5b7263;
  font-size: clamp(12px, .96vw, 13.5px);
  line-height: 1.52;
}

/* Comparison | detailed content, less height; dark table header + green our-service column. */
body main section#เปรียบเทียบ .compare-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #d0e2d5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(16, 70, 39, .075), inset 0 1px 0 #fff;
}
body main section#เปรียบเทียบ .compare-table {
  width: 100%;
  min-width: 690px;
  table-layout: fixed;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #293d30;
}
body main section#เปรียบเทียบ .compare-table :is(th, td) {
  box-sizing: border-box;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid #e5eee8;
  font-size: 12.5px;
  line-height: 1.52;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
body main section#เปรียบเทียบ .compare-table th:first-child { width: 22%; }
body main section#เปรียบเทียบ .compare-table th:nth-child(2) { width: 43%; }
body main section#เปรียบเทียบ .compare-table th:nth-child(3) { width: 35%; }
body main section#เปรียบเทียบ .compare-table thead th {
  padding-block: 13px;
  color: #f3fff5;
  background: #0b291b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.38;
  border-right: 1px solid rgba(229, 255, 232, .13);
}
body main section#เปรียบเทียบ .compare-table thead th:nth-child(2) {
  background: #154a2b;
  color: #ddffc5;
}
body main section#เปรียบเทียบ .compare-table thead th:last-child { border-right: 0; }
body main section#เปรียบเทียบ .compare-table tbody tr:nth-child(even) { background: #f9fcfa; }
body main section#เปรียบเทียบ .compare-table tbody th {
  color: #183829;
  font-weight: 850;
  background: #f7faf7;
}
body main section#เปรียบเทียบ .compare-table tbody td.ours {
  color: #164b2b;
  font-weight: 690;
  background: #eff9ed;
  box-shadow: inset 3px 0 0 rgba(71, 164, 80, .35);
}
body main section#เปรียบเทียบ .compare-table tbody tr:nth-child(even) td.ours { background: #eaf7e8; }
body main section#เปรียบเทียบ .compare-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
body main section#เปรียบเทียบ .compare-table .check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 6px;
  background: #d2efce;
  color: #147e35;
  font: 900 12px/1 system-ui, sans-serif;
  vertical-align: middle;
}
body main section#เปรียบเทียบ .compare-note {
  max-width: 100%;
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 3px solid #7ac48b;
  border-radius: 0 8px 8px 0;
  background: rgba(206, 231, 210, .4);
  color: #526a5b;
  font-size: 11.5px;
  line-height: 1.5;
}
body main section#เปรียบเทียบ .compare-wrap:focus-visible { outline: 2px solid #2d9957; outline-offset: 3px; }

/* Service category overview | editorial compact icon + description cards. */
body main section#บริการ .quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}
body main section#บริการ .quick-grid > .quick-card {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  align-items: center;
  column-gap: 11px;
  row-gap: 8px;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 15px 15px 14px;
  overflow: hidden;
  border: 1px solid #dbece0;
  border-radius: 13px;
  background: linear-gradient(155deg, #fff 0%, #f8fcf9 100%);
  box-shadow: 0 7px 22px rgba(16, 70, 37, .055);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body main section#บริการ .quick-grid > .quick-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  width: auto;
  height: 3px;
  background: linear-gradient(90deg, #3dad5e, #a8e780 62%, transparent 100%);
}
body main section#บริการ .quick-grid > .quick-card:hover {
  transform: translateY(-2px);
  border-color: #a9d7b3;
  box-shadow: 0 12px 27px rgba(17, 72, 38, .09);
}
body main section#บริการ .quick-grid > .quick-card > .icon {
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1;
  width: 38px;
  height: 38px;
  min-width: 0;
  margin: 0;
  border: 1px solid #d9edda;
  border-radius: 11px;
  background: linear-gradient(150deg, #ecf9e8, #dff4dc);
  box-shadow: none;
  color: #205f39;
  font-size: 19px;
  line-height: 1;
}
body main section#บริการ .quick-grid > .quick-card > h3 {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  color: #153c26;
  font-size: clamp(12px, 1.12vw, 15px) !important;
  line-height: 1.36;
  font-weight: 900;
  letter-spacing: -.016em;
  overflow-wrap: anywhere;
}
body main section#บริการ .quick-grid > .quick-card > h3 :is(strong, .keyword) { color: #168849; }
body main section#บริการ .quick-grid > .quick-card > p {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #e3eee5;
  color: #5a7061;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.54;
}

/* Responsive: keep the comparison table intact and scrollable; no text/image clipping. */
@media (max-width: 1070px) {
  body main section#บริการ .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body main section#บริการ .quick-grid > .quick-card > h3 { font-size: 14px !important; }
}
@media (max-width: 720px) {
  body main section:is(#เปรียบเทียบ, #บริการ) { padding-block: 27px 31px !important; }
  body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head,
  body main section#บริการ > .container > .section-head.center { gap: 5px; margin-bottom: 13px; }
  body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head h2 { font-size: clamp(20px, 5.5vw, 25px) !important; line-height: 1.32; }
  body main section:is(#เปรียบเทียบ, #บริการ) > .container > .section-head p { font-size: 11.5px; line-height: 1.48; }
  body main section#เปรียบเทียบ .compare-wrap { border-radius: 11px; }
  body main section#เปรียบเทียบ .compare-wrap::before {
    content: '↔ เลื่อนตารางเพื่อเปรียบเทียบข้อมูลทั้งหมด';
    position: sticky;
    left: 0;
    z-index: 3;
    box-sizing: border-box;
    display: block;
    width: 100%;
    padding: 7px 10px;
    border-bottom: 1px solid #d8ebdd;
    background: #eef9ef;
    color: #28603b;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.4;
  }
  body main section#เปรียบเทียบ .compare-table { min-width: 635px; }
  body main section#เปรียบเทียบ .compare-table :is(th, td) { padding: 10px 12px; font-size: 11.5px; }
  body main section#เปรียบเทียบ .compare-table thead th { font-size: 11.5px; }
  body main section#เปรียบเทียบ .compare-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 0 #deede2;
  }
  body main section#เปรียบเทียบ .compare-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
  body main section#เปรียบเทียบ .compare-note { font-size: 10.5px; padding: 8px 10px; }
  body main section#บริการ .quick-grid { gap: 9px; }
  body main section#บริการ .quick-grid > .quick-card { padding: 12px; border-radius: 11px; }
  body main section#บริการ .quick-grid > .quick-card > .icon { width: 36px; height: 36px; font-size: 18px; }
  body main section#บริการ .quick-grid > .quick-card > h3 { font-size: 13px !important; }
  body main section#บริการ .quick-grid > .quick-card > p { font-size: 11px; }
}
@media (max-width: 520px) {
  body main section#บริการ .quick-grid { grid-template-columns: 1fr; gap: 8px; }
  body main section#บริการ .quick-grid > .quick-card {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto;
    column-gap: 10px;
    row-gap: 3px;
    padding: 11px 12px;
  }
  body main section#บริการ .quick-grid > .quick-card > .icon { grid-row: 1 / span 2; align-self: center; width: 36px; height: 36px; }
  body main section#บริการ .quick-grid > .quick-card > h3 { grid-row: 1; line-height: 1.32; }
  body main section#บริการ .quick-grid > .quick-card > p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 11px;
    line-height: 1.42;
  }
}
@media (prefers-reduced-motion: reduce) {
  body main section#บริการ .quick-grid > .quick-card { transition: none; }
  body main section#บริการ .quick-grid > .quick-card:hover { transform: none; }
}
