/* ========================================================
   1. GLOBAL VARIABLES & BASE STYLES
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Inter:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;500;700&display=swap');

:root {
  /* Colors */
  --bg: #ffffff;
  --bg-soft: #faf8f5;
  --muted: #6b6b6b;
  --accent: #e6007e;
  --accent-dark: #c50073;
  --accent-pink-alt: #e60067;
  --quote-color: #d13076;
  --accent-line: #a3d9c9;
  --divider-color: #eeeeee;
  --card: #ffffff;
  --text-main: #222222;
  --text-dark: #111111;
  --primary-color: #e91e63;
  --bg-light: #fcfcfc;

  /* Brand Colors */
  --color-creative-food: #f26522;
  --color-heritage: var(--accent-pink-alt);
  --color-tourism: #00897b;       
  --color-design: #7b1fa2;        
  --color-learning: #1976d2;      
  --color-community: #4caf50;     
  --color-main-center: #111111;
  --line-color: #dddddd;

  /* Layout & Sizing */
  --container-max: 1200px;
  --container-large: 1400px;
  --header-height: 82px;
  --header-mobile-height: 72px;
  --header-small-height: 64px;
  --padding-section: 60px;
  --gap-grid: 35px;

  /* UI Components */
  --radius: 14px;
  --radius-small: 10px;
  --radius-img: 4px;
  --soft-border: rgba(0, 0, 0, 0.06);
  --shadow: 0 6px 18px rgba(12, 12, 12, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Noto Sans Thai', system-ui, sans-serif;
  color: var(--text-main);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(var(--container-max), 94%);
  margin: 0 auto;
}

/* Accessibility: Skip to Content Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--text-dark);
  color: #ffffff;
  padding: 10px 20px;
  z-index: 100000;
  font-weight: 600;
  border-radius: 0 0 var(--radius-small) var(--radius-small);
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skip-link:focus {
  top: 0;
  outline: 2px dashed var(--accent);
}

/* ========================================================
   2. GENERIC COMPONENTS (BUTTONS, TITLES)
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--soft-border);
  background: #ffffff;
  color: var(--text-main);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background-color: var(--accent-pink-alt);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 50px;
  gap: 10px;
}

.btn-outline {
  background-color: #ffffff;
  border: 1px solid #cccccc;
  color: #333333;
  padding: 10px 25px;
  border-radius: 50px;
  margin-left: 15px;
}

.section-title {
  font-size: 24px;
  margin-bottom: 25px;
  color: var(--text-dark);
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(to right, #e60067 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ========================================================
   3. SITE HEADER & NAVIGATION (DESKTOP)
   ======================================================== */
.site-header {
  background: #ffffff;
  height: var(--header-height);
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  position: relative;
  z-index: 9999;
}

.header-container {
  max-width: var(--container-large);
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.header-logo {
  width: 145px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo img {
  height: 65px;
  width: auto;
}

.header-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  padding-right: 40px;
}

.header-nav ul {
  display: flex;
  gap: 32px;
}

.header-nav ul li {
  position: relative;
}

.header-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--text-main);
  font-size: 16px;
  transition: color 0.3s ease;
  display: inline-block;
}

.header-nav a:hover {
  color: var(--accent);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-right {
  display: flex;
  align-items: center;
  height: 100%;
}

/* ========================================================
   4. HEADER CONTROLS (SEARCH, LANG, TOGGLE)
   ======================================================== */
.search-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
}

.search-input-container {
  width: 0;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}

.search-input-container input {
  width: 240px;
  padding: 8px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input-container input:focus {
  border-color: var(--accent);
}

.search-wrapper.active .search-input-container {
  width: 250px;
  margin-right: 10px;
}

.search-wrapper.active .search-btn svg {
  color: var(--accent);
}

.search-btn {
  width: 60px;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn svg {
  color: #000000;
}

/* AJAX Search Results */
.search-ajax-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--soft-border);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.search-ajax-results.show {
  display: block;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: background 0.2s ease, color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: rgba(230, 0, 126, 0.03);
  color: var(--accent-dark);
}

.search-no-result {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Language Switcher Button Styles */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 15px;
}

.lang-item {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  cursor: pointer;
}

.lang-item:hover:not(.active) {
  color: var(--accent);
  background-color: rgba(230, 0, 126, 0.05);
}

.lang-item.active {
  color: var(--accent) !important;
  font-weight: 700;
}

.lang-divider {
  color: #e8e8e8;
  user-select: none;
}

/* Mobile Controls & Fixing Overlay Bugs */
.mobile-toggle {
  display: none; 
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10005;
}

.mobile-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 999px;
  transition: all 0.3s ease-in-out;
  transform-origin: left center;
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  background-color: var(--accent);
}

