/*
Theme Name: ISDRC
Theme URI: https://example.com/
Author: ISDRC
Author URI: https://example.com
Description: ชุดธีมสำหรับเว็บไซต์ ISDRC
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: isdrc
Tags: one-column, custom-colors, custom-menu, custom-logo, featured-images, theme-options, translation-ready, blog
*/

/* -------------------------------------------------
  Google Fonts
  แนะนำให้ enqueue ผ่าน functions.php:
  Kanit + IBM Plex Sans Thai
------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Kanit:wght@300;400;500;600;700;800&display=swap");

/* -------------------------------------------------
  Design tokens
------------------------------------------------- */
:root {
  --wp--preset--color--base: #ffffff;
  --wp--preset--color--contrast: #0b1510;
  --wp--preset--color--contrast-2: #173125;
  --wp--preset--color--neutral: #f3f5f4;
  --wp--preset--color--neutral-2: #e7ece9;
  --wp--preset--color--accent: #2b6a54;
  --wp--preset--color--accent-2: #1f4f3f;
  --wp--preset--color--accent-3: #3b8d71;

  /* ลิงก์ทั้งเว็บ — โทนเขียวธีม */
  --link-color: var(--wp--preset--color--accent);
  --link-hover: var(--wp--preset--color--accent-2);
  --link-muted: var(--wp--preset--color--accent-3);

  --font-heading: "Kanit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ui: "Kanit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-xs: 0.875rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-2xl: clamp(1.7rem, 1.25rem + 1.4vw, 2.3rem);
  --fs-3xl: clamp(2.1rem, 1.5rem + 2vw, 3.2rem);
  --fs-4xl: clamp(2.4rem, 1.8rem + 2.8vw, 4rem);

  --lh-tight: 1.12;
  --lh-snug: 1.3;
  --lh-heading: 1.18;
  --lh-body: 1.75;
  --lh-relaxed: 1.9;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;

  --wp--preset--font-size--small: var(--fs-sm);
  --wp--preset--font-size--medium: var(--fs-md);
  --wp--preset--font-size--large: var(--fs-lg);
  --wp--preset--font-size--x-large: var(--fs-2xl);
  --wp--preset--font-size--xx-large: var(--fs-4xl);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.10);
  --shadow-subtle: 0 10px 22px rgba(0, 0, 0, 0.08);

  --container: 1120px;
  --gutter: 20px;
  --header-height: 72px;
}

/* -------------------------------------------------
  Reset / Base
------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--wp--preset--color--contrast);
  background: var(--wp--preset--color--base);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-normal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:visited {
  color: var(--link-color);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--link-muted);
  outline-offset: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
}

p,
ul,
ol,
dl,
blockquote,
input,
textarea,
select,
table,
.entry-content,
.content {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.h2,
.value-title,
.footer-title,
.entry-title,
.tname,
.svc-side h3,
.contact-form h3 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--wp--preset--color--contrast);
  margin-top: 0;
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  line-height: 1.04;
}

h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
}

h4 {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: 1.0625rem;
  font-weight: var(--fw-semibold);
}

h6 {
  font-size: 1rem;
  font-weight: var(--fw-semibold);
}

small,
.small {
  font-size: var(--fs-xs);
}

.container {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding: 78px 0;
}

.section-tight {
  padding: 56px 0;
}

.muted {
  color: rgba(11, 21, 16, 0.70);
}

.eyebrow {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: var(--fw-semibold);
  color: rgba(11, 21, 16, 0.72);
}

.divider {
  height: 1px;
  background: rgba(11, 21, 16, 0.10);
}

/* -------------------------------------------------
  Buttons / UI
------------------------------------------------- */
.btn,
.nav,
.nav a,
.chip,
.logo,
.badge,
.loop-center,
.loop-node,
.vicon,
.brand,
.footer-title {
  font-family: var(--font-ui);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(11, 21, 16, 0.16);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  user-select: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.btn-primary {
  background: var(--wp--preset--color--accent);
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: var(--wp--preset--color--accent-2);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* -------------------------------------------------
  Header
------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* พื้นสีปกติ + alpha เล็กน้อย (ไม่ใช้ glass/blur) */
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(11, 21, 16, 0.08);
}

body.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* พื้นเข้มโปร่งเล็กน้อย ทับบน Hero โดยไม่ใช้ backdrop-blur */
  background: rgba(11, 21, 16, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.home .site-header .brand,
body.home .site-header .nav a {
  color: #fff;
}

body.home .site-header .nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

body.home .site-header .nav a:visited {
  color: #a7f3d0;
  text-decoration: none;
}

body.home .site-header .btn-primary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--wp--preset--color--contrast);
  border-color: transparent;
}

