/* ═══════════════════════════════════════════════════════════
   SERVICE PAGE — page-specific styles only.
   Header, footer, buttons, colors, .section, .reveal and the whole
   .services-section / .sol-card component all come from the shared
   ../css/styles.css (same file the homepage uses, same #services
   selector), so the card design stays pixel-identical to the
   homepage's Consulting Service section without duplicating it here.
   ═══════════════════════════════════════════════════════════ */

/* Keep the current nav item ("บริการ") visibly active while on this page */
.nav-item.current > .nav-link { color: var(--navy); }
.nav-item.current > .nav-link::after { transform: scaleX(1); }

/* ── PAGE HERO — compact page-header banner ──
   Sized (together with the burst banner below) so the two fit within
   one desktop viewport without scrolling. */
.page-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Bottom-up brand-cyan wash — solid-ish where the title sits, fading to
   transparent toward the top so the photo still reads through.
   20260717 client feedback: ปรับความฟุ้งให้จางลงเล็กน้อย (ลดค่า alpha ลง
   เล็กน้อยตามคอมเมนต์ "จางลงนิดนึง แต่ไม่ต้องมาก") */
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(34,149,196,.86) 0%,
    rgba(34,149,196,.54) 32%,
    rgba(34,149,196,.13) 62%,
    rgba(34,149,196,0) 85%);
}
.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 0 64px 48px;
  width: 100%;
}
.page-hero-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw,52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 960px) {
  .page-hero { height: 320px; }
  .page-hero-content { padding: 0 32px 32px; }
}
@media (max-width: 600px) {
  .page-hero { height: 260px; }
  .page-hero-content { padding: 0 24px 24px; }
}

/* ── BURST BANNER — solid brand-cyan statement band ──
   Tighter vertical padding than the first pass, with a larger type
   size to compensate, so hero + banner fit one screen together. */
.burst-banner {
  position: relative;
  overflow: hidden;
  background: #2295C4;
  padding: 40px 64px;
  display: flex;
  justify-content: center;
}
.burst-banner-text {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 2.1vw,28px);
  line-height: 1.7;
  text-align: center;
}

/* Faint circuit-line texture anchored to the right edge — static, no
   animation, matching the same low-key accent used on the cards grid */
.burst-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46%;
  max-width: 560px;
  background-image: url('../images/element.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  opacity: .10;
  pointer-events: none;
}

@media (max-width: 960px) {
  .burst-banner { padding: 32px; }
}
@media (max-width: 700px) {
  .burst-banner::before { display: none; }
}
@media (max-width: 600px) {
  .burst-banner { padding: 28px 24px; }
  .burst-banner-text { font-size: 20px; line-height: 1.65; }
}

/* ── Hover effect — faint JMAC-blue gradient wash over the card photo ── */
#services .sol-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(35,57,105,.42) 0%, rgba(37,150,190,.34) 100%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
#services .sol-card:hover .sol-card-img::before { opacity: 1; }

/* ── Static grid — no carousel. 3 cards row 1, 2 cards row 2 (left-aligned,
   same card width as row 1 — natural grid behavior with 3 columns). ── */
#svcTrack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  overflow: visible;
  scroll-snap-type: none;
}

/* The shared stylesheet caps #services at max-height:900px with
   overflow:hidden — sized for the old compact single-row carousel
   (168px-tall images). This page shows two full rows of taller cards,
   so that cap silently clipped row 2 (cards existed in the DOM but were
   cropped out of view, footer immediately followed). Lift it here. */
#services {
  max-height: none !important;
  overflow: visible;
}

/* Taller, more photo-forward card images — dialed back from an earlier
   340px pass that made the cards too large */
#services .sol-card-img { height: 260px; }

/* tablet → 2 columns (last card left-aligned, alone in row 3) */
@media (max-width: 960px) {
  #svcTrack { grid-template-columns: repeat(2, 1fr); }
  #services .sol-card-img { height: 230px; }
}

