:root {
  --sv-deep: #091b30;
  --sv-navy: #12395f;
  --sv-crimson: #8b1d32;
  --sv-gold: #b39a4b;
  --sv-green: #4d6d61;
  --sv-ink: #1c2229;
  --sv-stone: #e9e7df;
  --sv-paper: #f8f7f2;
  --white: #ffffff;
  --muted: #5c6872;
  --line: rgba(9, 27, 48, 0.17);
  --shadow: 0 18px 44px rgba(9, 27, 48, 0.1);
  --font-thai: "Sukhumvit Set", "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif;
  --font-chinese: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--sv-ink);
  background: var(--sv-paper);
  font-family: var(--font-thai);
  font-size: 16px;
  line-height: 1.65;
}

.lang-zh body,
.lang-zh { font-family: var(--font-chinese); }

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

:focus-visible { outline: 3px solid var(--sv-gold); outline-offset: 4px; }

.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 40;
  padding: 10px 14px;
  background: var(--sv-deep);
  color: var(--white);
}

.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(9, 27, 48, 0.1);
}

.utility-bar {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 5px max(16px, calc((100% - var(--max)) / 2));
  background: var(--sv-deep);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.74rem;
  line-height: 1.2;
}

.utility-bar span:first-child { margin-right: auto; color: var(--white); font-weight: 700; }
.utility-bar a { color: var(--white); text-decoration: none; }

.topbar {
  width: min(100% - 40px, var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  min-width: 245px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--sv-deep);
  text-decoration: none;
}

.brand-logo {
  height: 72px;
  width: auto;
  max-width: 340px;
  flex: 0 0 auto;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.1; letter-spacing: 0; }
.brand small { max-width: 260px; margin-top: 3px; color: var(--muted); font-size: 0.68rem; line-height: 1.25; }

.site-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  align-self: stretch;
  flex: 1;
}

.site-nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--sv-deep);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 10px;
  bottom: 17px;
  left: 10px;
  height: 2px;
  background: var(--sv-crimson);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 170ms ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.language-switch { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.74rem; }

.language-switch select {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--sv-deep);
  font: inherit;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

.menu-button span { display: block; width: 19px; height: 2px; margin: 5px auto; background: var(--sv-deep); }

.button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 0.89rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: background 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--sv-crimson); color: var(--white); }
.button.primary:hover { background: #6f1326; }
.button.secondary { background: var(--sv-deep); color: var(--white); }
.button.secondary:hover { background: var(--sv-navy); }
.button.ghost { border-color: var(--line); background: var(--white); color: var(--sv-deep); }
.button.ghost.inverse { border-color: rgba(255, 255, 255, 0.58); background: transparent; color: var(--white); }
.button.ghost.inverse:hover { background: rgba(255, 255, 255, 0.12); }
.button.small { min-height: 38px; padding: 9px 13px; font-size: 0.78rem; }

main { overflow: hidden; }

.hero {
  position: relative;
  min-height: min(770px, calc(100vh - 30px));
  display: flex;
  align-items: flex-end;
  padding: 136px max(20px, calc((100% - var(--max)) / 2)) 56px;
  color: var(--white);
  background-color: var(--sv-deep);
  background-image: linear-gradient(90deg, rgba(4, 16, 29, 0.91) 0%, rgba(4, 16, 29, 0.73) 43%, rgba(4, 16, 29, 0.25) 100%), linear-gradient(0deg, rgba(4, 16, 29, 0.62) 0%, rgba(4, 16, 29, 0) 45%), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: var(--sv-gold);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 730px) minmax(210px, 310px);
  align-items: end;
  justify-content: space-between;
  gap: 42px;
}