body.home .site-header .btn-primary:hover {
  background: #fff;
}

body.home .site-header .custom-logo-link img {
  filter: brightness(0) invert(1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 14px 0;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-bold);
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--link-color);
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: var(--link-hover);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, #e8ff5d 0 36%, transparent 38%),
    linear-gradient(135deg, #2b6a54, #0b1510);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: var(--fw-medium);
  color: var(--link-color);
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav ul,
.nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  text-decoration: none;
}

.nav a:visited {
  color: var(--link-color);
  text-decoration: none;
}

.nav a:hover {
  background: rgba(43, 106, 84, 0.12);
  color: var(--link-hover);
  text-decoration: none;
}

.nav a:active {
  text-decoration: none;
}

/* -------------------------------------------------
  Mobile nav (hamburger)
------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--link-muted);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.home .site-header .nav-toggle {
  color: #fff;
}

.site-header.nav-is-open .nav-toggle .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-is-open .nav-toggle .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-is-open .nav-toggle .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
  }

  .header-inner {
    flex-wrap: nowrap;
    row-gap: 0;
  }

  .header-inner .brand,
  .header-inner > .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-header .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100vh - var(--header-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 24px;
    margin: 0;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(11, 21, 16, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 100;
    animation: navSlideDown 0.25s ease;
  }

  body.home .site-header .nav {
    background: rgba(255, 255, 255, 0.98);
  }

  .site-header.nav-is-open .nav {
    display: flex;
  }

  .site-header .nav a,
  .site-header .nav li a {
    color: var(--link-color) !important;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(11, 21, 16, 0.06);
  }

  .site-header .nav a:hover,
  .site-header .nav a:focus {
    background: rgba(43, 106, 84, 0.1);
    color: var(--link-hover) !important;
  }

  body.home .site-header .nav a:visited {
    color: var(--link-color) !important;
  }

  .site-header .nav li {
    width: 100%;
  }

  .header-cta {
    flex-shrink: 0;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none !important;
  }
}

/* -------------------------------------------------
  Hero
------------------------------------------------- */
.hero {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  background: #0b1510;
}

body.home .site-main {
  padding-top: 0;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
  width: 100%;
}

.hero-wrap {
  position: relative;
  width: 100%;
  min-height: 520px;
  min-height: 85vh;
  overflow: hidden;
  border-radius: 0;
  background: #0b1510;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  opacity: .95;
  width: 100%;
}

.hero-media > div {
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 21, 16, 0.78) 0%, rgba(11, 21, 16, 0.45) 42%, rgba(11, 21, 16, 0.20) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.00) 40%, rgba(0, 0, 0, 0.25));
}

.hero-content {
  position: relative;
  padding: 100px var(--gutter) 74px;
  max-width: 680px;
  margin-inline: auto;
  color: #fff;
}

@media (min-width: 768px) {
  .hero-content {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}

.hero-title {
  font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.6rem);
  line-height: 1.08;
  margin: 10px 0 16px;
  letter-spacing: -0.03em;
  font-weight: var(--fw-extrabold);
  color: #fff;
}

.hero-desc {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
  max-width: 55ch;
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-dots {
  position: absolute;
  left: 24px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  opacity: .8;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.40);
}

.dot.is-active {
  background: rgba(255, 255, 255, 0.92);
}

/* -------------------------------------------------
  Center copy / headings
------------------------------------------------- */
.center-copy {
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
}

.h2 {
  font-size: clamp(1.65rem, 1.15rem + 1.3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  font-weight: var(--fw-bold);
}

.lead {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.8;
  color: rgba(11, 21, 16, 0.75);
  margin: 0;
}

/* -------------------------------------------------
  Value block
------------------------------------------------- */
.value-block {
  background: linear-gradient(180deg, #0c1712, #0b1510);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.value-inner {
  padding: 54px 44px 40px;
}

.value-title {
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem);
  margin: 0 0 8px;
  font-weight: var(--fw-bold);
  color: #fff;
}

.value-desc {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 70ch;
  font-family: var(--font-body);
  line-height: 1.8;
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.vcard {
  background: rgba(255, 255, 255, 0.90);
  color: var(--wp--preset--color--contrast);
  border-radius: 16px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-subtle);
  min-height: 128px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vicon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(43, 106, 84, 0.16), rgba(43, 106, 84, 0.04));
  border: 1px solid rgba(43, 106, 84, 0.20);
  display: grid;
  place-items: center;
  font-weight: var(--fw-extrabold);
  color: var(--wp--preset--color--accent-2);
}

