/* ============================================================
   style.css - First Techno (first-techno.co.th)
   โทนสีน้ำเงิน | Blue Theme
   ============================================================ */

/* ----- Google Fonts (Prompt + Sarabun) ----- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ----- CSS Variables ----- */
:root {
  /* Blue Palette */
  --blue-deep: #0B1F5B;
  --blue-mid: #1A3A8A;
  --blue-bright: #2E5BC7;
  --blue-light: #F0F4FF;
  --white: #FFFFFF;
  --dark: #333333;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;

  /* Semantic */
  --primary: var(--blue-bright);
  --primary-dark: var(--blue-mid);
  --primary-deep: var(--blue-deep);
  --primary-light: var(--blue-light);
  --text-primary: var(--dark);
  --text-on-dark: var(--white);
  --bg-light: var(--blue-light);
  --bg-white: var(--white);
  --border-color: var(--gray-300);

  /* Typography */
  --font-thai: 'Prompt', 'Sarabun', 'Tahoma', sans-serif;
  --font-body: 'Sarabun', 'Tahoma', sans-serif;
  --font-heading: 'Prompt', 'Sarabun', sans-serif;

  /* Spacing */
  --section-padding: 80px 0;
  --container-max: 90%;
  --container-narrow: 85%;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-blue: 0 4px 20px rgba(46,91,199,0.25);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-deep);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: min(90%, 1600px);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: min(85%, 1400px);
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- Grid System ----- */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ----- Flex Utilities ----- */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-column {
  flex-direction: column;
}

.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }

/* ----- Section Styles ----- */
.section {
  padding: var(--section-padding);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 15px;
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 15px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-bg-light {
  background-color: var(--bg-light);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 31, 91, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 20px rgba(11, 31, 91, 0.15);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 100%;
  padding: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 0;
  margin-left: 100px;   /* Desktop: โลโก้ห่างขอบ 100px ตามคอนเซปต์ */
}
/* มือถือ: หุบ margin ให้พอดีจอ (ไม่เลยจอ) */
@media (max-width: 992px) {
  .navbar-brand { margin-left: 0; }
}

.navbar-brand img {
  height: 45px;
  width: auto;
  display: block;
}

.navbar-brand:hover {
  color: var(--white);
  opacity: 0.9;
}

.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 10px;
  flex: 1;
  padding: 0 20px;
}

.navbar-menu a {
  color: rgba(255,255,255,0.85);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.navbar-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--blue-bright);
  border-radius: 2px;
}

/* เมนูหลักที่มี submenu — ตอน active ใช้เส้นใต้ฟ้าอ่อนๆ ไม่เด่นเกินไป */
.nav-dropdown.active-parent > a.dropdown-toggle {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav-dropdown.active-parent > a.dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--blue-bright);
  border-radius: 2px;
}

