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

:root {
  --navy: #1a4db3;
  --navy-light: #2d66d4;
  --navy-dark: #0f3282;
  --amber: #e09020;
  --amber-light: #f5b840;
  --cream: #ffffff;
  --white: #ffffff;
  --gray-50: #f7f8fa;
  --gray-100: #eef0f4;
  --gray-200: #dde1ea;
  --gray-400: #9ba3b8;
  --gray-600: #5f6880;
  --gray-800: #2c3348;
  --text: #1e2535;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 4px rgba(26,77,179,0.07);
  --shadow-md: 0 4px 16px rgba(26,77,179,0.10);
  --shadow-lg: 0 8px 32px rgba(26,77,179,0.13);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Thai', sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  background-color: #3060c0;
  background-image: url('pic/bg_new1.jpg'); 
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Light gradient overlay — left-heavy so text stays readable */
.hero::before {
  content: '';
  position: absolute;
  /* แก้ไขจาก inset: 0; เพื่อให้รองรับเว็บเบราว์เซอร์เวอร์ชันเก่าและ Safari บน iOS ได้อย่างสมบูรณ์ */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    105deg,
    rgba(21, 34, 75, 0.93) 0%,
    rgba(36, 60, 133, 0.82) 45%,
    rgba(18, 17, 68, 0.45) 62%,
    rgba(255, 255, 255, 0) 100% /* เปลี่ยนจาก transparent เป็น rgba เพื่อป้องกันปัญหาจอมืดดำบน Safari */
  );
  z-index: 1;
}

.hero-nav {
  position: relative;
  z-index: 10;
  padding: 1.5rem 2rem;
}

.hero-nav img {
  max-width: 200px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 8rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--amber-light);
}

.hero-title {
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-title em {
  font-style: normal;
  color: var(--amber-light);
}

.hero-desc {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.78);
  line-height: 1.85;
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  text-shadow: #313131 2px 2px 20px;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: #fff;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(212,130,26,0.40);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,130,26,0.50);
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.55s forwards;
}

.hero-stat {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: #fff;
  min-width: 140px;
}

.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amber-light);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
}

/* ─── SECTIONS ─────────────────────────────────────────── */
.section {
  padding: 4rem 2rem;
}

.section--overlap {
  padding: 0 2rem 4rem;
  margin-top: -56px;
  position: relative;
  z-index: 20;
}

.section--overlap .section-inner {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(10, 36, 99, 0.13), 0 2px 8px rgba(10, 36, 99, 0.07);
}

.section-inner {
  max-width: 820px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1.75rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* ─── DOCS GRID ─────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 1.5rem;
}

.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.doc-card:hover {
  border-color: rgba(10,36,99,0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.doc-icon {
  width: 44px;
  height: 44px;
  background: rgba(10,36,99,0.07);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 32px;
  color: var(--navy);
}

.doc-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 3px;
  line-height: 1.3;
}

.doc-desc {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.55;
}

/* ─── TABS ─────────────────────────────────────────────── */
.tabs-wrapper {
  margin-top: 2rem;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.18s;
}

.tab-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.ndid-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-800);
  line-height: 1.75;
}

.ndid-box strong {
  color: var(--navy);
}

.banks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
}

.bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  padding: 4px 12px 4px 6px;
  color: var(--gray-800);
  font-weight: 500;
}

.bank-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* ─── STEPS ─────────────────────────────────────────────── */
.steps-section {
  background: var(--gray-50);
  padding: 4rem 2rem;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.steps-section .section-label {
  color: var(--navy);
}

.steps-section .section-label::before {
  background: var(--amber);
}

.steps-section .section-title {
  color: var(--navy-dark);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 2rem;
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: background 0.2s;
  position: relative;
}

.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--gray-100);
}

.step-card:hover {
  background: var(--gray-50);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(26,77,179,0.25);
}

.step-img {
  width: 100px;
  height: auto;
  display: block;
  opacity: 0.92;
}

.step-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
}

.step-desc {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.step-badge {
  font-size: 0.7rem;
  background: rgba(26,77,179,0.07);
  color: var(--navy);
  border: 1px solid rgba(26,77,179,0.15);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.steps-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ─── FAQ ───────────────────────────────────────────────── */
.faq-section {
  background: var(--cream);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.5rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: rgba(10,36,99,0.2);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 1.25rem;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-q i {
  font-size: 1rem;
  color: var(--navy);
  transition: transform 0.22s;
  flex-shrink: 0;
  opacity: 0.6;
}

.faq-item.open .faq-q i {
  transform: rotate(180deg);
  opacity: 1;
}

.faq-a {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.8;
  border-top: 1px solid var(--gray-100);
  padding-top: 1rem;
}

.faq-item.open .faq-a {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ─── CONTACT ───────────────────────────────────────────── */
.contact-section {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  padding: 3.5rem 2rem;
  text-align: center;
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.6rem;
}

.contact-sub {
  font-size: 0.88rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 0.9rem;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow-sm);
}

.contact-btn:hover {
  background: var(--gray-50);
  border-color: var(--navy-light);
  box-shadow: var(--shadow-md);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  padding: 2rem 2rem;
  text-align: center;
}

.footer-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.9;
}

.footer-warn {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ─── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 720px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-card:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }

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

  .step-card::after {
    display: none !important;
  }

  .hero-stat {
    min-width: 120px;
  }
}