.vcard h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.vcard p {
  margin: 0;
  font-size: var(--fs-sm);
  color: rgba(11, 21, 16, 0.72);
  line-height: 1.75;
}

/* -------------------------------------------------
  Team cards
------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.tcard {
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
  transition: transform .15s ease;
}

.tcard:hover {
  transform: translateY(-2px);
}

.timg {
  aspect-ratio: 4 / 3;
  background: var(--wp--preset--color--neutral);
  background-size: cover;
  background-position: center;
}

.tmeta {
  padding: 12px 12px 14px;
}

.tname {
  margin: 0;
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  line-height: 1.45;
}

.trole {
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  color: rgba(11, 21, 16, 0.65);
  line-height: 1.65;
}

/* -------------------------------------------------
  Services accordion
------------------------------------------------- */
.services {
  background: linear-gradient(180deg, #fff, var(--wp--preset--color--neutral));
}

.svc-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  margin-top: 26px;
  align-items: start;
}

details.accord {
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.10);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

details.accord summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.accord summary::-webkit-details-marker {
  display: none;
}

.chev {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(11, 21, 16, 0.14);
  display: grid;
  place-items: center;
  color: rgba(11, 21, 16, 0.70);
  flex: 0 0 auto;
  transition: transform .15s ease;
}

details[open] .chev {
  transform: rotate(180deg);
}

.accord p {
  margin: 10px 0 0;
  color: rgba(11, 21, 16, 0.70);
  font-size: var(--fs-sm);
  line-height: 1.75;
}

.svc-side {
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.10);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
}

.svc-side h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
}

/* -------------------------------------------------
  Diagram section
------------------------------------------------- */
.diagram-box {
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 0;
}

.diagram-copy {
  padding: 34px 34px 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  font-size: .85rem;
  font-weight: var(--fw-semibold);
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--wp--preset--color--neutral);
  border: 1px solid rgba(11, 21, 16, 0.10);
  color: rgba(11, 21, 16, 0.78);
}

.diagram-visual {
  background: radial-gradient(circle at 20% 20%, rgba(43, 106, 84, 0.18), transparent 45%),
              radial-gradient(circle at 80% 60%, rgba(43, 106, 84, 0.12), transparent 50%),
              linear-gradient(180deg, #f7faf8, #ffffff);
  padding: 24px;
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(11, 21, 16, 0.08);
}

.loop {
  width: min(380px, 100%);
  aspect-ratio: 1/1;
  border-radius: 999px;
  border: 1px dashed rgba(43, 106, 84, 0.40);
  position: relative;
  display: grid;
  place-items: center;
}

.loop-center {
  width: 54%;
  height: 54%;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(43, 106, 84, 0.18), rgba(43, 106, 84, 0.06));
  border: 1px solid rgba(43, 106, 84, 0.22);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  font-weight: var(--fw-bold);
  color: var(--wp--preset--color--accent-2);
}

.loop-node {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.12);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  font-size: .82rem;
  font-weight: var(--fw-semibold);
  color: rgba(11, 21, 16, 0.78);
  line-height: 1.35;
}

.n1 { top: -10px; left: 50%; transform: translateX(-50%); }
.n2 { top: 18%; right: -10px; }
.n3 { bottom: 18%; right: -10px; }
.n4 { bottom: -10px; left: 50%; transform: translateX(-50%); }
.n5 { bottom: 18%; left: -10px; }
.n6 { top: 18%; left: -10px; }

/* -------------------------------------------------
  Clients / Investments
------------------------------------------------- */
.logo-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  opacity: .9;
}

.logo {
  width: 120px;
  height: 46px;
  border-radius: 12px;
  background: var(--wp--preset--color--neutral);
  border: 1px solid rgba(11, 21, 16, 0.10);
  display: grid;
  place-items: center;
  font-weight: var(--fw-bold);
  color: rgba(11, 21, 16, 0.55);
}

