/* ==========================================================================
   MEGA STEEL — static site stylesheet (mobile-first)
   ========================================================================== */
:root {
  --blue-900: #001838;
  --blue-800: #04398b;
  --blue-600: #1863cc;
  --blue-50: #eef4fc;
  --steel-100: #f4f6f9;
  --steel-200: #e3e8ef;
  --steel-500: #6b7787;
  --ink: #1f2a37;
  --white: #fff;
  --accent: #f5b300;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 24, 56, .08);
  --shadow-lg: 0 14px 40px rgba(0, 24, 56, .16);
  --container: 1180px;
  --header-h: 68px;
  --font-body: "Sarabun", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Kanit", "Sarabun", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-800); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.3; margin: 0 0 .5em; color: var(--blue-900); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--alt { background: var(--steel-100); }
.section--dark { background: var(--blue-900); color: #dfe7f3; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.section-head .eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: 14px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-600); margin-bottom: 6px;
}
.section--dark .section-head .eyebrow { color: var(--accent); }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); }
.section-head p { color: var(--steel-500); }
.section--dark .section-head p { color: #b9c6d9; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--blue-800); color: #fff; padding: 8px 14px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 999px;
  font-family: var(--font-head); font-size: 16px; border: 2px solid transparent; transition: .2s; cursor: pointer;
}
.btn--primary { background: var(--blue-800); color: #fff; }
.btn--primary:hover { background: var(--blue-600); color: #fff; }
.btn--light { background: #fff; color: var(--blue-800); }
.btn--light:hover { background: var(--accent); color: var(--blue-900); }
.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--blue-800); }
.btn svg { width: 18px; height: 18px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--steel-200);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue-900); }
.brand img { width: 46px; height: 46px; }
.brand span { font-family: var(--font-head); font-size: 15px; line-height: 1.2; }
.brand strong { display: block; font-size: 19px; color: var(--blue-800); letter-spacing: .04em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
  border: 0; background: transparent; padding: 10px; cursor: pointer; border-radius: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--blue-900); border-radius: 2px; transition: .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; background: #fff;
  box-shadow: var(--shadow-lg); max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.nav-open .main-nav { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 8px 20px 20px; }