.hero-copy { max-width: 730px; }
.eyebrow { margin: 0 0 13px; color: var(--sv-crimson); font-size: 0.79rem; font-weight: 800; line-height: 1.35; text-transform: uppercase; }
.hero .eyebrow { color: #e5cd77; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; color: var(--sv-deep); line-height: 1.13; letter-spacing: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", var(--font-thai); font-weight: 700; }
h1 { max-width: 780px; color: var(--white); font-size: 4.45rem; }
h2 { font-size: 2.72rem; }
h3 { font-size: 1.25rem; }

.lead { max-width: 680px; margin: 23px 0 0; color: rgba(255, 255, 255, 0.88); font-size: 1.08rem; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }

.hero-index {
  display: grid;
  gap: 0;
  border-left: 1px solid rgba(229, 205, 119, 0.82);
  background: rgba(4, 16, 29, 0.28);
}

.hero-index span { padding: 10px 0 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.23); color: rgba(255, 255, 255, 0.95); font-size: 0.8rem; font-weight: 800; }
.hero-index span:first-child { color: #e5cd77; }

.stats {
  width: min(100%, 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--sv-deep);
  color: var(--white);
}

.stats div { min-height: 143px; padding: 30px clamp(18px, 3vw, 46px); border-right: 1px solid rgba(255, 255, 255, 0.18); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; color: #e5cd77; font-family: Georgia, "Times New Roman", serif; font-size: 2.55rem; line-height: 1; }
.stats span { display: block; max-width: 190px; margin-top: 9px; color: rgba(255, 255, 255, 0.8); font-size: 0.82rem; line-height: 1.4; }

.quick-links {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 92px 0 86px;
  display: grid;
  grid-template-columns: minmax(0, 0.67fr) minmax(0, 1.33fr);
  gap: 60px;
  align-items: start;
}

.quick-links h2 { max-width: 390px; }
.quick-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.quick-link-grid a { min-height: 182px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px 20px 18px; border-right: 1px solid var(--line); color: var(--sv-deep); text-decoration: none; }
.quick-link-grid a:first-child { border-left: 1px solid var(--line); }
.quick-link-grid a:hover { background: var(--white); box-shadow: inset 0 -4px 0 var(--sv-crimson); }
.quick-link-grid strong { font-size: 1.05rem; line-height: 1.25; }
.quick-link-grid span { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

.section { width: min(100% - 40px, var(--max)); margin: 0 auto; padding: 92px 0; }
.section-heading { max-width: 780px; margin-bottom: 35px; }
.section-heading h2 { max-width: 720px; }

.card-grid, .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.info-card, .news-card, .contact-card, .mini-calendar { min-height: 232px; padding: 27px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; }
.card-grid > :first-child, .news-grid > :first-child { border-left: 1px solid var(--line); }
.info-card:nth-child(4n + 2) { background: rgba(179, 154, 75, 0.11); }
.info-card:nth-child(4n + 3) { background: rgba(77, 109, 97, 0.11); }
.info-card p, .news-card p { margin: 15px 0 0; color: var(--muted); }
.link-card { position: relative; color: inherit; text-decoration: none; transition: background 170ms ease; }
.link-card:hover { background: var(--white); }
.link-card span { position: absolute; right: 23px; bottom: 17px; color: var(--sv-crimson); font-size: 1.6rem; font-weight: 800; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, 0.25); }
.steps div { min-height: 174px; padding: 25px; background: var(--sv-deep); color: var(--white); }
.steps strong { display: block; margin-bottom: 33px; color: #e5cd77; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1; }
.steps span { font-size: 1.04rem; font-weight: 800; }

.table-wrap { overflow-x: auto; border-top: 3px solid var(--sv-deep); }
table { width: 100%; min-width: 680px; border-collapse: collapse; background: var(--white); }
th, td { padding: 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--sv-deep); color: var(--white); }

.faq-list { max-width: 900px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item button { width: 100%; min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: transparent; color: var(--sv-deep); font: inherit; font-size: 1.08rem; font-weight: 800; text-align: left; cursor: pointer; }
.faq-item button span { color: var(--sv-crimson); font-size: 1.35rem; }
.faq-item p { margin: 0; padding: 0 0 23px; color: var(--muted); }

.form-section { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 62px; align-items: start; padding-top: 68px; border-top: 4px solid var(--sv-crimson); }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 24px; background: var(--white); box-shadow: var(--shadow); }
label { display: grid; gap: 7px; color: var(--sv-deep); font-size: 0.86rem; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--sv-ink); padding: 10px 12px; font: inherit; }
textarea { resize: vertical; }
.full, form button { grid-column: 1 / -1; }

.split, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
.split > div { padding: 42px; }
.split > div:first-child { background: var(--sv-stone); }
.mini-calendar { display: grid; gap: 11px; align-content: start; background: var(--sv-deep); color: var(--white); }
.mini-calendar strong { color: #e5cd77; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.mini-calendar span { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); font-weight: 700; }
.contact-card { background: var(--white); box-shadow: var(--shadow); }
.contact-grid iframe { width: 100%; min-height: 360px; border: 0; filter: saturate(0.75) contrast(0.96); }

.news-grid { border-bottom: 1px solid var(--line); }
.news-card { min-height: 255px; position: relative; background: var(--white); }
.news-card > span { color: var(--sv-crimson); font-size: 0.76rem; font-weight: 800; text-transform: uppercase; }
.news-card h3 { margin-top: 18px; }
.news-card a { position: absolute; right: 24px; bottom: 22px; color: var(--sv-deep); font-size: 0.85rem; font-weight: 800; }

.closing-cta { width: min(100% - 40px, var(--max)); margin: 24px auto 96px; padding: 54px; background: var(--sv-crimson); color: var(--white); }
.closing-cta h2, .closing-cta .eyebrow { color: var(--white); }

.site-footer { padding: 70px 20px 98px; background: var(--sv-deep); color: var(--white); }
.footer-grid { width: min(100%, var(--max)); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h2, .site-footer h3 { color: var(--white); }
.site-footer h2 { margin-top: 18px; font-size: 1.8rem; }
.site-footer p, .footer-note { color: rgba(255, 255, 255, 0.72); }
.site-footer a { display: block; margin: 8px 0; color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.footer-note { width: min(100%, var(--max)); margin: 42px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.84rem; }

.mobile-cta { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: none; gap: 6px; padding: 8px; background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 26px rgba(9, 27, 48, 0.1); }
.mobile-cta .button { flex: 1; min-width: 0; padding-inline: 6px; font-size: 0.76rem; }

@media (max-width: 1160px) {
  .topbar { flex-wrap: wrap; padding: 10px 0; }
  .menu-button { display: inline-block; }
  .site-nav { display: none; order: 3; width: 100%; padding: 8px 0 0; border-top: 1px solid var(--line); }
  .site-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav a { min-height: 46px; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--sv-stone); }
  .hero { min-height: 670px; }
  .hero-content { grid-template-columns: minmax(0, 1fr) 230px; }
  h1 { font-size: 3.75rem; }
  .quick-links { gap: 36px; }
}

@media (max-width: 820px) {
  .utility-bar { gap: 12px; padding-inline: 14px; }
  .utility-bar span:nth-child(2) { display: none; }
  .topbar { width: min(100% - 28px, var(--max)); min-height: 64px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .header-actions .button { display: none; }
  .language-switch span { display: none; }
  .hero { min-height: 625px; padding: 88px 22px 42px; background-image: linear-gradient(90deg, rgba(4, 16, 29, 0.88) 0%, rgba(4, 16, 29, 0.48) 100%), linear-gradient(0deg, rgba(4, 16, 29, 0.6) 0%, rgba(4, 16, 29, 0) 55%), var(--hero-image); }
  .hero-content { grid-template-columns: 1fr; gap: 30px; }
  .hero-index { max-width: 360px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(229, 205, 119, 0.7); border-left: 0; }
  .hero-index span { padding: 8px 8px 0 0; border-bottom: 0; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(2n) { border-right: 0; }
  .stats div:nth-child(-n + 2) { border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
  .quick-links { width: min(100% - 40px, var(--max)); grid-template-columns: 1fr; gap: 30px; padding: 70px 0; }
  .quick-links h2 { max-width: 540px; }
  .card-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid > :nth-child(3), .news-grid > :nth-child(3) { border-left: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section { gap: 34px; }
}

@media (max-width: 560px) {
  .utility-bar span:first-child { font-size: 0.67rem; }
  .utility-bar a { font-size: 0.68rem; }
  .brand strong { font-size: 0.98rem; }
  .brand-logo { height: 52px; width: auto; }
  .site-nav.is-open { grid-template-columns: 1fr; }
  .hero { min-height: 605px; padding-top: 74px; }
  h1 { font-size: 2.45rem; }
  h2 { font-size: 1.9rem; }
  .lead { margin-top: 17px; font-size: 0.98rem; line-height: 1.62; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .button:last-child { grid-column: 1 / -1; }
  .hero-index { gap: 7px 15px; }
  .hero-index span { font-size: 0.72rem; }
  .stats div { min-height: 128px; padding: 23px 17px; }
  .stats strong { font-size: 2.15rem; }
  .stats span { font-size: 0.74rem; }
  .quick-links, .section, .closing-cta { width: min(100% - 28px, var(--max)); }
  .quick-links { padding: 57px 0; }
  .quick-link-grid { grid-template-columns: 1fr; }
  .quick-link-grid a { min-height: 119px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
  .section { padding: 64px 0; }
  .card-grid, .news-grid, .steps, .form-section, .split, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .card-grid > :not(:first-child), .news-grid > :not(:first-child) { border-left: 1px solid var(--line); }
  .info-card, .news-card { min-height: 190px; }
  .form-section { padding-top: 44px; }
  form { grid-template-columns: 1fr; padding: 18px; }
  .split > div { padding: 28px; }
  .contact-grid iframe { min-height: 300px; }
  .closing-cta { margin-bottom: 82px; padding: 28px; }
  .site-footer { padding: 54px 20px 112px; }
  .mobile-cta { display: flex; }
}

/* About History Timeline */
.about-history {
  max-width: 900px;
  margin: 0 auto;
}
.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3rem;
}
.chapter-header {
  text-align: center;
  margin-bottom: 2rem;
}
.chapter-subtitle {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.chapter-header h3 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.chapter-body {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}
.chapter-events {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.event-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-left: 4px solid var(--primary);
  align-items: flex-start;
}
.event-year {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.25rem;
  min-width: 120px;
  flex-shrink: 0;
}
.event-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.event-content p {
  color: var(--text);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .event-card {
    flex-direction: column;
    gap: 0.5rem;
  }
  .event-year {
    font-size: 1.1rem;
    min-width: auto;
  }
}
