@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'IBM Plex Sans Thai', sans-serif !important;
}

/* ═══════════════════════════════════════════════
   COLOR VARIABLES — Maroon / Red Theme (SRT)
═══════════════════════════════════════════════ */
:root {
  --primary:       #762629;   /* SRT maroon */
  --primary-dark:  #4a1619;   /* darker maroon */
  --primary-light: #fdf1f0;   /* pale pink tint */
  --blue:          #96343a;   /* accent red (was royal blue) */
  --blue-hover:    #5c1d20;   /* hover state */
  --blue-mid:      #8a2e32;   /* mid maroon */
  --blue-bg:       #fbe0de;   /* card tint (pale pink) */
  --blue-light:    #fdf1f0;

  /* backward-compat aliases (old pages use --red / --maroon) */
  --red:       var(--blue);
  --red-hover: var(--blue-hover);
  --maroon:    var(--primary);
  --maroon-2:  #7c232a;
  --pink-bg:   #facfc9;

  /* Text */
  --text-ink:   #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;

  /* Structural */
  --border:    #e2e8f0;
  --bg:        #f1f5f9;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.11);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius:    8px;
  --radius-lg: 12px;
}

/* ═══════════════════════════════════════════════
   RESET / BASE
═══════════════════════════════════════════════ */
body { background: var(--bg); color: var(--text-ink); line-height: 1.65; font-size: 15px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; vertical-align: middle; }
button { cursor: pointer; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 64px 0; }

/* ═══════════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════════ */
header {
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* Top strip — logo area */
.nav-top {
  background: #fff;
  padding: 14px 0;
  border-bottom: 3px solid var(--primary);
}
.nav-top .container {
  display: flex; align-items: center; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--primary);
}
.nav-logo img  { height: 54px; flex-shrink: 0; }
.nav-logo-text { font-size: 12.5px; line-height: 1.5; color: var(--primary); }
.nav-logo-text .sub  { opacity: .8; font-size: 11px; color: var(--text-light); display: block; }
.nav-logo-text .main { font-size: 14px; font-weight: 700; color: var(--primary); }
.nav-logo-text .sub2 { opacity: .95; font-size: 10.5px; color: var(--primary); display: block; margin-top: 2px; }
.nav-logo-text em    { font-style: normal; color: var(--primary); font-weight: 800; }

/* Main nav links */
.nav-main { background: var(--primary); }
.nav-main .container {
  display: flex; align-items: stretch; position: relative;
}
.nav-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 22px; padding: 12px 16px; margin-left: auto;
}

.nav-links { display: flex; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 18px;
  color: rgba(255,255,255,.93); font-size: 14px; font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li.active > a {
  background: rgba(255,255,255,.13);
  color: #fff;
}
.nav-links > li.active > a { border-bottom: 3px solid #e0ac52; }

/* Dropdown */
.nav-links > li:hover .dropdown-menu,
.nav-links > li.dd-open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 200;
}
.dropdown-menu a {
  display: block; padding: 10px 16px;
  color: var(--text-ink); font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  transition: background .12s, color .12s;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--blue-light); color: var(--primary); }

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle { display: flex; align-items: center; }
  .nav-links {
    flex-direction: column; display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--primary); z-index: 500;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 13px 20px; }
  .nav-links > li.active > a { border-bottom: none; border-left: 3px solid #e0ac52; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0;
    background: rgba(0,0,0,.2);
  }
  .dropdown-menu a { color: rgba(255,255,255,.85); padding-left: 36px; border-bottom-color: rgba(255,255,255,.08); }
  .dropdown-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
}