/* ── Nav Dropdown (Sub-menu) ── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown > a {
  padding-right: 6px;
  cursor: pointer;
}
/* ป้องกัน Bootstrap แทรกลูกศรซ้ำที่ .dropdown-toggle (เราใช้ fa-chevron-down เอง) */
.nav-dropdown > a.dropdown-toggle::after {
  display: none !important;
}
.nav-dropdown > a .fa-chevron-down {
  transition: transform 0.25s ease;
  display: inline-block;
}
.nav-dropdown:hover > a .fa-chevron-down,
.nav-dropdown.open > a .fa-chevron-down {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: block !important;
  background: linear-gradient(160deg, rgba(11,31,91,0.98), rgba(46,91,199,0.96));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 250px;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(11,31,91,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0s 0.28s;
  z-index: 1000;
  padding: 10px 0;
  border: 1px solid rgba(157,184,240,0.18);
  pointer-events: none;
  margin-top: 8px;
}
/* Triangle arrow on top of dropdown */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 28px;
  width: 12px;
  height: 12px;
  background: rgba(11,31,91,0.98);
  transform: rotate(45deg);
  border-left: 1px solid rgba(157,184,240,0.18);
  border-top: 1px solid rgba(157,184,240,0.18);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px) scale(1);
  pointer-events: all;
  transition-delay: 0s;
}
.dropdown-menu a {
  display: block !important;
  padding: 12px 26px !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  white-space: nowrap;
  color: rgba(255,255,255,0.82) !important;
  position: relative !important;
  border: none !important;
  margin: 0 !important;
  transition: all 0.22s ease;
  border-left: 3px solid transparent;
}
.dropdown-menu a::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 12px;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.22s ease;
  color: var(--blue-bright);
}
.dropdown-menu a:hover,
.dropdown-menu a.active {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border-left-color: var(--gold, #FFD24D);
  padding-left: 34px !important;
}
.dropdown-menu a:hover::before,
.dropdown-menu a.active::before {
  opacity: 1;
  transform: translateX(0);
}
.dropdown-menu a::after {
  display: none !important;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin-left: 0;
  margin-right: 20px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.lang-switch:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}
.lang-switch i {
  font-size: 0.95rem;
}

/* Hamburger Menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.navbar-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 40%, var(--blue-bright) 100%);
  overflow: hidden;
  padding: 120px 20px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(46,91,199,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26,58,138,0.4) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(11,31,91,0.3) 0%, transparent 50%);
  pointer-events: none;
}

/* Animated shapes */
.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: float 20s infinite ease-in-out;
}

