/* =========================================================
   Fueangfa Xaysana 838 — style.css
   ไฟล์นี้คุมหน้าตาทุกหน้า แก้สีได้ที่ :root ด้านล่าง
   ========================================================= */

:root {
  --navy: #0B2A55;        /* น้ำเงินเข้ม (สีหลัก) */
  --navy-dark: #071C3A;   /* น้ำเงินเข้มมาก (หัว/ท้ายเว็บ) */
  --orange: #F28C28;      /* ส้ม (สีเน้น) */
  --orange-text: #B4580C; /* ส้มเข้ม ใช้กับตัวหนังสือบนพื้นขาว */
  --ink: #14202E;         /* ตัวหนังสือหลัก */
  --muted: #4A5A6E;       /* ตัวหนังสือรอง */
  --line: #D3D9E0;        /* เส้นขอบ */
  --concrete: #EEF0F2;    /* พื้นเทาอ่อน */
  --white: #FFFFFF;
  --asphalt: #1F242B;     /* สีถนน */
  --radius: 4px;
  --max: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Noto Sans Lao", "Overpass", "Phetsarath OT", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 17px;
}
body.lang-en { font-family: "Overpass", "Noto Sans Lao", sans-serif; line-height: 1.6; }

img { max-width: 100%; display: block; }
a { color: var(--navy); }
a:hover { color: var(--orange-text); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- สลับภาษา: ข้อความลาวใช้ class="lo" อังกฤษใช้ class="en" ---------- */
body:not(.lang-en) .en { display: none !important; }
body.lang-en .lo { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 112px); }
.section.grey { background: var(--concrete); }
.section.navy { background: var(--navy); color: var(--white); }

h1, h2, h3 { line-height: 1.35; margin: 0; }
body.lang-en h1, body.lang-en h2 { line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; color: var(--navy); }
.section.navy h2 { color: var(--white); }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 40em; margin-top: 16px; }
.section.navy .lead { color: #D2DCEA; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: 40px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 10px 24px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent;
}
.btn-orange { background: var(--orange); color: var(--navy-dark); }
.btn-orange:hover { background: #FFA040; color: var(--navy-dark); }
.btn-outline { border-color: currentColor; color: var(--white); }
.btn-outline:hover { color: var(--orange); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- หัวเว็บ ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 56px; height: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-size: 17px; }
.brand-name small { font-family: "Overpass", sans-serif; font-size: 12px; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px 20px; }
.main-nav a { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 600; padding: 8px 0; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--navy); border-bottom-color: var(--orange); }
.main-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--orange); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  min-width: 52px; min-height: 44px; padding: 6px 12px;
  border: 2px solid var(--navy); background: var(--white); color: var(--navy);
  font: 700 15px "Noto Sans Lao", "Overpass", sans-serif; border-radius: var(--radius); cursor: pointer;
}
.lang-btn:hover { background: var(--navy); color: var(--white); }
.menu-btn { display: none; min-width: 44px; min-height: 44px; border: 0; background: var(--navy); color: var(--white); border-radius: var(--radius); font-size: 20px; cursor: pointer; }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--concrete); }
  .header-tools .btn { display: none; }
}