/* ═══════════════════════════════════════════════
   HERO SLIDER (homepage)
═══════════════════════════════════════════════ */
.hero { position: relative; height: 480px; overflow: hidden; background: var(--primary-dark); }
.hero-slider { position: relative; height: 100%; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
  animation: kenburns 14s ease-in-out infinite alternate;
}
.hero-slide.active { opacity: 1; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(10,30,70,.35) 0%, rgba(10,30,70,.6) 100%);
}
.hero-caption {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 24px;
}
.hero-caption h2 { font-size: 36px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.hero-caption p  { font-size: 16px; margin-top: 10px; opacity: .88; max-width: 640px; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: none; cursor: pointer; transition: background .2s;
}
.hero-dot.active { background: #fff; }

@media (max-width: 768px) {
  .hero { height: 280px; }
  .hero-caption h2 { font-size: 22px; }
}

/* ═══════════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--blue-mid) 100%);
  color: #fff; padding: 36px 0; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 20px 20px; pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero h1 {
  font-size: 26px; font-weight: 700; margin-bottom: 8px;
  animation: pageHeroIn .6s ease both;
}
.breadcrumb {
  font-size: 13px; opacity: .8;
  animation: pageHeroIn .6s ease .12s both;
}
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }

@keyframes pageHeroIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   SECTION TITLES
═══════════════════════════════════════════════ */
.section-title {
  text-align: center; font-size: 24px; font-weight: 700;
  color: var(--primary); margin-bottom: 40px;
}
.section-title::after {
  content: ''; display: block; width: 52px; height: 3px;
  background: var(--blue); border-radius: 2px; margin: 10px auto 0;
}
.section-title.light { color: #fff; }
.section-title.light::after { background: rgba(255,255,255,.5); }

/* ═══════════════════════════════════════════════
   ICON CARDS (project / media overview)
═══════════════════════════════════════════════ */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.icon-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 20px;
  text-align: center; color: var(--text-ink);
  transition: box-shadow .18s, transform .18s; text-decoration: none;
}
.icon-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.icon-circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--blue-bg); display: flex; align-items: center;
  justify-content: center; margin: 0 auto 18px;
}
.icon-circle img { width: 42px; height: 42px; object-fit: contain; }
.icon-card h4 { font-size: 14.5px; font-weight: 700; color: var(--primary); line-height: 1.5; margin-bottom: 10px; }
.icon-card-desc { font-size: 12.5px; color: var(--text-light); line-height: 1.7; margin-bottom: 18px; }
.btn-round {
  display: inline-block; padding: 7px 24px;
  background: var(--blue); color: #fff !important;
  border-radius: 24px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.btn-round:hover { background: var(--blue-hover); }

@media (max-width: 900px) { .icon-grid { grid-template-columns: repeat(2, 1fr); } }

/* Compact variant — used at top of media listing pages */
.icon-grid-media { margin-bottom: 0; }
.media-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.media-panel-label {
  font-size: 12px; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.icon-card-sm { padding: 20px 14px; }
.icon-card-img-sm { width: 56px; height: 56px; margin-bottom: 10px; }
.icon-card-sm h4 { margin-bottom: 0; font-size: 13.5px; }
.icon-card-active {
  border-color: var(--primary);
  background: #fdf5f4;
  box-shadow: var(--shadow-sm);
}
.icon-card-active h4 { color: var(--primary); }

/* ═══════════════════════════════════════════════
   NEWS SECTION (homepage + news page)
═══════════════════════════════════════════════ */
.news-bg { background: var(--primary); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
  text-decoration: none; color: var(--text-ink);
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

/* ── FIX 1: รูปเต็มกรอบ ── */
.news-card .thumb {
  height: 260px; overflow: hidden; background: var(--blue-bg);
  display: flex; align-items: center; justify-content: center;
}
.news-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;        /* เต็มกรอบ ไม่เหลือขอบ */
  display: block;
  transition: transform .35s ease;
}
.news-card:hover .thumb img { transform: scale(1.04); }
.news-card .thumb svg { width: 48px; height: 48px; stroke: var(--blue); opacity: .4; }

.news-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-badge {
  display: inline-block; padding: 3px 11px;
  background: var(--blue-bg); color: var(--primary);
  font-size: 11.5px; font-weight: 600; border-radius: 12px; width: fit-content;
}
.news-date { font-size: 12.5px; color: var(--text-light); }
.news-card h5 { font-size: 15px; font-weight: 600; line-height: 1.6; flex: 1; }
.news-more { font-size: 13.5px; font-weight: 600; color: var(--blue); }
.news-card:hover .news-more { color: var(--blue-hover); }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-tab {
  padding: 8px 20px; border: 1.5px solid var(--primary); border-radius: 24px;
  background: transparent; color: var(--primary);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.filter-tab:hover, .filter-tab.active { background: var(--primary); color: #fff; }

/* "No news" empty state */
.empty-state { text-align: center; padding: 48px; color: var(--text-light); }

/* Loading spinner */
.loading-spin {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-light); justify-content: center; padding: 48px;
}
.loading-spin::before {
  content: ''; width: 22px; height: 22px; border: 3px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   MEDIA TABS (media sub-pages)
═══════════════════════════════════════════════ */
.media-tabs {
  display: flex; gap: 0; margin-bottom: 32px;
  border-bottom: 2px solid var(--border); flex-wrap: wrap;
}
.media-tab-link {
  padding: 10px 22px; font-size: 14px; font-weight: 500;
  color: var(--text-light); text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.media-tab-link:hover { color: var(--primary); }
.media-tab-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ═══════════════════════════════════════════════
   DOCUMENT LIST (media/document)
═══════════════════════════════════════════════ */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-item {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .15s, border-color .15s;
}
.doc-item:hover { box-shadow: var(--shadow-sm); border-color: #e0ac52; }
.doc-icon {
  width: 48px; height: 48px; background: var(--blue-bg);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.doc-icon img { width: 28px; height: 28px; object-fit: contain; }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.doc-meta  { font-size: 12.5px; color: var(--text-light); }
.doc-dl {
  padding: 8px 20px; background: var(--blue); color: #fff;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  flex-shrink: 0; transition: background .15s;
}
.doc-dl:hover { background: var(--blue-hover); }

/* ═══════════════════════════════════════════════
   NEWS DETAIL
═══════════════════════════════════════════════ */
.article-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.article-wrap h1 { font-size: 22px; font-weight: 700; line-height: 1.55; color: var(--primary); margin-bottom: 24px; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.article-content { font-size: 15px; line-height: 1.85; }
.article-content img { max-width: 100%; border-radius: var(--radius); display: block; margin: 20px auto; }
.article-content p  { margin-bottom: 1rem; }
.article-content h2, .article-content h3 { color: var(--primary); margin: 1.5rem 0 .75rem; }
.article-content a  { color: var(--blue); text-decoration: underline; }

/* Quill alignment classes — ต้องมีไว้ ไม่งั้นการจัดซ้าย/กลาง/ขวาที่ตั้งค่าใน admin จะไม่แสดงผลบนหน้าเว็บจริง */
.article-content .ql-align-center { text-align: center; }
.article-content .ql-align-right  { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }
.article-content .ql-align-left   { text-align: left; }
.article-content .ql-indent-1 { padding-left: 3em; }
.article-content .ql-indent-2 { padding-left: 6em; }
.article-content .ql-indent-3 { padding-left: 9em; }
.article-content .ql-indent-4 { padding-left: 12em; }
.article-content .ql-size-small  { font-size: .75em; }
.article-content .ql-size-large  { font-size: 1.5em; }
.article-content .ql-size-huge   { font-size: 2.5em; }
.article-content sub { vertical-align: sub; font-size: smaller; }
.article-content sup { vertical-align: super; font-size: smaller; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-light); font-size: 14px; margin-bottom: 24px;
  transition: color .15s;
}
.back-link:hover { color: var(--primary); }
@media (max-width: 640px) { .article-wrap { padding: 20px; } }

/* ═══════════════════════════════════════════════
   CONTACT PAGE
═══════════════════════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
.contact-grid-v2 { grid-template-columns: 1.05fr 1fr; }
.info-box, .form-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.info-box h3, .form-box h3 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.info-row { display: flex; gap: 12px; margin-bottom: 14px; font-size: 14px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-ink); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  transition: border-color .15s;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(118,38,41,.12);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.btn-submit {
  padding: 12px 30px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.btn-submit:hover { background: var(--blue-hover); }

/* Submit row: button + social icons side by side */
.form-submit-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.form-submit-row .social-icons { display: flex; gap: 10px; }
.form-submit-row .social-ic {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform .15s;
}
.form-submit-row .social-ic:hover { transform: translateY(-3px); }
.form-submit-row .social-ic img { width: 100%; height: 100%; object-fit: contain; }

/* Info box — left-aligned contact channel text */
.info-box-left { text-align: left; }
.info-left-text p {
  font-size: 14px; line-height: 2; color: var(--text-ink);
  text-align: left; margin-bottom: 2px;
}
.info-left-text p strong { color: var(--primary); font-size: 15px; }
.map-box {
  margin-top: 20px; height: 200px;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text-light); font-size: 15px; font-weight: 600;
}
.map-box-embed {
  border: 1px solid var(--border); border-style: solid;
  overflow: hidden; padding: 0; height: 260px;
  box-shadow: var(--shadow-sm);
}
.map-link {
  display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600;
  color: var(--blue);
}
.map-link:hover { text-decoration: underline; }

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

/* ═══════════════════════════════════════════════
   PROJECT DETAIL TABS
═══════════════════════════════════════════════ */
.project-sidebar { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.sidebar-menu { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 769px) {
  .sidebar-menu { position: sticky; top: 140px; max-height: calc(100vh - 160px); overflow-y: auto; }
}
.sidebar-menu-head {
  background: var(--primary); color: #fff;
  padding: 16px 20px; font-size: 14px; font-weight: 700;
  border-bottom: 3px solid var(--primary-dark);
}
.sidebar-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; font-size: 14px;
  border-bottom: 1px solid var(--border); color: var(--text-ink);
  transition: all .15s; line-height: 1.4;
}
.sidebar-menu a:last-child { border-bottom: none; }
.sidebar-menu a:hover, .sidebar-menu a.active {
  background: var(--primary); color: #fff;
  padding-left: 26px;
}
.sm-ico { width: 18px; height: 18px; flex-shrink: 0; }
.content-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.content-panel h2 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
@media (max-width: 768px) { .project-sidebar { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  background: var(--primary-dark); color: rgba(255,255,255,.82);
  padding: 52px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-contact-title { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.footer-contact p { font-size: 13.5px; line-height: 1.9; }
.companies-label { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.companies-grid { display: flex; flex-direction: column; gap: 10px; }
.company-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07); border-radius: var(--radius); padding: 8px 12px;
}
.company-item img { height: 26px; width: auto; flex-shrink: 0; }
.company-item span { font-size: 12px; color: rgba(255,255,255,.72); line-height: 1.4; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; font-size: 13px; color: rgba(255,255,255,.45); flex-wrap: wrap; gap: 12px;
}
.visitor-counter { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.6); font-size: 13.5px; }
.counter-digits { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ═══════════════════════════════════════════════
   HERO — Modern Banner (updated)
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: var(--primary-dark);
}
@media (max-width: 768px) { .hero { height: 360px; } }

/* Background image with Ken Burns zoom */
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 45%;
  animation: kenBurns 16s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenBurns {
  from { transform: scale(1) translate(0,0); }
  to   { transform: scale(1.07) translate(-1.5%,0.5%); }
}

/* Left-to-right gradient overlay */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(35,10,12,.92) 0%,
    rgba(60,18,20,.82) 30%,
    rgba(90,28,31,.55) 52%,
    rgba(60,18,20,.15) 70%,
    rgba(0,0,0,.05) 100%
  );
}

/* Decorative vertical lines (railway track aesthetic) */
.hero-deco {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.deco-line {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(147,197,253,.25) 30%, rgba(147,197,253,.15) 70%, transparent);
  animation: lineFade 4s ease-in-out infinite;
}
.deco-line:nth-child(2) { animation-delay: .8s; }
@keyframes lineFade {
  0%,100% { opacity:.4; } 50% { opacity:1; }
}

/* Content block */
.hero-body {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center;
  padding-bottom: 50px;
}

.hero-inner { max-width: 600px; }

/* Status badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(37,99,235,.2);
  border: 1px solid rgba(224,172,82,.4);
  padding: 5px 16px; border-radius: 24px;
  font-size: 12.5px; color: #e0ac52;
  margin-bottom: 20px;
  animation: fadeUp .6s ease both;
  animation-delay: .2s;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d9a441;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 0 0 rgba(96,165,250,.6); }
  50% { box-shadow: 0 0 0 7px rgba(96,165,250,0); }
}

/* Logo + title row */
.hero-logo-row {
  display: flex; align-items: flex-start; gap: 20px;
  margin-bottom: 16px;
}

/* Logo frame */
.hero-logo-frame {
  background: rgba(255,255,255,.93);
  border-radius: 12px; padding: 6px;
  width: 80px; height: 80px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  animation: fadeUp .6s ease both;
  animation-delay: .35s;
}
.hero-logo-frame img { width: 66px; height: 66px; object-fit: contain; }

@media (max-width: 768px) {
  .hero-logo-frame { width: 58px; height: 58px; }
  .hero-logo-frame img { width: 46px; height: 46px; }
}

/* Titles */
.hero-titles {
  animation: slideLeft .7s ease both;
  animation-delay: .45s;
}
.hero-sup {
  font-size: 12px; color: rgba(255,255,255,.72);
  margin-bottom: 6px; letter-spacing: .03em; line-height: 1.5;
}
.hero-h1 {
  font-size: 26px; font-weight: 700; color: #fff;
  line-height: 1.4; margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero-h1-accent {
  display: block;
  font-size: 32px; color: #e0ac52;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero-logo-row { gap: 14px; }
  .hero-h1 { font-size: 18px; }
  .hero-h1-accent { font-size: 22px; }
}

/* Animated underline */
.hero-accent-bar {
  height: 3px; border-radius: 2px;
  background: linear-gradient(to right, #c9922b, #e0ac52, transparent);
  margin: 14px 0;
  animation: growBar .8s ease both;
  animation-delay: .85s;
}
@keyframes growBar {
  from { width: 0; opacity: 0; }
  to   { width: 200px; opacity: 1; }
}

.hero-desc {
  font-size: 13px; color: rgba(255,255,255,.68);
  margin-bottom: 24px;
  animation: slideLeft .7s ease both;
  animation-delay: 1s;
}

/* CTA button */
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 11px 26px; border-radius: 28px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37,99,235,.45);
  transition: background .18s, transform .18s, box-shadow .18s;
  animation: fadeUp .6s ease both;
  animation-delay: 1.1s;
}
.hero-cta:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,99,235,.55);
}

/* Bottom wave */
.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0;
  z-index: 3; line-height: 0;
}
.hero-wave svg { width: 100%; height: 65px; display: block; }

/* Scroll bounce */
.hero-scroll {
  position: absolute; bottom: 80px; right: 36px;
  z-index: 3; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.scroll-line {
  width: 1.5px; height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,.0), rgba(255,255,255,.5));
  animation: scrollGrow 1.8s ease-in-out infinite;
}
.scroll-dot-b {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.6);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollGrow {
  0%,100% { transform: scaleY(0.5); opacity:.3; }
  50% { transform: scaleY(1); opacity:.8; }
}
@keyframes scrollBounce {
  0%,100% { transform: translateY(-4px); opacity:.4; }
  50% { transform: translateY(4px); opacity:.9; }
}

/* Nav logo update — real image */
.nav-logo-img-wrap {
  background: rgba(255,255,255,.92); border-radius: 8px;
  padding: 4px; width: 56px; height: 56px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-img { width: 46px; height: 46px; object-fit: contain; }

@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes slideLeft {
  from { opacity:0; transform:translateX(-30px); }
  to   { opacity:1; transform:translateX(0); }
}

/* ═══════════════════════════════════════════════
   OVERRIDES — nav-top white + hero text rebalance
═══════════════════════════════════════════════ */

/* 1. nav-top → พื้นหลังขาว */
.nav-top {
  background: #fff !important;
  border-bottom: 2px solid var(--blue-bg);
  padding: 10px 0;
}

/* ข้อความใน nav-top ปรับสีให้เหมาะกับพื้นขาว */
.nav-top .nav-logo            { color: var(--primary) !important; }
.nav-top .nav-logo-text .sub  { opacity: 1 !important; color: var(--text-light) !important; font-size: 12.5px !important; }
.nav-top .nav-logo-text .main { font-size: 17px !important; font-weight: 600 !important; color: var(--primary) !important; }
.nav-top .nav-logo-text em    { color: var(--blue) !important; font-style: normal; }

/* 2. logo ใหญ่ขึ้น — ลบกรอบขาว (ไม่จำเป็นบนพื้นขาว) */
.nav-logo-img-wrap {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 80px !important;
  height: 80px !important;
}
.nav-logo-img {
  width: 80px !important;
  height: 80px !important;
}

/* 3. hero — ลบ logo ออก → ปรับตัวหนังสือให้สมส่วน */
.hero-logo-frame  { display: none !important; }   /* ซ่อน logo frame ใน hero */
.hero-logo-row    { display: block !important; margin-bottom: 18px !important; }  /* ไม่ flex แล้ว */

.hero-inner       { max-width: 700px; }           /* ขยาย content กว้างขึ้น */

.hero-sup {
  font-size: 14px !important;
  color: rgba(255,255,255,.78) !important;
  margin-bottom: 10px !important;
  letter-spacing: .025em;
}
.hero-h1 {
  font-size: 34px !important;
  line-height: 1.35 !important;
  margin-bottom: 0 !important;
}
.hero-h1-accent {
  font-size: 44px !important;
  margin-top: 4px !important;
}
.hero-desc        { font-size: 14px !important; color: rgba(255,255,255,.72) !important; }
.hero-accent-bar  { margin: 16px 0 !important; }

@media (max-width: 768px) {
  .nav-logo-img-wrap { width: 60px !important; height: 60px !important; }
  .nav-logo-img      { width: 60px !important; height: 60px !important; }
  .nav-top .nav-logo-text .main { font-size: 13px !important; }
  .hero-h1           { font-size: 22px !important; }
  .hero-h1-accent    { font-size: 28px !important; }
}

/* ═══════════════════════════════════════════════
   V4 — icon-card real images + nav em accent
═══════════════════════════════════════════════ */

/* Real image in icon cards (no blue circle bg needed) */
.icon-card-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
}

/* Bigger logo in nav-top */
.nav-logo-img-wrap {
  width: 96px !important;
  height: 96px !important;
}
.nav-logo-img {
  width: 96px !important;
  height: 96px !important;
}

/* nav-top main text — "ช่วงชุมพร-ระนอง" เด่นขึ้น */
.nav-top .nav-logo-text .main {
  font-size: 18px !important;
  line-height: 1.35;
}
.nav-top .nav-logo-text .main em {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  font-style: normal;
}
.nav-top .nav-logo-text .sub {
  font-size: 12px !important;
  color: var(--text-light) !important;
}

/* ═══════════════════════════════════════════════
   V5 — News BG modern pattern + dept-contact
═══════════════════════════════════════════════ */

/* ── News section — graphic background ─────── */
.news-bg {
  background: linear-gradient(160deg, #fde2df 0%, var(--pink-bg) 45%, #f6c6c1 100%) !important;
  position: relative;
  overflow: hidden;
}
.nd-wave { position: absolute; left: 0; right: 0; width: 100%; height: 48px; line-height: 0; z-index: 1; }
.nd-wave svg { width: 100%; height: 100%; display: block; }
.nd-wave-top { top: 0; }
.nd-wave-bottom { bottom: 0; transform: scaleY(-1); }

/* Dot matrix overlay */
.news-bg::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(circle, rgba(118,38,41,.06) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Keep content above patterns */
.news-bg .container { position: relative; z-index: 2; }

/* Rotating ring decorations */
.nd-ring {
  position: absolute; border-radius: 50%; z-index: 1;
  border: 1.5px solid rgba(118,38,41,.08);
  pointer-events: none;
}
.nd-ring-1 { width: 500px; height: 500px; right: -180px; top: -180px;
  animation: ndSpin 45s linear infinite; }
.nd-ring-2 { width: 320px; height: 320px; right: -100px; top: -100px;
  animation: ndSpin 30s linear infinite reverse;
  border-color: rgba(118,38,41,.06); }
.nd-ring-3 { width: 180px; height: 180px; left: -60px; bottom: -60px;
  animation: ndSpin 35s linear infinite; }
.nd-ring-4 { width: 100px; height: 100px; left: -20px; bottom: -20px;
  animation: ndSpin 20s linear infinite reverse;
  border-color: rgba(118,38,41,.12); }
/* Diagonal accent lines */
.nd-line {
  position: absolute; z-index: 1; pointer-events: none;
  height: 1px; background: linear-gradient(to right, transparent, rgba(118,38,41,.15), transparent);
  transform-origin: center;
}
.nd-line-1 { width: 340px; top: 28%;  right: 20%;  transform: rotate(-25deg); }
.nd-line-2 { width: 220px; top: 60%;  right: 12%;  transform: rotate(-25deg); opacity:.6; }
.nd-line-3 { width: 160px; bottom: 18%; left: 8%;  transform: rotate(20deg); }

/* Glowing circle top-right */
.nd-glow {
  position: absolute; z-index: 1; pointer-events: none;
  width: 260px; height: 260px; border-radius: 50%;
  right: -60px; top: -40px;
  background: radial-gradient(circle, rgba(118,38,41,.10) 0%, transparent 70%);
}

@keyframes ndSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Dept contact section ────────────────────── */
.dept-contact {
  background: linear-gradient(160deg, #0c2045 0%, #0d2d5e 60%, #102060 100%);
  padding: 52px 0;
  position: relative;
  overflow: hidden;
}
.dept-contact::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.dept-contact .container { position: relative; z-index: 1; }

.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.dept-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: left;
}

.dept-pill {
  display: inline-block;
  padding: 9px 32px;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 32px;
  font-size: 15px; font-weight: 700; color: #fff;
  margin-bottom: 24px;
  letter-spacing: .025em;
  width: 100%; text-align: center;
  transition: border-color .2s;
}
.dept-card:hover .dept-pill {
  border-color: #e0ac52;
}

.dept-body { width: 100%; }

.dept-name {
  font-size: 15px; font-weight: 600; color: #fff;
  margin-bottom: 14px;
}

.dept-info-row {
  display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap;
  font-size: 13.5px; color: rgba(255,255,255,.82);
  margin-bottom: 8px; line-height: 1.6;
}

.dept-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0; font-size: 14px;
}

.dept-sep {
  width: 1px; height: 14px; background: rgba(255,255,255,.25);
  flex-shrink: 0; margin: 0 8px;
}

@media (max-width: 768px) {
  .dept-grid { grid-template-columns: 1fr; gap: 24px; }
  .dept-pill  { font-size: 14px; padding: 8px 24px; }
}

/* ═══════════════════════════════════════════════
   V6 — Font global + Scroll-to-top button
═══════════════════════════════════════════════ */

/* Force IBM Plex Sans Thai on every element */
html, body {
  font-family: 'IBM Plex Sans Thai', sans-serif;
}
*, *::before, *::after {
  font-family: 'IBM Plex Sans Thai', sans-serif !important;
}

/* ── #ast-scroll-top ── */
#ast-scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .28s ease, visibility .28s ease,
              transform .28s ease, background .18s;

  box-shadow: 0 4px 18px rgba(37,99,235,.45);
}

#ast-scroll-top.ast-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#ast-scroll-top:hover {
  background: var(--blue-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37,99,235,.55);
}