.hero-shape:nth-child(1) {
  width: 400px;
  height: 400px;
  background: var(--blue-bright);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.hero-shape:nth-child(2) {
  width: 300px;
  height: 300px;
  background: var(--white);
  bottom: -80px;
  right: -80px;
  animation-delay: -5s;
  animation-duration: 25s;
}

.hero-shape:nth-child(3) {
  width: 200px;
  height: 200px;
  background: var(--blue-mid);
  top: 40%;
  right: 10%;
  animation-delay: -10s;
  animation-duration: 18s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content h1 span {
  color: #6BA3FF;
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 35px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.hero-scroll a {
  color: rgba(255,255,255,0.6);
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}

.hero-scroll a:hover {
  color: var(--white);
}

.hero-scroll span {
  font-size: 0.75rem;
  font-family: var(--font-heading);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-deep);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-blue {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-blue:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(11,31,91,0.2) 0%, transparent 100%);
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-deep);
}

.about-text p {
  color: var(--gray-600);
  margin-bottom: 15px;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.about-stat {
  text-align: center;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.about-stat .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.about-stat .label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 5px;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: var(--white);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--primary-deep);
}

.service-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 31, 91, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay a {
  color: var(--white);
  padding: 10px 24px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  transition: all var(--transition);
}

.project-overlay a:hover {
  background: var(--white);
  color: var(--primary-deep);
  border-color: var(--white);
}

.project-info {
  padding: 20px 24px;
}

.project-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.project-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--bg-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  margin-top: 10px;
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.news-image {
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
  transform: scale(1.08);
}

.news-body {
  padding: 20px 24px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.news-body h3 a {
  color: var(--primary-deep);
}

.news-body h3 a:hover {
  color: var(--primary);
}

.news-body p {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

.news-read-more {
  font-size: 0.9rem;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.news-read-more:hover {
  gap: 10px;
}

/* ============================================================
   RECRUITMENT / JOB SECTION
   ============================================================ */
.recruitment-content {
  text-align: center;
  max-width: min(90%, 1400px);
  margin: 0 auto;
}

.recruitment-content h2 {
  margin-bottom: 15px;
}

.recruitment-content p {
  color: var(--gray-600);
  margin-bottom: 30px;
}

.job-list {
  text-align: left;
  margin-top: 40px;
}

.job-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition);
}

.job-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.job-info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.job-info span {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.job-info span i {
  margin-right: 5px;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}

.contact-text h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.contact-text p {
  color: var(--gray-600);
  margin-bottom: 0;
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-deep);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 91, 199, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-control.error {
  border-color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.form-control.error + .error-message {
  display: block;
}

/* ----- Search ----- */
.search-box {
  position: relative;
}

.search-box input {
  padding-right: 45px;
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 8px;
  font-size: 1.1rem;
  transition: color var(--transition);
}

.search-box button:hover {
  color: var(--primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--blue-bright);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-col ul li a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.footer-contact li i {
  margin-top: 4px;
  min-width: 16px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--white);
}

/* TÜV NORD ISO 9001 Certification Badge (footer bottom right) */
.footer-cert-badge {
  height: 56px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  background: var(--white);
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.footer-cert-badge:hover {
  transform: scale(1.05);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  font-size: 0.9rem;
}

.footer-social a:hover {
  background: var(--blue-bright);
  color: var(--white);
}

/* ============================================================
   ANIMATIONS - Fade In on Scroll
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============================================================
   Visitor Counter — Floating Badge (Bottom-Right)
   ============================================================ */
.visitor-counter {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  padding: 8px 18px 8px 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}
.visitor-counter:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.counter-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-deep);
  border-radius: 50%;
  color: var(--white);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.counter-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.counter-total {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}
.counter-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}

/* Mobile — smaller badge */
@media (max-width: 992px) {
  .visitor-counter {
    bottom: 20px;
    right: 20px;
    padding: 6px 14px 6px 10px;
    gap: 8px;
  }
  .counter-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .counter-total {
    font-size: 0.85rem;
  }
  .counter-label {
    font-size: 0.6rem;
  }
}

/* ============================================================
   RESPONSIVE - Tablet (768px+)
   ============================================================ */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content { grid-template-columns: 1fr; gap: 40px; }
  .contact-wrapper { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  .hero-content h1 { font-size: 2.5rem; }
}

/* ============================================================
   RESPONSIVE - Mobile (<992px)  ← ยกจาก 768 เป็น 992 ครอบคลุมจอแนวนอนมือถือ
   ============================================================ */
@media (max-width: 992px) {
  /* ── Mobile Navigation (ครอบคลุมจอแนวนอนมือถือที่กว้างถึง 992px) ── */
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--blue-deep);
    flex-direction: column;
    padding: 15px 20px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    /* สำคัญ: จำกัดความสูงไม่ให้ล้นทับรูปสไลด์ (จอแนวนอน/สั้น) + เลื่อนภายในได้ */
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar-menu a {
    width: 100%;
    padding: 11px 18px;
    font-size: 0.95rem;
  }

  /* จอแนวนอน (landscape) / ความสูงต่ำ: หุบ font + padding ให้พอดี */
  @media (max-height: 500px) {
    .navbar-menu {
      top: 60px;
      padding: 10px 20px;
      max-height: calc(100vh - 60px);
      gap: 2px;
    }
    .navbar-menu a {
      padding: 8px 16px;
      font-size: 0.88rem;
    }
    .nav-dropdown > a.dropdown-toggle {
      padding: 8px 16px !important;
      font-size: 0.88rem !important;
    }
    .navbar { min-height: 60px; }
  }

  .lang-switch {
    position: fixed;
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin: 0;
    justify-content: center;
    padding: 10px 24px;
    border: 2px solid rgba(255,255,255,0.3);
    z-index: 1000;
    display: none;
  }
  /* จอแนวนอน/สั้น: เอาปุ่มภาษาไปไว้ในเมนู (static) ไม่ลอยล่างทับสไลด์ */
  @media (max-height: 500px) {
    .lang-switch,
    .navbar-menu.active ~ .lang-switch,
    .lang-switch.mobile-visible {
      position: static;
      transform: none;
      display: block;
      margin: 8px auto 0;
      width: fit-content;
    }
  }
  .navbar-menu.active ~ .lang-switch,
  .lang-switch.mobile-visible {
    display: flex;
  }

  /* ── Submenu บนมือถือ: ขยาย inline ในเมนู (ไม่ลอยกลางจอ) ── */
  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-dropdown > a.dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    min-width: 100% !important;
    width: 100% !important;
    background: rgba(0,0,0,0.18) !important;
    border: none !important;
    border-radius: 8px !important;
    margin: 4px 0 8px !important;
    padding: 6px 0 !important;
  }
  .dropdown-menu::before { display: none !important; }
  .dropdown-menu a {
    padding-left: 34px !important;
    white-space: normal !important;
  }
  /* ซ่อน submenu เริ่มต้น ให้กด chevron ค่อยขยาย (toggle ด้วย JS class open) */
  .nav-dropdown:not(.open) .dropdown-menu {
    display: none !important;
  }
  .nav-dropdown.open .dropdown-menu {
    display: block !important;
  }

  /* Grids to single column */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }

  .hero {
    min-height: 80vh;
    padding: 100px 20px 60px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .about-stat {
    padding: 15px 10px;
  }

  .about-stat .number {
    font-size: 1.5rem;
  }

  .contact-form {
    padding: 25px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-cert-badge {
    height: 48px;
    max-width: 100px;
  }

  .job-item {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ============================================================
   RESPONSIVE - Small Mobile (<480px)
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
  .alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
  }

  /* ============================================================
     RESPONSIVE SYSTEM — Full Coverage (Mobile-First Enhancements)
     Breakpoints: 1200 (LG desktop) / 1024 (tablet-land) / 992 / 768 / 480 / 360
     ============================================================ */

  /* --- Images & Media: never overflow --- */
  img, video, iframe, figure {
    max-width: 100%;
  }
  .pdf-embed-wrapper iframe {
    height: 70vh;
  }
  @media (max-width: 992px) {
    .pdf-embed-wrapper iframe { height: 55vh; }
  }
  @media (max-width: 480px) {
    .pdf-embed-wrapper iframe { height: 45vh; }
  }

  /* --- Navbar: balanced flex, shrink gracefully --- */
  .navbar-menu {
    flex-wrap: nowrap;
  }
  /* บนมือถือ: ซ่อนเมนูก่อนกดแฮมเบอร์เกอร์ (แทนที่จะ wrap เลยจอ) */
  @media (max-width: 992px) {
    .navbar-menu {
      display: none !important;
    }
    .navbar-menu.active {
      display: flex !important;
    }
  }
  @media (max-width: 1200px) {
    .navbar-menu > a,
    .nav-dropdown > a.dropdown-toggle {
      font-size: 0.92rem;
      padding: 10px 12px;
    }
  }
  @media (max-width: 1024px) {
    .navbar-menu > a,
    .nav-dropdown > a.dropdown-toggle {
      font-size: 0.85rem;
      padding: 10px 9px;
    }
    .navbar .logo { font-size: 1.3rem; }
  }

  /* --- Generic card grids: auto-fit for graceful scaling --- */
  .services-grid,
  .projects-grid,
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

  @media (max-width: 1200px) {
    .services-grid,
    .projects-grid,
    .news-grid,
    .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 992px) {
    .services-grid,
    .projects-grid,
    .news-grid,
    .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 992px) {
    .services-grid,
    .projects-grid,
    .news-grid,
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  }

  /* --- Timeline (About page milestones) --- */
  @media (max-width: 992px) {
    div[style*="padding-left: 40px"] {
      padding-left: 24px !important;
    }
    div[style*="left: -58px"] {
      left: -34px !important;
      width: 14px !important;
      height: 14px !important;
    }
  }

  /* --- Section padding scale --- */
  @media (max-width: 1200px) {
    .section { padding: 60px 0; }
  }
  @media (max-width: 992px) {
    .section { padding: 45px 0; }
  }
  @media (max-width: 480px) {
    .section { padding: 35px 0; }
  }

  /* --- Typography fluid scale --- */
  @media (max-width: 1200px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.9rem; }
    .hero-content h1 { font-size: 2.8rem; }
  }
  @media (max-width: 992px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2.5rem; }
  }
  @media (max-width: 992px) {
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.6rem; }
    .hero-content h1 { font-size: 2rem; }
    .section-title h2 { font-size: 1.6rem; }
  }
  @media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-content p { font-size: 1rem; }
    .section-title h2 { font-size: 1.4rem; }
  }
  @media (max-width: 360px) {
    h1 { font-size: 1.4rem; }
    .hero-content h1 { font-size: 1.4rem; }
    .container { padding: 0 12px; }
    .footer-cert-badge { height: 42px; max-width: 88px; }
  }

  /* --- About content: stack on tablet --- */
  @media (max-width: 992px) {
    .about-content { grid-template-columns: 1fr; gap: 40px; }
    .about-image { order: -1; }
  }

  /* --- Contact wrapper stack --- */
  @media (max-width: 992px) {
    .contact-wrapper { grid-template-columns: 1fr; }
  }

  /* --- Buttons stack on mobile --- */
  @media (max-width: 992px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn-lg { padding: 14px 32px; font-size: 1rem; width: 100%; max-width: 320px; }
  }

  /* --- Job items stack --- */
  @media (max-width: 992px) {
    .job-item { flex-direction: column; gap: 10px; text-align: center; }
  }

  /* --- Visitor counter mobile --- */
  @media (max-width: 992px) {
    .visitor-counter { bottom: 20px; right: 20px; padding: 6px 14px 6px 10px; gap: 8px; }
    .counter-icon { width: 28px; height: 28px; font-size: 0.75rem; }
    .counter-total { font-size: 0.85rem; }
    .counter-label { font-size: 0.6rem; }
  }

  /* ============================================================
     UTILITY CLASSES
     ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-white { color: var(--white); }
.text-dark { color: var(--dark); }
.text-muted { color: var(--gray-600); }
.bg-primary { background: var(--primary); }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--white); }
.bg-dark-blue { background: var(--blue-deep); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }
.py-40 { padding-top: 40px; padding-bottom: 40px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow-md); }
.w-100 { width: 100%; }
.d-none { display: none; }
.d-block { display: block; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Selection */
::selection {
  background: var(--primary);
  color: var(--white);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--gray-600);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .current {
  color: var(--primary);
  font-weight: 500;
}