.main-nav li a {
  display: block; padding: 13px 4px; font-family: var(--font-head); font-size: 18px; color: var(--blue-900);
  border-bottom: 1px solid var(--steel-200);
}
.main-nav li a[aria-current="page"] { color: var(--blue-600); }
.main-nav .nav-call {
  margin-top: 14px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue-800); color: #fff; border-radius: 999px;
}
.main-nav .nav-call svg { width: 18px; height: 18px; }
.main-nav .nav-fb { display: flex; align-items: center; gap: 10px; color: #1877f2; }
.main-nav .nav-fb svg { width: 22px; height: 22px; }

@media (min-width: 992px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; max-height: none; overflow: visible; box-shadow: none; border: 0; background: none; }
  .main-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .main-nav li a { border: 0; padding: 8px 14px; font-size: 17px; border-radius: 8px; position: relative; }
  .main-nav li a:not(.nav-call):not(.nav-fb)::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--blue-600);
    transform: scaleX(0); transition: transform .2s;
  }
  .main-nav li a:hover::after, .main-nav li a[aria-current="page"]::after { transform: scaleX(1); }
  .main-nav .nav-call { margin: 0 0 0 10px; padding: 9px 20px; }
  .main-nav .nav-call:hover { background: var(--blue-600); color: #fff; }
  .main-nav .nav-fb {
    width: 40px; height: 40px; padding: 0; margin-left: 6px; justify-content: center; border-radius: 50%;
    background: #1877f2; color: #fff;
  }
  .main-nav .nav-fb svg { width: 20px; height: 20px; }
  .main-nav .nav-fb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .main-nav .nav-fb:hover { background: #0f5fcc; color: #fff; }
}

/* ---------- hero slider ---------- */
.hero { position: relative; height: clamp(360px, 62vh, 620px); overflow: hidden; background: var(--blue-900); }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0;
  transition: opacity 1.2s ease; transform: scale(1.04);
}
.hero-slide.is-active { opacity: 1; animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 24, 56, .85) 0%, rgba(0, 24, 56, .55) 45%, rgba(0, 24, 56, .1) 100%);
}
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.hero-text { max-width: 620px; color: #fff; }
.hero-text .eyebrow { font-family: var(--font-head); letter-spacing: .14em; color: var(--accent); font-size: 14px; }
.hero-text h1 { color: #fff; font-size: clamp(30px, 5.4vw, 54px); margin: 8px 0 14px; }
.hero-text p { font-size: clamp(16px, 2vw, 19px); color: #dbe5f3; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-dots { position: absolute; z-index: 3; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer;
}
.hero-dots button.is-active { background: #fff; }

/* ---------- page banner (sub pages) ---------- */
.page-banner {
  position: relative; padding: 70px 0 60px; background-size: cover; background-position: center; color: #fff;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 24, 56, .88), rgba(4, 57, 139, .6)); }
.page-banner .container { position: relative; }
.page-banner h1 { color: #fff; font-size: clamp(28px, 5vw, 44px); margin-bottom: 4px; }
.page-banner p { margin: 0; color: #cfdcef; }
.breadcrumb { font-size: 14px; margin-bottom: 10px; color: #b9c6d9; }
.breadcrumb a { color: #fff; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 22px; }
@media (min-width: 600px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 3 / 2; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 20px; margin-bottom: 2px; }
.card-body p { margin: 0; color: var(--steel-500); font-size: 15px; }

.feature { text-align: center; padding: 28px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.feature-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--blue-900);
}
.feature-icon svg { width: 30px; height: 30px; }
.feature h3 { font-size: 22px; margin-bottom: 4px; }
.feature p { margin: 0; color: #b9c6d9; }

/* ---------- split (image + text) ---------- */
.split { display: grid; gap: 34px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; gap: 56px; } .split--reverse > :first-child { order: 2; } }
.split-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.split h2 { font-size: clamp(26px, 3.6vw, 36px); }
.split h2 small { display: block; font-size: .55em; color: var(--blue-600); letter-spacing: .06em; }
.lead { font-size: 19px; color: var(--blue-800); font-weight: 500; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--blue-50); color: var(--blue-800);
  padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; margin: 4px 6px 4px 0;
}
.badge svg { width: 16px; height: 16px; }

/* ---------- about: values ---------- */
.mv-box { padding: 26px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-top: 4px solid var(--blue-600); }
.mv-box h3 { font-size: 24px; }
.mv-box p { margin: 0; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 700px) { .values { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.values li { background: #fff; border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.values b {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; margin-bottom: 10px;
  background: var(--blue-800); color: #fff; font-family: var(--font-head); font-size: 28px;
}
.values strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: 19px; color: var(--blue-900); }
.values span { color: var(--steel-500); font-size: 15px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.table-wrap:focus-visible { outline-offset: 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--steel-200); white-space: nowrap; }
thead th { background: var(--blue-800); color: #fff; font-family: var(--font-head); font-weight: 500; }
tbody tr:nth-child(even) { background: var(--steel-100); }
tbody tr:hover { background: var(--blue-50); }
td:first-child, th[scope="row"] { font-weight: 600; text-align: left; }
.compare th[scope="row"] { background: #fafbfd; color: var(--blue-900); }
.compare td.is-best { color: var(--blue-800); font-weight: 700; background: rgba(24, 99, 204, .07); }
.compare thead th.is-best { background: var(--blue-600); }
.table-note { font-size: 14px; color: var(--steel-500); margin-top: 10px; }
.spec-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .spec-layout { grid-template-columns: 260px 1fr; } }
.spec-layout > *, .grid > *, .split > *, .contact-grid > * { min-width: 0; }
.spec-diagram img { max-width: 200px; width: 100%; }
.spec-diagram { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.spec-diagram img { margin: 0 auto; }
.spec-diagram p { margin: 10px 0 0; font-size: 15px; color: var(--steel-500); }

/* ---------- benefit tiles ---------- */
.benefit { background: #fff; border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.benefit .tag {
  display: inline-block; font-family: var(--font-head); font-size: 30px; font-weight: 600; color: var(--blue-600); line-height: 1;
}
.benefit .tag.up { color: #0c8a4e; }
.benefit h3 { font-size: 20px; margin: 8px 0 6px; }
.benefit p { margin: 0; color: var(--steel-500); font-size: 15px; }

/* ---------- gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .gallery--4 { grid-template-columns: repeat(4, 1fr); } }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--steel-200); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; }
.gallery a:hover img { transform: scale(1.08); filter: brightness(.85); }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(0, 10, 25, .93); display: none; align-items: center; justify-content: center; padding: 50px 12px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px;
  border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); color: #fff; border-radius: var(--radius); padding: 34px 28px; display: grid; gap: 18px; align-items: center; }
@media (min-width: 800px) { .cta { grid-template-columns: 1fr auto; padding: 40px 48px; } }
.cta h2 { color: #fff; margin: 0 0 4px; font-size: clamp(22px, 3vw, 30px); }
.cta p { margin: 0; color: #dbe6f7; }
.cta .hero-actions { justify-content: flex-start; }

/* ---------- careers ---------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: var(--radius);
  background: var(--blue-50); border-left: 5px solid var(--blue-600);
}
.notice svg { flex: 0 0 28px; width: 28px; height: 28px; color: var(--blue-600); }
.notice p { margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 600px) { .checklist { grid-template-columns: repeat(2, 1fr); } }
.checklist li { display: flex; gap: 10px; align-items: center; background: #fff; padding: 14px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.checklist svg { flex: 0 0 22px; width: 22px; height: 22px; color: #0c8a4e; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 26px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 20px; }
.contact-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--steel-200); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ic {
  flex: 0 0 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-800);
}
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--steel-500); font-size: 14px; line-height: 1.3; }
.contact-list a, .contact-list span.v { font-weight: 600; color: var(--ink); }
.contact-list a:hover { color: var(--blue-600); }
.qr { display: flex; gap: 16px; align-items: center; background: var(--steel-100); border-radius: 10px; padding: 14px; }
.qr img { width: 110px; border-radius: 6px; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 360px; height: 100%; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.quick-actions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.quick-actions .btn { white-space: nowrap; }
.quick-actions .btn { justify-content: center; }
.btn--line { background: #06c755; color: #fff; }
.btn--line:hover { background: #05a647; color: #fff; }
.btn--fb { background: #1877f2; color: #fff; }
.btn--fb:hover { background: #0f5fcc; color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-900); color: #b9c6d9; font-size: 15px; }
.footer-top { display: grid; gap: 30px; padding: 50px 0 36px; }
@media (min-width: 800px) { .footer-top { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.site-footer h4 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.site-footer a { color: #dfe7f3; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-brand img { width: 52px; background: #fff; border-radius: 10px; padding: 4px; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-weight: 500; font-size: 17px; line-height: 1.3; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--blue-800); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 599px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .brand span { display: none; }
  th, td { padding: 10px 12px; font-size: 15px; }
}

@media print {
  .site-header, .to-top, .hero-dots, .map { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* keep anchor targets clear of the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