#ast-scroll-top:active {
  transform: translateY(0) scale(.97);
}

/* Arrow icon via border trick */
#ast-scroll-top::before {
  content: '';
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2.5px solid #fff;
  border-left: 2.5px solid #fff;
  transform: rotate(45deg) translate(2px, -2px);
}

@media (max-width: 768px) {
  #ast-scroll-top { bottom: 20px; right: 16px; width: 42px; height: 42px; }
}

/* ═══════════════════════════════════════════════
   V7 — New Footer (dept + flip-card companies)
═══════════════════════════════════════════════ */

/* Override old footer */
footer.site-footer {
  background: linear-gradient(160deg, #4a1619 0%, #5c1d20 55%, #6e2226 100%);
  color: rgba(255,255,255,.82);
  padding: 0;
}
/* Dept row */
.ftr-dept {
  padding: 44px 0 36px;
  position: relative;
}
.ftr-dept::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.ftr-dept .container { position: relative; z-index: 1; }

.ftr-dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* Dept card */
.ftr-dept-card {
  transition: transform .2s;
}
.ftr-dept-card:hover { transform: translateY(-3px); }

.ftr-dept-pill {
  display: block;
  padding: 9px 20px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 32px;
  font-size: 13.5px; font-weight: 700; color: #fff;
  text-align: center;
  margin-bottom: 20px;
  transition: border-color .2s, background .2s;
}
.ftr-dept-card:hover .ftr-dept-pill {
  border-color: #e0ac52;
  background: rgba(147,197,253,.08);
}

.ftr-dept-name {
  font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 10px;
}
.ftr-dept-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,.78); margin-bottom: 6px; line-height: 1.5;
}
.fdi { font-size: 12px; flex-shrink: 0; }
.fds { width: 1px; height: 11px; background: rgba(255,255,255,.22); flex-shrink: 0; margin: 0 5px; }

