*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F0F8FF;
  --white: #ffffff;
  --primary: #003366;
  --primary-dark: #002244;
  --primary-light: #DCF0FF;
  --secondary: #007BFF;
  --secondary-dark: #0060CC;
  --accent: #87CEEB;
  --section-alt: #EEF7FF;
  --text: #333333;
  --muted: #666666;
  --light: #888888;
  --border: #C8D8EC;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Kanit', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
}

/* NAV */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 6%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-btn {
  background: linear-gradient(135deg, #007BFF 0%, #003366 100%);
  color: #fff;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Kanit', sans-serif;
  transition: filter 0.2s;
}
.nav-btn:hover { filter: brightness(1.15); }

/* HERO */
#hero {
  min-height: 460px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #4A9CC9 0%, #002255 100%);
}

/* text colors scoped to hero for readability on gradient bg */
#hero .eyebrow { color: rgba(255,255,255,0.85); }
#hero h1 { color: #ffffff; }
#hero h1 em { color: rgba(255,255,255,0.75); }
#hero .hero-sub { color: rgba(255,255,255,0.82); }
#hero .btn-ghost { color: rgba(255,255,255,0.75); }
#hero .btn-ghost:hover { color: #ffffff; }

.hero-content {
  flex: 1;
  min-width: 0;
  padding: 3rem 3rem 3rem 7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* shadow อยู่ชั้นนอก ไม่โดน overflow: hidden ตัด */
.hero-image-shadow {
  flex: 0 0 46%;
  position: relative;
  filter: drop-shadow(-28px 8px 28px rgba(0,10,40,0.35));
}
.hero-image-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden; /* ตัด slide ให้พอดีกับ container */
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0;
  /* GPU layer เพื่อลดกระตุก */
  transform: translateZ(0);
  will-change: opacity;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }

.eyebrow {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.2rem, 3.2vw, 2.8rem);
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.4rem;
}
h1 em { font-style: normal; color: var(--secondary); }

.hero-sub {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 2.2rem;
  line-height: 1.9;
}

.hero-actions { display: flex; gap: 0.8rem; align-items: center; }

.btn-fill {
  background: linear-gradient(135deg, #007BFF 0%, #003366 100%);
  color: #fff;
  padding: 0.72rem 1.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Kanit', sans-serif;
  text-decoration: none;
  transition: filter 0.2s;
}
.btn-fill:hover { filter: brightness(1.15); }

.btn-ghost {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }

hr { border: none; border-top: 1px solid var(--border); margin: 0 6%; }

/* ABOUT */
#about {
  padding: 4rem 6%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text);
}
h2 em { font-style: normal; color: var(--secondary); }

.body-text {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.values { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.value { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; color: var(--text); font-weight: 400; }
.value-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); flex-shrink: 0; }

.about-panel {
  background: var(--primary-light);
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.about-panel h3 { font-size: 1.1rem; font-weight: 500; color: var(--text); margin-bottom: 0.7rem; }
.about-panel p { font-size: 0.9rem; color: var(--muted); font-weight: 300; line-height: 1.8; margin-bottom: 2rem; }

.stats { border-top: 1px solid var(--border); padding-top: 1.8rem; }
.stat-val { font-size: 2.8rem; font-weight: 600; color: var(--text); display: block; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 300; }

/* SERVICES */
#services { padding: 4rem 6%; background: var(--section-alt); }
.section-head { margin-bottom: 2.5rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.svc { background: var(--white); padding: 2rem 1.8rem; transition: background 0.2s; }
.svc:hover { background: var(--primary-light); }
.svc-num { font-size: 0.75rem; font-weight: 600; color: var(--secondary); letter-spacing: 1px; margin-bottom: 0.7rem; display: block; }
.svc h3 { font-size: 1.05rem; font-weight: 500; color: var(--text); margin-bottom: 0.5rem; }
.svc p { font-size: 0.93rem; color: var(--muted); line-height: 1.8; font-weight: 300; }

/* BOOK */
#book { padding: 4rem 6%; background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.book-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: start; }

.perks { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.55rem; }
.perk { font-size: 0.95rem; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; font-weight: 300; }
.perk::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--secondary); flex-shrink: 0; }

form { display: flex; flex-direction: column; gap: 0.9rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; font-weight: 400; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.72rem 0.9rem;
  font-size: 0.9rem;
  font-family: 'Kanit', sans-serif;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  font-weight: 300;
}
input::placeholder, textarea::placeholder { color: #AAAAAA; }
input:focus, select:focus, textarea:focus { border-color: var(--secondary); background: var(--white); }
textarea { resize: vertical; min-height: 80px; }

.submit {
  background: linear-gradient(135deg, #007BFF 0%, #003366 100%);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: 'Kanit', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.2s;
}
.submit:hover { filter: brightness(1.15); }

/* LINE CTA */
.line-cta {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.line-icon svg { width: 48px; height: 48px; }
.line-id { font-size: 1.05rem; color: var(--text); font-weight: 500; }
.line-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.8; font-weight: 300; }
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #06C755;
  color: #fff;
  padding: 0.82rem 1.6rem;
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: 'Kanit', sans-serif;
  font-weight: 500;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: filter 0.2s;
}
.btn-line:hover { filter: brightness(1.1); }

/* PRODUCTS */
#products { padding: 4rem 6%; background: var(--section-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* CONTACT */
#contact {
  padding: 4rem 6%;
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-items { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.ci { display: flex; gap: 1rem; align-items: flex-start; }
.ci-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.ci-icon svg { width: 16px; height: 16px; stroke: var(--secondary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ci-label { font-size: 0.8rem; color: var(--light); margin-bottom: 0.15rem; font-weight: 400; }
.ci-val { font-size: 1rem; color: var(--text); line-height: 1.6; font-weight: 400; }

.map-box {
  border-radius: 12px;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  overflow: hidden;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--white);
  font-weight: 300;
}
.footer-socials { display: flex; gap: 0.6rem; }
.footer-social-btn {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.footer-social-btn--fb { color: #1877F2; border-color: #1877F2; }
.footer-social-btn--fb:hover { background: #1877F2; color: #fff; }
.footer-social-btn--tt { color: #000000; border-color: #000000; }
.footer-social-btn--tt:hover { background: #000000; color: #fff; }
.footer-social-btn svg { width: 16px; height: 16px; fill: currentColor; }
.footer-logo { font-size: 1rem; font-weight: 600; color: var(--text); }
.footer-logo span { color: var(--primary); }

/* RESPONSIVE */
@media (max-width: 860px) {
  #hero { flex-direction: column; min-height: unset; align-items: stretch; }
  .hero-content { padding: 3.5rem 6% 2.5rem; }
  .hero-image-shadow { flex: none; width: 100%; height: 320px; filter: drop-shadow(0 -10px 20px rgba(0,10,40,0.25)); }
  #about, .book-inner, #contact { grid-template-columns: 1fr; gap: 3rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  nav .nav-links { display: none; }
}
@media (max-width: 500px) {
  .services-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 0.4rem; text-align: center; }
}