/* Alert / Notification */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ── Why Work With Us grid (หน้า careers) — responsive ── */
.why-work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 992px) {
  .why-work-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .why-work-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================================================
   RESPONSIVE UTILITY GRIDS — ยุบคอลัมน์อัตโนมัติทุกอุปกรณ์
   ใช้แทน inline grid-template-columns: repeat() ที่ไม่ยุบมือถือ
   ============================================================ */
/* 2 คอลัมน์ → 1 คอลัมน์เมื่อจอแคบ (auto ตามความกว้างการ์ด) */
.auto-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
@media (max-width: 768px) {
  .auto-grid-2 { grid-template-columns: 1fr; gap: 18px; }
}

/* 4 คอลัมน์ (about-stats หน้าแรก) → 2 → 1 */
.about-stats-4 { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 992px) {
  .about-stats-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 576px) {
  .about-stats-4 { grid-template-columns: 1fr !important; }
}

/* Project detail: รูป + ข้อมูล ข้างกัน → ซ้อนกันบนมือถือ */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 992px) {
  .project-detail-grid { grid-template-columns: 1fr; gap: 25px; }
}

/* ============================================================
   STATS SECTION (หน้าแรก) — โมเดิร์น กะทัดรัด ไล่สีทอง
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, #0B1F5B 0%, #2E5BC7 100%);
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,210,77,0.08), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(77,125,240,0.15), transparent 45%);
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.stat-card {
  text-align: center;
  padding: 32px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.stat-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,210,77,0.5);
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #FFD24D, #FFB800);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.stat-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
}
/* หลังตัวเลข: เส้นทองสั้นๆ */
.stat-card .stat-number::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, #FFD24D, #FFB800);
  border-radius: 2px;
}
@media (max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat-number { font-size: 2.6rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-card { padding: 24px 12px; }
  .stat-number { font-size: 2.1rem; }
  .stat-label { font-size: 0.85rem; }
}