/* ---------- ส่วนหัวหน้าแรก (รูปใหญ่) ---------- */
.hero { position: relative; color: var(--white); background: var(--navy-dark); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,28,58,0.94) 0%, rgba(7,28,58,0.78) 55%, rgba(7,28,58,0.45) 100%); }
.hero-inner { position: relative; padding-top: clamp(72px, 10vw, 136px); padding-bottom: clamp(56px, 7vw, 96px); display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; }
.hero-text { flex: 1 1 520px; min-width: 0; }
.hero .kicker { color: #D2DCEA; font-size: 16px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 68px); font-weight: 900; max-width: 15em; }
.hero .lead { color: #E3EAF3; }

/* ตารางตัวเลข (แบบกรอบแบบแปลนวิศวกรรม) */
.facts { flex: 1 1 300px; max-width: 420px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 3px solid var(--orange); border-left: 1px solid rgba(255,255,255,0.25); }
.facts > div { padding: 14px 16px; border-right: 1px solid rgba(255,255,255,0.25); border-bottom: 1px solid rgba(255,255,255,0.25); }
.facts dt { font-size: 14px; color: #C8D4E4; }
.facts dd { margin: 2px 0 0; font-family: "Overpass", sans-serif; font-weight: 800; font-size: 32px; line-height: 1.2; }
.facts dd small { font-family: "Noto Sans Lao", sans-serif; font-size: 15px; font-weight: 500; }

/* แถบถนน */
.road { background: var(--asphalt); border-top: 5px solid #E8ECF0; border-bottom: 5px solid #E8ECF0; height: 44px; display: flex; align-items: center; }
.road::before { content: ""; width: 100%; height: 6px; background: repeating-linear-gradient(90deg, var(--orange) 0 56px, transparent 56px 100px); }

/* ส่วนหัวของหน้าย่อย */
.page-head { background: var(--navy); color: var(--white); padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.page-head h1 { font-size: clamp(32px, 4.6vw, 58px); font-weight: 900; }
.page-head .lead { color: #D2DCEA; }

/* ---------- การ์ด ---------- */
.grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body p { color: var(--muted); font-size: 16px; }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--navy); }
.meta { font-size: 14px; color: var(--orange-text); font-weight: 700; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: #FFE8D1; color: #7A3A05; width: fit-content; }
.placeholder { aspect-ratio: 4 / 3; background: var(--concrete); border: 2px dashed #9AA8B8; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; text-align: center; padding: 12px; }

/* รายการมีขีดส้ม */
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.ticks li { display: flex; gap: 16px; align-items: flex-start; }
.ticks li::before { content: ""; flex: 0 0 28px; height: 6px; margin-top: 13px; background: var(--orange); }
.ticks h3 { font-size: 19px; }
.ticks p { color: var(--muted); font-size: 16px; margin-top: 4px; }
.section.navy .ticks p { color: #D2DCEA; }

.two-col { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.two-col > * { flex: 1 1 400px; min-width: 0; }
.photo { width: 100%; border-radius: var(--radius); object-fit: cover; aspect-ratio: 4 / 3; }

/* ---------- เครื่องจักร ---------- */
.fleet-total { font-family: "Overpass", sans-serif; font-weight: 900; font-size: clamp(56px, 8vw, 96px); line-height: 1; color: var(--orange); }
.fleet-group { border-top: 3px solid var(--navy); padding-top: 20px; }
.fleet-group .count { font-family: "Overpass", sans-serif; font-weight: 900; font-size: 44px; line-height: 1; color: var(--orange-text); }
.fleet-group ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 16px; }

/* ---------- ไทม์ไลน์ประสบการณ์ ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--orange); }
.timeline li { position: relative; padding: 0 0 36px 28px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; background: var(--navy); border: 3px solid var(--orange); border-radius: 50%; }
.timeline .year { font-family: "Overpass", sans-serif; font-weight: 800; font-size: 20px; color: var(--navy); }
.timeline p { color: var(--muted); margin-top: 6px; }

/* ---------- ฟอร์ม ---------- */
.form { background: var(--white); border-top: 6px solid var(--orange); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 18px; border-radius: var(--radius); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px; border: 2px solid #B8C3CF; border-radius: var(--radius);
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { flex: none; margin-top: 4px; }
.contact-list small { display: block; color: var(--muted); font-size: 14px; }
.contact-list a, .contact-list span { font-weight: 700; }

/* ---------- แถบชวนติดต่อ ---------- */
.cta { background: var(--orange); color: var(--navy-dark); }
.cta .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 40px; padding-top: 48px; padding-bottom: 48px; }
.cta h2 { color: var(--navy-dark); font-size: clamp(24px, 3vw, 36px); }

/* ---------- ท้ายเว็บ ---------- */
.site-footer { background: var(--navy-dark); color: #C8D4E4; }
.site-footer::before { content: ""; display: block; height: 12px; background: repeating-linear-gradient(-45deg, var(--orange) 0 16px, var(--navy-dark) 16px 32px); }
.footer-grid { display: grid; gap: 32px 48px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-top: 48px; padding-bottom: 32px; }
.site-footer h3 { color: var(--white); font-size: 17px; margin-bottom: 12px; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--orange); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; padding-bottom: 28px; font-size: 14px; }

/* ---------- เพิ่มเติม ---------- */
.cta .btn-row { margin-top: 0; }
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.tiles li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 22px; font-weight: 700; }
.figure { margin: 0; }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.service-block + .service-block { margin-top: clamp(56px, 7vw, 96px); }
.service-block .ticks { margin-top: 24px; gap: 12px; }
.service-block .ticks li::before { margin-top: 13px; }
.service-block .btn { margin-top: 28px; }
.vision { font-size: clamp(20px, 2vw, 24px); font-weight: 700; color: var(--navy); margin-top: 16px; }
.person .placeholder { aspect-ratio: 1 / 1; }
.quote-text { font-weight: 700; color: var(--navy); }
.note { font-size: 15px; color: var(--muted); margin-top: 24px; }
.map-box { margin-top: 28px; height: 240px; }
.team { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.team .card-body p { font-size: 15px; }
/* หัวข้อหน้าแรก: ภาษาลาวขึ้นบรรทัดละวลี ไม่ตัดกลางคำ */
.hero h1 .line { display: block; white-space: nowrap; }
/* ผู้บริหาร: รูปแนวตั้ง 4:5 การ์ดไม่กว้างเกินไป */
.team { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); }
.card .person-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: var(--concrete); border-bottom: 5px solid var(--orange); }