.invest-row {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  width: 180px;
  height: 70px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(11, 21, 16, 0.10);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
  display: grid;
  place-items: center;
  font-weight: var(--fw-bold);
  color: rgba(11, 21, 16, 0.70);
}

/* -------------------------------------------------
  Contact split
------------------------------------------------- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #0b1510;
}

.contact-image {
  min-height: 420px;
  background-size: cover;
  background-position: center;
}

.contact-form {
  padding: 34px 34px 30px;
  color: #fff;
  background: linear-gradient(180deg, rgba(11, 21, 16, 0.96), rgba(11, 21, 16, 0.88));
}

.contact-form h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: var(--fw-bold);
  color: #fff;
}

.form-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.contact-form label {
  font-family: var(--font-ui);
  font-weight: var(--fw-semibold);
  font-size: .92rem;
  color: rgba(255, 255, 255, 0.82);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

/* -------------------------------------------------
  Footer
------------------------------------------------- */
.site-footer {
  padding: 52px 0;
  background: #fff;
  border-top: 1px solid rgba(11, 21, 16, 0.10);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.footer-title {
  font-weight: var(--fw-bold);
  margin: 0 0 10px;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: rgba(11, 21, 16, 0.70);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.footer-links a {
  color: var(--link-color);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--link-hover);
  text-decoration: none;
}

.copyright {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(11, 21, 16, 0.60);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

/* -------------------------------------------------
  Legacy theme (โพสต์/หน้า/อาร์ไคฟ์)
------------------------------------------------- */
.site-main {
  padding: 2rem 0;
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 1.3rem + 1vw, 2.4rem);
  line-height: 1.25;
  font-weight: var(--fw-bold);
}

.entry-meta {
  font-size: var(--fs-sm);
  color: rgba(11, 21, 16, 0.65);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.posts-list,
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.posts-list > li,
.search-results > li {
  border-bottom: 1px solid rgba(11, 21, 16, 0.10);
  padding: 2rem 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--wp--preset--color--neutral);
  color: var(--link-color);
  text-decoration: none;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
}

.pagination a:hover {
  background: rgba(43, 106, 84, 0.12);
  color: var(--link-hover);
  text-decoration: none;
}

.pagination .current {
  background: var(--wp--preset--color--accent);
  color: #fff;
}

/* -------------------------------------------------
  Gutenberg / WordPress content typography
------------------------------------------------- */
.entry-content,
.wp-block-post-content,
.content,
.post,
.page {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

.entry-content a,
.wp-block-post-content a,
.content a {
  color: var(--link-color);
  text-decoration: none;
}

.entry-content a:hover,
.entry-content a:focus,
.wp-block-post-content a:hover,
.wp-block-post-content a:focus,
.content a:hover,
.content a:focus {
  color: var(--link-hover);
  text-decoration: none;
}

.entry-content p,
.entry-content li,
.wp-block-post-content p,
.wp-block-post-content li,
.content p,
.content li {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

.entry-content p,
.content p {
  margin: 0 0 1rem;
}

.entry-content ul,
.entry-content ol,
.content ul,
.content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4,
.wp-block-post-content h5,
.wp-block-post-content h6 {
  font-family: var(--font-heading);
  margin: 1.6em 0 0.6em;
}

.entry-content h2,
.wp-block-post-content h2 {
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem);
}

.entry-content h3,
.wp-block-post-content h3 {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
}

.entry-content blockquote,
.wp-block-post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--wp--preset--color--accent);
  background: var(--wp--preset--color--neutral);
  border-radius: 0 12px 12px 0;
}

.entry-content table,
.wp-block-post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.entry-content th,
.entry-content td,
.wp-block-post-content th,
.wp-block-post-content td {
  padding: 0.75rem;
  border: 1px solid rgba(11, 21, 16, 0.10);
}