.mobile-toggle.open span:nth-child(2) {
  width: 0%;
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  background-color: var(--accent);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9995;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ========================================================
   5. PAGE SECTIONS (HERO, INTRO, CARDS, ETC.)
   ======================================================== */
.hero {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 50%), url('../index_c.png');
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
  padding: 56px 0 36px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 460px;
}

.hero-left {
  max-width: 720px;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.68);
  padding: 2em;
  border-radius: 15px;
  border: #cccccc 1px solid;
}

.hero-title {
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  font-weight: 900;
  line-height: 1.1;
  font-size: 4rem;
  letter-spacing: 2px;
}

.hero-title .highlight {
  color: var(--accent-pink-alt);
}

.hero-sub-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000000;
  margin-top: 20px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.hero-desc {
  font-size: 1rem;
  color: #555555;
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 30px;
}

.hero-cta {
  margin-top: 22px;
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Intro Section */
.intro {
  padding: var(--padding-section) 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.9fr;
  gap: var(--gap-grid);
  align-items: center;
}

.intro-image {
  position: relative;
  border-radius: var(--radius-img);
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 15px;
  left: 20px;
  color: #ffffff;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.overlay-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.overlay-line {
  width: 140px;
  height: 2px;
  background-color: #ffffff;
  margin-bottom: 6px;
}

.overlay-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0.9;
}

/* Intro: Column 2 */
.intro-text {
  padding-right: 15px;
}

.intro-text p {
  color: var(--muted);
  line-height: 1.7;
}

.vision-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.vision-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 45px;
  height: 3px;
  background-color: var(--accent-line);
}

.vision-quote-container {
  position: relative;
  margin: 20px 0;
  padding: 0 25px;
}

.vision-quote-container .sub-heading {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
}

.quote-mark {
  position: absolute;
  font-size: 42px;
  font-weight: 900;
  color: var(--quote-color);
  font-family: sans-serif;
  line-height: 1;
}

.quote-mark.open {
  left: -2px;
  top: -5px;
}

.quote-mark.close {
  display: inline-block;
  transform: translateY(-33px);
  margin-left: 190px;
}

.vision-desc {
  font-size: 17px;
  color: #444444;
  line-height: 1.75;
  margin-top: 15px;
}

/* Intro: Column 3 */
.intro-infographic {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.info-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: max-content;
  margin: 0 auto;
}

.info-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 20px;
  z-index: 2;
  width: 100%;
}

.icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.icon-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.icon-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Infographic Dynamic Colors */
.icon-learning { border-color: #a4dbb6; }
.icon-learning .icon-inner { background-color: #edf9f0; color: #3b9c59; }

.icon-creative { border-color: #a0c3f7; }
.icon-creative .icon-inner { background-color: #edf4fe; color: #2b72da; }

.icon-economy { border-color: #fccca0; }
.icon-economy .icon-inner { background-color: #fff7ee; color: #e07b1a; }

.icon-sustainable { border-color: #aed9b2; }
.icon-sustainable .icon-inner { background-color: #f1faf2; color: #409249; }

.info-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.info-list .info-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 2px 0;
  color: #444444;
  font-size: 14px;
  opacity: 0.8;
  pointer-events: none;
  line-height: 1;
}

/* ========================================================
   6. GRID SECTIONS (CARDS, ECOSYSTEM, ACTIVITIES, NEWS)
   ======================================================== */
.section-cards {
  padding: 40px 0;
  background-color: var(--bg);
}

.section-cards .section-title {
  font-size: 24px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.section-cards .section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 35px;
  height: 4px;
  background-color: var(--accent-pink-alt);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  min-height: 250px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.card-icon {
  font-size: 36px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.card-text {
  color: #333333;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 500;
  margin: 0;
  width: 100%;
}

.card-icon.icon-pink { color: var(--accent-pink-alt); }
.card-icon.icon-blue { color: #1E62D0; }
.card-icon.icon-green { color: #2E7D32; }
.card-icon.icon-orange { color: #E65100; }
.card-icon.icon-magenta { color: #D81B60; }

/* 6.1 MAIN COMBINED SECTION (ECOSYSTEM & TIMELINE) */
.main-combined-section {
  display: grid;
  grid-template-columns: 45% 55%; 
  align-items: start;
  padding: 40px 0;
}

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

.ecosystem-container {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 20px auto 0;
}

.eco-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  background: var(--color-main-center);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.eco-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  z-index: 5;
  text-align: center;
  width: 90px;
}

.eco-item i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.eco-creative-food { top: 0; left: 50%; transform: translateX(-50%); }
.eco-creative-food i { background-color: var(--color-creative-food); }

.eco-heritage { top: 22%; right: 2%; }
.eco-heritage i { background-color: var(--color-heritage); }

.eco-tourism { bottom: 22%; right: 2%; }
.eco-tourism i { background-color: var(--color-tourism); }

.eco-design { bottom: 0; left: 50%; transform: translateX(-50%); }
.eco-design i { background-color: var(--color-design); }

.eco-learning { bottom: 22%; left: 2%; }
.eco-learning i { background-color: var(--color-learning); }

.eco-community { top: 22%; left: 2%; }
.eco-community i { background-color: var(--color-community); }

.ecosystem-container::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  width: 296px;
  height: 296px;
  border: 1.5px dashed #cccccc;
  border-radius: 50%;
  z-index: 1;
}

/* Timeline */
.column-right {
  border-left: 1px solid var(--divider-color);
  padding-left: 40px;
}

.activities-timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}

.timeline-line {
  position: absolute;
  left: 0;
  top: 22px; 
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, 
    var(--color-creative-food) 0%, var(--color-creative-food) 20%,
    var(--color-learning) 20%, var(--color-learning) 40%,
    var(--color-community) 40%, var(--color-community) 60%,
    var(--color-design) 60%, var(--color-design) 80%,
    var(--color-heritage) 80%, var(--color-heritage) 100%
  );
  z-index: 1;
}

.timeline-dots-container {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0 10%;
  box-sizing: border-box;
}

.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid;
}

.activity {
  position: relative;
  width: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 10;
  background: transparent;
  border: none;       
  padding: 0;             
}

.activity-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 15px;
  box-shadow: 0 0 0 2px #ffffff;
}

.activity:nth-of-type(1) .activity-circle { box-shadow: 0 0 0 2px var(--color-creative-food); color: var(--color-creative-food); }
.activity:nth-of-type(2) .activity-circle { box-shadow: 0 0 0 2px var(--color-learning); color: var(--color-learning); }
.activity:nth-of-type(3) .activity-circle { box-shadow: 0 0 0 2px var(--color-creative-food); color: var(--color-creative-food); }
.activity:nth-of-type(4) .activity-circle { box-shadow: 0 0 0 2px var(--color-learning); color: var(--color-learning); }
.activity:nth-of-type(5) .activity-circle { box-shadow: 0 0 0 2px var(--color-community); color: var(--color-community); }
.activity:nth-of-type(6) .activity-circle { box-shadow: 0 0 0 2px var(--color-design); color: var(--color-design); }
.activity:nth-of-type(7) .activity-circle { box-shadow: 0 0 0 2px var(--color-heritage); color: var(--color-heritage); }

.activity h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 5px 0 8px;
  line-height: 1.3;
}

.activity:nth-of-type(1) h3 { color: var(--color-creative-food); }
.activity:nth-of-type(2) h3 { color: var(--color-learning); }
.activity:nth-of-type(3) h3 { color: var(--color-creative-food); }
.activity:nth-of-type(4) h3 { color: var(--color-learning); }
.activity:nth-of-type(5) h3 { color: var(--color-community); }
.activity:nth-of-type(6) h3 { color: var(--color-design); }
.activity:nth-of-type(7) h3 { color: var(--color-heritage); }

.activity p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
}

/* 6.2 OTHER GRIDS (NEWS, SWIPER) */
.news {
  padding: 20px 0 40px;
}

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

.newsSwiper {
  padding: 10px 10px 50px;
}

.news-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--soft-border);
  transition: .3s;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.news-card h3 {
  margin: 12px 12px 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.news-card p {
  padding: 0 16px 16px;
  color: #666;
  font-size: 17px;
}

.swiper-button-next,
.swiper-button-prev {
  color: #e60067;
}

.swiper-button-next, .swiper-rtl .swiper-button-prev {
  right: var(--swiper-navigation-sides-offset, 50px);
  left: auto;
}

.swiper-button-prev, .swiper-rtl .swiper-button-next {
  left: var(--swiper-navigation-sides-offset, 50px);
  right: auto;
}

.swiper-pagination-bullet-active {
  background: #e60067;
}

/* Stats Banner Section */
.stats-banner {
  font-family: 'Kanit', sans-serif;
  padding: 40px 20px; 
  background-color: #000; 
  background-image: 
    url('../images/f-l.png'), 
    url('../images/f-r.png'), 
    linear-gradient(to right, rgba(233, 30, 99, 0.3) 0%, transparent 25%, transparent 75%, rgba(139, 195, 74, 0.25) 100%);
  background-position: left bottom, right bottom, left top; 
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: contain, contain, auto; 
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  gap: 15px;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.num {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.text-pink { color: #e91e63; }
.text-blue { color: #2196f3; }
.text-green { color: #4caf50; }
.text-orange { color: #ff5722; }

.lbl-en {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
}

.lbl-th {
  color: #b0bec5;
  font-size: 0.85rem;
  font-weight: 300;
  margin-top: 2px;
}

.divider {
  width: 1px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 10px;
}

/* ========================================================
   7. SITE FOOTER (CLEANED & MERGED)
   ======================================================== */
.site-footer {
  background-color: #ffffff;
  padding: 40px 20px;
  border-top: 1px solid #f0f0f0;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-col {
  flex: 1;
  min-width: 180px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 220px;
}

.footer-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #000000;
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.social-icon:hover {
  opacity: 0.8;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 15px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #000000;
}

.footer-contact p {
  font-size: 14px;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 4px;
}

.footer-contact a {
  color: #555555;
}

.footer-qrcode {
  display: flex;
  justify-content: flex-end;
  max-width: 120px;
}

.qr-image {
  max-width: 100px;
  height: auto;
  display: block;
}

/* ========================================================
   8. MEDIA QUERIES (RESPONSIVE SYSTEM)
   ======================================================== */
@media (max-width: 1024px) {
  .site-header {
    height: var(--header-mobile-height);
  }

  .header-container {
    padding: 0 24px;
    justify-content: space-between;
  }

  .header-logo {
    justify-content: flex-start;
  }

  .header-logo img {
    height: 52px;
  }

  .mobile-toggle {
    display: flex; 
  }

  /* Responsive Mobile Layout Menu Drawer */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    padding: 90px 24px 40px 32px;
    display: block;
  }

  .header-nav.active {
    right: 0;
  }

  .header-nav ul {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .header-nav li {
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .header-nav.active li {
    opacity: 1;
    transform: translateX(0);
  }
  .header-nav.active li:nth-child(1) { transition-delay: 0.1s; }
  .header-nav.active li:nth-child(2) { transition-delay: 0.15s; }
  .header-nav.active li:nth-child(3) { transition-delay: 0.2s; }
  .header-nav.active li:nth-child(4) { transition-delay: 0.25s; }

  .header-nav a {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    width: 100%;
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

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

@media (max-width: 991px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro-infographic {
    border-left: none;
    padding-left: 0;
    padding-top: 30px;
  }

  .info-list .info-arrow {
    transform: rotate(360deg);
    margin: 8px auto;
  }
}

@media (min-width: 992px) {
  .intro-infographic {
    padding-left: 30px;
    border-left: 1px solid var(--divider-color);
  }
}

@media (max-width: 768px) {
  .main-combined-section {
    grid-template-columns: 1fr; 
    gap: 50px;
  }
  
  .column-right {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--divider-color);
    padding-top: 30px;
  }

  .activities-timeline {
    flex-direction: column;
    gap: 35px;
    align-items: flex-start;
    padding-left: 50px;
    margin-top: 30px;
  }

  .timeline-line {
    left: 22px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
      var(--color-creative-food) 0%, var(--color-learning) 25%,
      var(--color-community) 50%, var(--color-creative-food) 75%,
      var(--color-heritage) 100%
    );
  }

  .timeline-dots-container {
    display: none; 
  }

  .activity {
    width: 100%;
    flex-direction: row;
    text-align: left;
    gap: 20px;
  }

  .activity-circle {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .activity p {
    white-space: normal;
  }

  .cards-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .hero-inner {
    flex-direction: column;
    padding: 20px 0;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 35px;
  }
  
  .footer-brand, .footer-qrcode {
    align-items: center;
    justify-content: center;
    max-width: 100%;
  }

  .stats-banner {
    background-image: 
      url('../images/f-l.png'), 
      url('../images/f-r.png');
    background-position: left bottom, right bottom;
    background-repeat: no-repeat, no-repeat;
    background-size: 150px, 150px;
  }

  .stats-inner {
    flex-direction: column;
    gap: 30px;
  }

  .divider {
    width: 60px;
    height: 1px;
    margin: 0 auto;
  }

  /* Responsive สำหรับ Knowledge page ในหน้าจอเล็ก */
  .hero-research-inner {
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
  }
  .research-main-title {
    font-size: 2.8rem;
  }
  .research-hero-right {
    justify-content: center;
    width: 100%;
  }
  .research-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .site-header {
    height: var(--header-small-height);
  }

  .header-container {
    padding: 0 16px;
  }

  .header-logo img {
    height: 44px;
  }

  .header-nav {
    width: 85%;
    padding-top: 80px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .cards-grid, .news-grid, .research-video-grid { 
    grid-template-columns: 1fr; 
  }

  .card { 
    min-height: auto; 
  }
}

/* ========================================================
   9. KNOWLEDGE & RESEARCH PAGE COMPONENT STYLES
   ======================================================== */

/* --- HERO BANNER SECTION --- */
.research-hero {
    background-image: url('../images/slide_header.jpg');
    background-size: cover;
    background-position: center right; 
    background-repeat: no-repeat;
    padding: 50px 0;
    color: #1a1a1a; 
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
}

.hero-research-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 380px;
}

.research-hero-left {
    /*flex: 1;*/
    max-width: 550px;
    z-index: 5;
    /* เพิ่ม background จางๆ ล้อมรอบข้อความเพื่อให้อ่านง่ายขึ้นเมื่อเจอรูปพื้นหลัง */
    background-color: rgba(255, 255, 255, 0.75);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.research-main-title {
    font-family: 'Inter', 'Noto Sans Thai', sans-serif;
    font-weight: 900;
    line-height: 1.15;
    font-size: 3.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.research-main-title .highlight {
    color: #e60067; 
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    text-shadow: none;
}

.research-hero-desc {
    font-size: 1.1rem;
    font-weight: 400;
    color: #555555; /* ปรับข้อความเป็นสีเทาเข้มให้อ่านง่าย */
    line-height: 1.6;
}

.research-hero-right {
    flex: 1.2;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.collage-wrapper {
    display: none; 
}

.collage-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; 
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.collage-wrapper:hover .collage-img-main {
  transform: scale(1.04);
}

/* --- TABS FILTER BAR (STICKY NAV) --- */
.research-tabs-bar {
  background-color: var(--bg);
  border-bottom: 1px solid var(--divider-color);
  position: sticky;
  top: 0;
  z-index: 990;
}

.research-tabs-list {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 4px;
  padding: 0;
}

.research-tabs-list::-webkit-scrollbar {
  height: 3px;
}

.research-tabs-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

.research-tab-item a {
  display: block;
  padding: 18px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}

.research-tab-item:hover a,
.research-tab-item.active a {
  color: var(--accent-pink-alt);
  font-weight: 700;
}

.research-tab-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background-color: var(--accent-pink-alt);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  border-radius: 99px 99px 0 0;
}

.research-tab-item.active a::after,
.research-tab-item:hover a::after {
  transform: scaleX(1);
}

/* --- GRID SECTION & CARD DESIGN --- */
.research-grid-section {
  padding: var(--padding-section) 0;
  background-color: var(--bg-soft);
}

.research-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.research-section-title i {
  color: var(--text-dark);
  font-size: 18px;
}

.research-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-grid);
}

/* สำหรับหน้าจอมือถือ (ขนาดหน้าจอเล็กกว่า 768px) */
@media (max-width: 767px) {
  .research-video-grid {
    /* เปลี่ยนมาใช้ Grid แถวละ 1 คอลัมน์เต็มหน้าจอ */
    display: grid;
    grid-template-columns: repeat(1, 1fr); 
    gap: 20px; /* ระยะห่างระหว่างการ์ดแต่ละใบ (ปรับเปลี่ยนตามชอบ) */
  }

  /* (เพิ่มเติม) ปรับระยะห่างด้านข้างขอบจอให้พอดีกับมือถือ */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* VIDEO CARD DECORATION & LAYOUT */
.video-item-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--soft-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.video-thumbnail-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* อัตราส่วน 16:9 สำหรับ Thumbnail วิดีโอ */
  background-color: #000;
  overflow: hidden;
}

.video-thumbnail-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-item-card:hover .video-thumbnail-box img {
  transform: scale(1.05);
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.3s ease;
  color: #ffffff;
  font-size: 48px;
}

.video-play-overlay:hover,
.video-play-overlay:focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
  font-size: 54px;
  outline: none;
}

.district-badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--accent-pink-alt);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-small);
  z-index: 3;
}

.video-details-box {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-details-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-hyperlink {
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
  margin-top: auto;
  transition: color 0.2s ease;
}

.video-hyperlink:hover {
  color: var(--accent);
  text-decoration: underline;
}

.research-actions-container {
  display: flex;
  justify-content: center;
  margin-top: 45px;
}

.btn-research-more {
  background-color: var(--text-dark);
  color: #ffffff;
  padding: 12px 35px;
  border-radius: 50px;
  font-size: 15px;
  border: none;
  transition: all 0.25s ease;
}

.btn-research-more:hover {
  background-color: var(--accent-pink-alt);
  transform: translateY(-2px);
}

.highlight {
      color: var(--primary-color);
    }

/* ส่วนจัดการข้อมูลติดต่อและแผนที่ (Section 1) */
    .contact-wrapper {
      max-width: 1200px;
      margin: 40px auto;
      padding: 0 20px;
      display: grid;
      grid-template-columns: 1fr 1.5fr;
      gap: 30px;
    }
    .contact-info-box {
      background: #ffffff;
      border-radius: 16px;
      padding: 30px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.02);
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    .info-item {
      display: flex;
      gap: 15px;
    }
    .info-item i {
      font-size: 22px;
      color: var(--primary-color);
      margin-top: 4px;
    }
    .info-text h3 {
      font-size: 1.05rem;
      color: var(--primary-color);
      margin-bottom: 5px;
      font-weight: 700;
    }
    .info-text p {
      font-size: 17px;
      color: #555;
      line-height: 1.5;
    }
    .google-maps-box {
      width: 100%;
      height: 100%;
      min-height: 350px;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 4px 20px rgba(0,0,0,0.02);
      border: 1px solid #eeeeee;
    }
    .google-maps-box iframe {
      width: 100%;
      height: 100%;
      border: 0;
    }

    /* ส่วนทีมวิจัย (Section 2) */
    .team-wrapper {
      max-width: 1200px;
      margin: 40px auto;
      padding: 0 20px;
    }
    .team-container {
      background: #ffffff;
      border-radius: 16px;
      padding: 30px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .team-top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #f0f0f0;
      padding-bottom: 20px;
      margin-bottom: 25px;
      flex-wrap: wrap;
      gap: 15px;
    }
    .team-main-heading {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-dark);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .team-main-heading i {
      color: var(--primary-color);
    }
    .team-tabs {
      display: flex;
      gap: 8px;
    }
    .tab-item-btn {
      padding: 6px 16px;
      border: 1px solid #e0e0e0;
      background: #fff;
      border-radius: 20px;
      font-size: 17px;
      color: #666;
      cursor: pointer;
      font-family: 'Noto Sans Thai', system-ui, sans-serif;
    }
    .tab-item-btn.active {
      background: var(--primary-color);
      color: #fff;
      border-color: var(--primary-color);
    }
    .team-search {
      position: relative;
    }
    .team-search input {
      padding: 6px 35px 6px 12px;
      border: 1px solid #e0e0e0;
      border-radius: 6px;
      background: #f9f9f9;
      font-size: 17px;
      width: 200px;
      font-family: 'Noto Sans Thai', system-ui, sans-serif;
    }
    .team-search i {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #999;
    }
    .team-grid-layout {
      display: grid;
      /*grid-template-columns: 220px 1fr;*/
      gap: 30px;
    }
    .sub-section-title {
      font-size: 20px;
      font-weight: 700;
      color: var(--primary-color);
      margin-bottom: 15px;
    }
    .cards-flex-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
      gap: 15px;
    }
    .profile-item-card {
      background: #ffffff;
      border: 1px solid #f0f0f0;
      border-radius: 12px;
      padding: 15px 10px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .profile-avatar {
      width: 95px;
      height: 115px;
      background: #f0f0f0;
      border-radius: 8px;
      margin-bottom: 10px;
      overflow: hidden;
    }
    .profile-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .profile-item-card h4 {
      font-size: 17px;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: 5px;
      line-height: 1.4;
      min-height: 38px;
    }
    .tag-role {
      font-size: 17px;
      color: var(--primary-color);
      background: #fff0f3;
      padding: 2px 10px;
      border-radius: 12px;
      margin-bottom: 4px;
      font-weight: 500;
    }
    .lbl-pos {
      font-size: 17px;
      color: #999;
      margin-bottom: 12px;
    }
    .btn-profile-link {
      width: 100%;
      padding: 4px 0;
      border: 1px solid #f48fb1;
      background: #fff;
      color: var(--primary-color);
      font-size: 17px;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'Noto Sans Thai', system-ui, sans-serif;
    }
    .btn-profile-link:hover {
      background: var(--primary-color);
      color: #fff;
      border-color: var(--primary-color);
    }

     /* ส่วนโซเชียลมีเดียแบนเนอร์ (Section 3) */
    .social-banner-wrapper {
      max-width: 1200px;
      margin: 40px auto;
      padding: 0 20px;
    }
    .social-banner-container {
      background: #ffffff;
      border-radius: 16px;
      padding: 30px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .social-banner-title {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 20px;
      color: var(--text-dark);
    }
    .social-row-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }
    .social-media-card {
      border-radius: 12px;
      padding: 20px;
      color: #ffffff;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 170px;
    }
    .sm-fb { background: linear-gradient(135deg, #3b5998, #2d4373); }
    .sm-tt { background: linear-gradient(135deg, #111111, #000000); }
    .sm-yt { background: linear-gradient(135deg, #cc181e, #9f1216); }

    .sm-top-content {
      display: flex;
      gap: 15px;
    }
    .sm-top-content i {
      font-size: 32px;
    }
    .sm-text-info h5 {
      font-size: 0.95rem;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .sm-text-info p {
      font-size: 16px;
      opacity: 0.85;
      line-height: 1.4;
    }
    .btn-sm-action {
      align-self: flex-start;
      padding: 5px 18px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.4);
      background: rgba(255,255,255,0.15);
      color: #fff;
      font-size: 17px;
      cursor: pointer;
      font-family: 'Noto Sans Thai', system-ui, sans-serif;
    }
    .btn-sm-action:hover {
      background: #ffffff;
      color: #222;
    }

    @media (max-width: 992px) {
      .contact-wrapper, .team-grid-layout, .social-row-grid {
        grid-template-columns: 1fr !important;
      }
      .team-top-bar {
        flex-direction: column;
        align-items: flex-start;
      }
    }

    .team-grid-layout.only-leader {
      grid-template-columns: 1fr;
      justify-items: center;
    }
    .team-grid-layout.only-leader .leader-column {
      max-width: 280px;
      width: 100%;
    }
    .team-grid-layout.hide-leader {
      grid-template-columns: 1fr;
    }