/* Divider */
.ftr-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.1);
  margin: 0;
}

/* Companies section */
.ftr-cos { padding: 0 0 28px; }

/* ── CTA row ── */
.ftr-cta {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 18px;
  padding: 56px 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.ftr-cta-text h3 { color: #fff; font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.ftr-cta-text p  { color: rgba(255,255,255,.75); font-size: 13.5px; }
.ftr-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 24px;
  color: #fff; font-size: 13.5px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-solid {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 24px;
  background: #fff; color: var(--primary); font-size: 13.5px; font-weight: 700;
  transition: background .15s, transform .15s;
}
.btn-solid:hover { background: var(--pink-bg); transform: translateY(-1px); }

/* ── Row: contact / companies / social ── */
.ftr-cos-row {
  display: grid; grid-template-columns: 160px 1fr 200px;
  gap: 36px; align-items: center; padding: 34px 0;
}
.ftr-cos-contact { display: flex; align-items: center; justify-content: center; height: 100%; }
.btn-outline-sm {
  display: inline-block; padding: 10px 20px; border: 1.5px solid rgba(255,255,255,.45);
  border-radius: 22px; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn-outline-sm:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.ftr-cos-title {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* Flat logo grid (real company logos) — compact, elegant */
.co-flat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.co-flat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0;
}
.co-flat-logo {
  flex-shrink: 0; width: 68px; height: 42px;
  display: flex; align-items: center; justify-content: center;
}
.co-flat-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-flat-name { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.85); }
.co-flat-grid-5 > .co-flat-item:last-child {
  grid-column: 1 / -1;
}

/* Social icons + visitor count column */
.ftr-cos-social { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.social-icons { display: flex; gap: 10px; }
.social-ic {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.social-ic:hover { transform: translateY(-3px); }
.social-ic img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .ftr-cos-row { grid-template-columns: 1fr; gap: 24px; }
  .ftr-cos-contact { order: 3; }
  .ftr-cos-social { align-items: flex-start; order: 2; }
  .co-flat-grid { grid-template-columns: 1fr; }
  .ftr-cta { padding: 40px 0; }
}

/* 2 × 2 grid */
.co-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
/* 5-company variant: last card spans both columns, centered */
.co-grid-5 > .co-card:last-child {
  grid-column: 1 / -1;
  max-width: calc(50% - 7px);
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 600px) {
  .co-grid-5 > .co-card:last-child { max-width: 100%; }
}

/* Flip card wrapper */
.co-card {
  perspective: 900px;
  height: 112px;
  cursor: default;
}
/* Inner (rotates) */
.co-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .52s cubic-bezier(.4, 0, .2, 1);
  transform-style: preserve-3d;
}
.co-card:hover .co-inner { transform: rotateY(180deg); }

/* Both faces */
.co-front, .co-back {
  position: absolute; inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}
/* Front face */
.co-front {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  transition: background .2s;
}
/* Back face */
.co-back {
  background: rgba(30,64,175,.28);
  border: 1px solid rgba(147,197,253,.28);
  transform: rotateY(180deg);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

/* Logo box */
.co-logo-box {
  width: 72px; height: 72px;
  background: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px; font-weight: 800; letter-spacing: -.5px;
  overflow: hidden;
}
/* Short name on front */
.co-short-name {
  font-size: 12px; font-weight: 600; color: #fff; line-height: 1.45;
  flex: 1;
}
.co-hint {
  font-size: 9.5px; color: rgba(255,255,255,.45); margin-top: 4px;
  font-style: italic;
}

/* Back face content */
.co-full-name {
  font-size: 11px; font-weight: 700; color: #fff; line-height: 1.4;
}
.co-addr {
  font-size: 10.5px; color: rgba(255,255,255,.72); line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.co-tel {
  font-size: 11px; color: #e0ac52; font-weight: 600; margin-top: 2px;
}

@media (max-width: 768px) {
  .ftr-dept-grid { grid-template-columns: 1fr; gap: 20px; }
  .co-grid       { grid-template-columns: 1fr; }
  .co-card       { height: auto; }
  .co-inner      { transform: none !important; }
  .co-front      { display: none; }
  .co-back       {
    position: static; transform: none;
    flex-direction: row; gap: 12px;
    align-items: flex-start;
    padding: 12px;
  }
}

/* Footer bottom bar */
.ftr-bottom {
  background: #000;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
}
.ftr-bottom .container {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: #fff;
  text-align: center;
}
.ftr-visitor { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.7); font-size: 12.5px; }
.ftr-digits {
  display: inline-flex; align-items: center;
  font-family: 'Courier New', monospace; font-size: 15px; font-weight: 700;
  color: #ffd9a0; letter-spacing: 4px; font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 6px 14px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.45);
}

/* ═══════════════════════════════════════════════
   V9 — Company cards: simple hover (no flip)
═══════════════════════════════════════════════ */
/* Reset flip card */
.co-card {
  perspective: none !important;
  height: auto !important;
  cursor: default;
  display: flex !important;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  transition: background .22s, transform .22s, border-color .22s, box-shadow .22s;
}
.co-card:hover {
  background: rgba(255,255,255,.13) !important;
  transform: translateY(-4px) !important;
  border-color: rgba(224,172,82,.4) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}
/* Hide flip wrappers — show direct content */
.co-inner  { display: contents !important; }
.co-front  { display: none !important; }
.co-back   {
  display: flex !important;
  position: static !important;
  transform: none !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  flex: 1 !important;
  min-width: 0 !important;
  align-items: flex-start !important;
  gap: 12px !important;
}
.co-logo-sm {
  width: 60px !important;
  height: 60px !important;
  font-size: 15px !important;
  flex-shrink: 0;
}
.co-full-name { font-size: 12.5px !important; margin-bottom: 4px !important; }
.co-addr      { font-size: 11.5px !important; -webkit-line-clamp: 3 !important; }
.co-tel       { font-size: 12px !important; }
/* hint text no longer needed */
.co-hint { display: none !important; }

/* ═══════════════════════════════════════════════
   V11 — Project name: large bold em (ช่วงทับปุด-กระบี่)
═══════════════════════════════════════════════ */
.nav-top .nav-logo-text .sub {
  font-size: 12px !important;
  color: #555 !important;
  font-weight: 400 !important;
  letter-spacing: .01em;
}
.nav-top .nav-logo-text .main {
  font-size: 17px !important;
  font-weight: 500 !important;
  color: var(--primary) !important;
  line-height: 1.3;
}
/* ช่วงทับปุด-กระบี่ — เด่น ใหญ่ หนา ตามรูป */
.nav-top .nav-logo-text .main em {
  font-size: 30px !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  font-style: normal;
  display: inline;
  letter-spacing: -.01em;
}

/* ═══ V12 — Nav font size adjustments ═══ */
.nav-top .nav-logo-text .sub        { font-size: 15px !important; }
.nav-top .nav-logo-text .main       { font-size: 30px !important; }
.nav-top .nav-logo-text .main em    { font-size: 35px !important; }

/* ═══ V13 — Company card: logo + address on same row ═══ */
.co-back {
  flex-direction: row !important;
  align-items: flex-start !important;
}
.co-logo-sm {
  flex-shrink: 0;
}

/* ═══ V14 — Logo bigger + font resize + left spacing ═══ */

/* ขยาย logo */
.nav-logo-img-wrap {
  width: 110px !important;
  height: 110px !important;
}
.nav-logo-img {
  width: 110px !important;
  height: 110px !important;
}

/* เพิ่ม padding ซ้ายให้ nav-top และให้ชิดซ้าย (ไม่ centered เหมือนส่วนอื่น) */
.nav-top .container {
  margin: 0 !important;
  max-width: 100% !important;
  padding-left: 80px !important;
}

/* font sizes — ทุกบรรทัดตัวหนังสือสีดำ */
.nav-top .nav-logo-text .sub  { font-size: 14px !important; font-weight: 600 !important; color: #1e293b !important; opacity: 1 !important; }
.nav-top .nav-logo-text .main { font-size: 21px !important; font-weight: 700 !important; line-height: 1.45 !important; color: #1e293b !important; }
.nav-top .nav-logo-text .main em {
  font-size: 21px !important;
  font-weight: 700 !important;
  font-style: normal;
  color: #1e293b !important;
}
.nav-top .nav-logo-text .sub2 { font-size: 14px !important; margin-top: 6px !important; color: #1e293b !important; }

/* ระยะห่าง logo กับ text */
.nav-logo { gap: 34px !important; }

@media (max-width: 900px) {
  .nav-top .container { padding-left: 16px !important; }
  .nav-logo-img-wrap  { width: 72px !important; height: 72px !important; }
  .nav-logo-img       { width: 72px !important; height: 72px !important; }
  .nav-top .nav-logo-text .main    { font-size: 18px !important; }
  .nav-top .nav-logo-text .main em { font-size: 18px !important; }
  .nav-top .nav-logo-text .sub     { font-size: 12px !important; }
  .nav-top .nav-logo-text .sub2    { font-size: 11px !important; }
}

/* ═══ V15 — Project detail content styles ═══ */

/* Section header bar */
.proj-section-header {
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.proj-section-header::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: rgba(255,255,255,.6);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Content row: text + map */
.proj-content-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
.proj-content-row-full { grid-template-columns: 1fr; }

/* Full-width infographic image block */
.proj-fullimg { margin: 24px 0; }
.proj-fullimg img {
  width: 100%; display: block; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* Text block */
.proj-text p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-ink);
  margin-bottom: 16px;
}
.proj-text p:last-child { margin-bottom: 0; }

/* Highlight paragraph */
.proj-highlight {
  background: #f0f7ff;
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px !important;
  line-height: 1.9;
}

/* Map block */
.proj-map {
  position: sticky;
  top: 90px;
}
.proj-map img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: block;
}
.proj-map-caption {
  font-size: 11.5px;
  color: var(--text-light);
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}

/* Numbered list */
.proj-list {
  padding-left: 20px;
  margin-top: 12px;
}
.proj-list li {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-ink);
  margin-bottom: 10px;
  padding-left: 6px;
}
.proj-list li::marker {
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 768px) {
  .proj-content-row { grid-template-columns: 1fr; }
  .proj-map { position: static; }
}

/* ═══ V16 — Project sections: table, scope, benefit ═══ */

/* DataTable toolbar */
.dt-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.dt-info { font-size: 13px; color: var(--text-light); font-weight: 500; }
.dt-search { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); }
.dt-search input {
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
  outline: none; transition: border-color .15s;
}
.dt-search input:focus { border-color: var(--blue); }
.dt-count { font-size: 12.5px; color: var(--text-light); margin-top: 10px; }

/* Table */
.proj-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.proj-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.proj-table thead tr { background: linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 100%); }
.proj-table thead th {
  padding: 11px 14px; color: #fff; font-weight: 600;
  text-align: left; font-size: 13px; white-space: nowrap;
}
.proj-table thead th:first-child { text-align: center; width: 60px; }
.proj-table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.proj-table tbody tr:hover { background: var(--blue-light); }
.proj-table tbody tr:last-child { border-bottom: none; }
.proj-table tbody td { padding: 10px 14px; color: var(--text-ink); vertical-align: top; }
.proj-table tbody td:first-child { text-align: center; color: var(--text-light); font-weight: 600; }
.proj-table tbody td:nth-child(2):not(:empty) { font-weight: 600; color: var(--primary); }
.proj-table tbody td:nth-child(3):not(:empty) { font-weight: 500; }

/* Scope cards */
.scope-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px;
}
.scope-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; gap: 12px; align-items: flex-start;
  transition: box-shadow .18s, border-color .18s;
}
.scope-card:hover { box-shadow: var(--shadow-sm); border-color: #e0ac52; }
.scope-card-icon { font-size: 24px; flex-shrink: 0; }
.scope-card-body h4 { font-size: 13.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.scope-card-body ul { padding-left: 16px; }
.scope-card-body li { font-size: 12.5px; color: var(--text-ink); line-height: 1.8; }
.scope-card-body li::marker { color: var(--blue); }

/* Benefit list */
.benefit-list { display: flex; flex-direction: column; gap: 14px; }
.benefit-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.benefit-item:hover {
  box-shadow: var(--shadow-sm); border-color: #e0ac52;
  transform: translateX(3px);
}
.benefit-num {
  font-size: 22px; font-weight: 800; color: var(--blue);
  opacity: .3; flex-shrink: 0; width: 36px; text-align: center;
  line-height: 1;
}
.benefit-body h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.benefit-body p  { font-size: 13.5px; line-height: 1.8; color: var(--text-ink); }

@media (max-width: 768px) {
  .scope-cards { grid-template-columns: 1fr; }
}

/* ═══ V17 — Table: province/amphoe cells + summary row ═══ */
.proj-table .cell-province:not(:empty) {
  font-weight: 700; color: var(--primary); white-space: nowrap;
}
.proj-table .cell-amphoe:not(:empty) {
  font-weight: 600; color: #1d4ed8; white-space: nowrap;
}
.proj-table .cell-num {
  text-align: center; color: #94a3b8;
  font-size: 12px; font-weight: 600; width: 48px;
}
.proj-table .summary-row td {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: #fff !important;
  font-weight: 700 !important;
  padding: 11px 14px;
  border: none;
}
.proj-table .summary-row td strong { color: #fff; }

/* ═══════════════════════════════════════════════
   HERO V2 — full-bleed photo + stats bar
   (style reference: highway-404 project site)
═══════════════════════════════════════════════ */
.hero-v2 {
  position: relative;
  overflow: hidden;
}
.hero-v2-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 55%;
  height: 560px;
  animation: heroBgIn 1.6s cubic-bezier(.16,.8,.3,1) both;
}
.hero-v2-overlay {
  position: absolute; top: 0; left: 0; right: 0; height: 560px;
  background: linear-gradient(100deg, rgba(30,9,10,.82) 0%, rgba(45,14,16,.62) 45%, rgba(45,14,16,.38) 100%);
}
.hero-v2-content {
  position: relative; z-index: 2;
  height: 560px; display: flex; align-items: center;
  padding-bottom: 60px;
}
.hero-v2-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 16px; border-radius: 24px;
  font-size: 12.5px; color: #fff;
  margin-bottom: 22px;
  animation: heroFadeUp .7s ease .15s both;
}
.hero-v2-h1 {
  font-size: 32px; font-weight: 800; color: #fff;
  line-height: 1.35; margin-bottom: 18px;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
  max-width: 820px;
  animation: heroFadeUp .7s ease .32s both;
}
.hero-v2-sg { color: #ff5252 !important; }
.hero-v2-accent {
  color: #f0c4c0;
  text-decoration: underline;
  text-decoration-color: rgba(240,196,192,.6);
  text-underline-offset: 8px;
}
.hero-v2-black-line {
  display: inline-block;
  color: #111 !important;
  font-size: 18px;
  font-weight: 700;
  margin-top: 12px;
  text-shadow: none;
  background: rgba(255,255,255,.88);
  padding: 5px 12px;
  border-radius: 6px;
  line-height: 1.5;
  animation: heroFadeUp .7s ease .5s both;
}
.hero-v2-btns { animation: heroFadeUp .7s ease .66s both; }

@keyframes heroBgIn {
  from { opacity: 0; transform: scale(1.09); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero content stays left-aligned to the browser edge, like the header */
.hero-v2-container {
  margin: 0 !important;
  max-width: 100% !important;
  padding-left: 48px !important;
}
@media (max-width: 900px) {
  .hero-v2-container { padding-left: 16px !important; }
  .hero-v2-black-line { font-size: 14px; }
}
.hero-v2-desc {
  font-size: 14.5px; color: rgba(255,255,255,.82);
  line-height: 1.8; max-width: 620px; margin-bottom: 28px;
}
.hero-v2-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-v2-btn-solid {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 13px 26px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  transition: background .18s, transform .18s;
}
.hero-v2-btn-solid:hover { background: var(--blue-hover); transform: translateY(-2px); }
.hero-v2-btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1.5px solid rgba(255,255,255,.5);
  padding: 13px 26px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  transition: background .18s, transform .18s;
}
.hero-v2-btn-outline:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }

/* Stats bar */
.hero-v2-stats {
  position: relative; z-index: 3;
  background: linear-gradient(90deg, var(--primary-dark) 0%, #2e0d0f 100%);
}
.hero-v2-stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.hero-v2-stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.hstat {
  text-align: center; padding: 20px 12px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.hstat:last-child { border-right: none; }
.hstat-num { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 6px; }
.hstat-lbl { font-size: 12px; color: rgba(255,255,255,.65); }

/* Clickable nav-bar variant */
.hstat-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none;
  transition: background .18s;
}
.hstat-link:hover { background: rgba(255,255,255,.08); }
.hstat-ico { width: 22px; height: 22px; stroke: #fff; flex-shrink: 0; }
.hstat-link .hstat-lbl { color: rgba(255,255,255,.85); font-weight: 600; transition: color .18s; }
.hstat-link:hover .hstat-lbl { color: #fff; }
.hstat-link .hstat-num { font-size: 20px; margin-bottom: -2px; }

@media (max-width: 900px) {
  .hero-v2-bg, .hero-v2-overlay, .hero-v2-content { height: 500px; }
  .hero-v2-h1 { font-size: 26px; }
  .hero-v2-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-v2-stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hstat:nth-child(3) { border-right: none; }
  .hstat { padding: 18px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .hstat-num { font-size: 20px; }
}
@media (max-width: 560px) {
  .hero-v2-bg, .hero-v2-overlay, .hero-v2-content { height: 460px; }
  .hero-v2-h1 { font-size: 21px; }
  .hero-v2-desc { font-size: 13px; }
  .hero-v2-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hstat:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.12); }
  .hstat:nth-child(3) { border-right: 1px solid rgba(255,255,255,.12); }
}

/* ═══════════════════════════════════════════════
   ROUTE BANDS — 3 stacked structure-type bands
═══════════════════════════════════════════════ */
.route-bands { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.route-band {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.route-band-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; color: #fff; font-size: 14.5px; font-weight: 700;
}
.route-band-1 { background: linear-gradient(90deg, var(--primary) 0%, var(--blue-mid) 100%); }
.route-band-2 { background: linear-gradient(90deg, #a06a1f 0%, #c9922b 100%); }
.route-band-3 { background: linear-gradient(90deg, var(--primary-dark) 0%, #5c1d20 100%); }
.route-band-num {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.22); flex-shrink: 0; font-size: 14px;
}
.route-band-body { background: #fff; padding: 14px; }
.route-band-desc { font-size: 13.5px; line-height: 1.8; color: var(--text-ink); margin-bottom: 14px; }
.route-band-body img { width: 100%; display: block; border-radius: 8px; }
.route-band-gallery { display: flex; flex-direction: column; gap: 14px; }
.route-band-gallery img { width: 100%; height: auto; border-radius: 8px; }

@media (max-width: 600px) {
  .route-band-head { font-size: 13px; padding: 12px 16px; }
}