/* mobile → 1 column, fully stacked */
@media (max-width: 600px) {
  #svcTrack { grid-template-columns: 1fr; }
  #services .sol-card-img { height: 200px; }
}

/* ── Decorative filler for the empty 3rd slot in row 2 ──
   No card frame/border — a faint, static tiled circuit-line texture
   at 10% opacity, no motion. */
#svcTrack .svc-decor {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
#svcTrack .svc-decor-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/element.png');
  background-repeat: repeat;
  background-size: 240px auto;
  background-position: center;
  opacity: .10;
}

/* tablet — decoration follows the lone 5th card into row 3's empty column */
@media (max-width: 960px) {
  #svcTrack .svc-decor { min-height: 200px; }
}

/* mobile — single column has no "empty slot" concept, so drop it */
@media (max-width: 600px) {
  #svcTrack .svc-decor { display: none; }
}

/* ── Fix the "broken" button outline on hover ──
   The card button keeps the brand 14px diagonal-cut corner (clip-path from
   .btn-primary). A normal CSS border gets clipped along that diagonal and
   reads as a broken / missing edge on hover (white fill + cyan outline).
   Draw the outline with layered backgrounds that trace the cut exactly
   (same device as .btn-outline) so it stays continuous around the corner. */
#services .sol-card-btn { border: 0; }
#services .sol-card-btn:hover {
  background-color: #fff;
  color: #2295C4;
  background-image:
    linear-gradient(#2295C4, #2295C4),   /* top edge */
    linear-gradient(#2295C4, #2295C4),   /* left edge */
    linear-gradient(#2295C4, #2295C4),   /* right edge (stops above the cut) */
    linear-gradient(#2295C4, #2295C4),   /* bottom edge (stops before the cut) */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><line x1='0' y1='14' x2='14' y2='0' stroke='%232295C4' stroke-width='1'/></svg>");  /* diagonal corner */
  background-repeat: no-repeat;
  background-origin: border-box;
  background-position: 0 0, 0 0, 100% 0, 0 100%, 100% 100%;
  background-size:
    100% 1px,                 /* top */
    1px 100%,                 /* left */
    1px calc(100% - 14px),    /* right */
    calc(100% - 14px) 1px,    /* bottom */
    14px 14px;                /* diagonal corner */
}

/* ── Mobile (≤600px): keep the button compact & right-aligned, same as
   desktop (not full-width). ── */
@media (max-width: 600px) {
  #services .sol-card-btn {
    width: auto;
    align-self: flex-end;
  }
}

/* ═══════════════════════════════════════════════════════════
   20260717 client feedback (sheet):
   20260721 แก้: กลับไปใช้ฟอนต์เดิม Noto Sans Thai แบบหน้า home (TH Sarabun New ใช้เฉพาะหน้า article-detail)
   ② เพิ่มขนาดฟอนต์พื้นฐานทั้งหน้าให้ใหญ่ขึ้น (16px → 18px)
   ═══════════════════════════════════════════════════════════ */
:root {
  --sans-th: 'Noto Sans Thai', system-ui, sans-serif;
  --sans-en: 'Noto Sans Thai', system-ui, sans-serif;
  --sans-jp: 'Noto Sans Thai', 'Noto Sans JP', sans-serif;
  --serif-jp: 'Noto Sans Thai', 'Noto Sans JP', sans-serif;
  --display: 'Noto Sans Thai', sans-serif;
}
body { font-size: 18px; }

/* ขยายตัวอักษรการ์ดบริการ (ค่าเดิมกำหนดใน styles.css ที่แชร์กับหน้าแรก
   จึง override เฉพาะหน้านี้แทนการแก้ไฟล์กลาง) */
#services .sol-card-title { font-size: 22px; }
#services .sol-card-sub { font-size: 18px; }
#services .sol-card-desc { font-size: 18px; }
#services .sol-card-tags { font-size: 18px; }
#services .services-intro .eyebrow { font-size: 18px; }