/* -------------------------------------------------
  Responsive
------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-content {
    padding: 90px var(--gutter) 54px;
  }

  .value-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .svc-grid {
    grid-template-columns: 1fr;
  }

  .diagram-box {
    grid-template-columns: 1fr;
  }

  .diagram-visual {
    border-left: none;
    border-top: 1px solid rgba(11, 21, 16, 0.08);
  }

  .contact-split {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-wrap {
    min-height: 560px;
  }

  .hero-title {
    line-height: 1.12;
  }

  .hero-desc,
  .lead,
  .entry-content p,
  .entry-content li,
  .content p,
  .content li {
    font-size: 0.98rem;
  }
}

.rc-page {
  font-family: var(--font-body);
}
.rc-hero h1,
.rc-section-title,
.rc-card h3,
.rc-panel h3 {
  font-family: var(--font-heading);
}

.rc-page {
  --primary: var(--link-color);
  --primary-dark: var(--link-hover);
  --accent: #14b8a6;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --bg-soft: #f8fafc;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  color: var(--text);
  /* font-family: "Sarabun", "Prompt", system-ui, sans-serif; */
  line-height: 1.7;
}

.rc-page * {
  box-sizing: border-box;
}

.rc-page a {
  color: var(--primary);
  text-decoration: none;
}

.rc-page a:hover,
.rc-page a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

.rc-hero {
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 48px 28px;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}

.rc-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(20,184,166,0.18) 0%, rgba(20,184,166,0) 70%);
  pointer-events: none;
}

.rc-badge {
  display: inline-block;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(15, 118, 110, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.rc-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.rc-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.rc-section {
  margin-top: 24px;
}

.rc-section-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
}

.rc-section-desc {
  margin: 0 0 20px;
  color: var(--muted);
}

.rc-grid {
  display: grid;
  gap: 20px;
}

.rc-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rc-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  height: 100%;
}

.rc-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.rc-card p {
  margin: 0;
  color: var(--muted);
}

.rc-list {
  margin: 0;
  padding-left: 18px;
}

.rc-list li {
  margin-bottom: 8px;
  color: var(--muted);
}

.rc-highlight {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: stretch;
}

.rc-panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
}

.rc-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.rc-panel p {
  margin: 0;
  color: var(--muted);
}

.rc-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rc-stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}

.rc-stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.rc-stat span {
  color: var(--muted);
  font-size: 14px;
}

.rc-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rc-contact-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.rc-contact-item:last-child {
  border-bottom: 0;
}

.rc-contact-label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.rc-contact-value {
  font-weight: 600;
  color: var(--text);
}

.rc-links {
  display: grid;
  gap: 12px;
}

.rc-link-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  transition: all .2s ease;
}

.rc-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.rc-link-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.rc-link-card span {
  color: var(--muted);
  font-size: 14px;
}

.rc-footer-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .rc-grid-2,
  .rc-grid-3,
  .rc-highlight,
  .rc-contact {
    grid-template-columns: 1fr;
  }

  .rc-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .rc-page {
    padding: 16px 12px 40px;
  }

  .rc-hero:not(.rc-hero-bg) {
    padding: 32px 20px;
    border-radius: 22px;
  }

  .rc-card,
  .rc-panel {
    padding: 18px;
  }

  .rc-stat-grid {
    grid-template-columns: 1fr;
  }

  .rc-hero p {
    font-size: 16px;
  }
}

/* HERO BACKGROUND FULL — ชิดขอบบนจอ ไม่มุมโค้ง */
.rc-hero.rc-hero-bg {
	border-radius: 0;
	border: none;
	margin-bottom: 28px;
}

/* ปิด decorative จาก .rc-hero เมื่อใช้รูปพื้นหลัง */
.rc-hero.rc-hero-bg::after {
	display: none;
}

/* HERO BACKGROUND FULL */
.rc-hero-bg {
	position: relative;
	padding: 100px 20px 80px;
	color: #fff;
	overflow: hidden;
}

/* ทำ overlay ให้ตัวหนังสืออ่านง่าย */
.rc-hero-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0,0,0,0.55) 0%,
		rgba(0,0,0,0.45) 40%,
		rgba(0,0,0,0.55) 100%
	);
	z-index: 1;
}

/* background จริง */
.rc-hero-bg {
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
}

/* content อยู่เหนือ overlay */
.rc-hero-bg > * {
	position: relative;
	z-index: 2;
}

/* ขยายเต็มความกว้างหน้าจอ (ชิดซ้าย–ขวา) */
.rc-hero-bg {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* เพิ่มความสูง */
.rc-hero-bg {
	min-height: 420px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* หน้าแรก: ชิดขอบบนจอ (ยกเลิก padding-top ของ .rc-page) */
body.home .rc-page {
	padding-top: 0;
}

body.home .rc-hero.rc-hero-bg {
	padding-top: calc(var(--header-height, 72px) + 48px);
}