html, body {
  margin: 0;
  padding: 0;
  font-family: 'Kanit', sans-serif;
  color: #2e7d32; /* เขียว */
  background: #fff; /* พื้นหลังขาว */
  height: 100%;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 900;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* =========================
   เอฟเฟกต์ Fade Transition
   ========================= */
.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

/* =========================
   ปุ่มเลื่อนซ้าย/ขวา
   ========================= */
.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 950;
}

.slider-button {
  background-color: rgba(46, 125, 50, 0.85); /* เขียว */
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.3s;
}

.slider-button:hover {
  background: #c0a040; /* ทอง */
}

/* =========================
   ปุ่มเมนู (ถ้าต้องการใช้)
   ========================= */
.custom-buttons {
  position: absolute;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
  justify-content: center;
  max-width: 95vw;
  z-index: 960;
  font-family: inherit;
}

.custom-btn {
  background: rgba(46, 125, 50, 0.1); /* เขียวจาง */
  border: 1px solid #2e7d32;
  color: #2e7d32;
  cursor: pointer;
  text-align: center;
  width: 120px;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 14px;
  padding: 10px 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}

.custom-btn:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 8px 28px rgba(0,0,0,0.26);
  background: #2e7d32; /* เขียว */
  color: #fff;
  border-color: #c0a040; /* ทอง */
}

.custom-btn i {
  font-size: 48px;
  width: 68px;
  height: 68px;
  line-height: 68px;
  text-align: center;
  color: #2e7d32;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.19));
  border-radius: 50%;
  margin-bottom: 5px;
  transition: filter 0.3s, color 0.3s;
}

.custom-btn:hover i {
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
  color: #c0a040; /* เปลี่ยนเป็นทองเวลา hover */
}

.custom-btn span {
  font-family: 'Kanit', sans-serif;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: normal;
}

/* =========================
   ซ่อน Hero Slider เมื่อ Scroll
   ========================= */
.hero-slider.hidden {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
}


/* =========================
   Responsive Mobile
   ========================= */
@media (max-width: 600px) {
  .custom-buttons {
    gap: 12px;
    max-width: 99vw;
  }
  .custom-btn {
    width: 80px;
    font-size: 12px;
    padding: 6px 2px;
  }
  .custom-btn i {
    font-size: 30px;
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
}

/* ================= DARK MODE ================= */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

/* HERO SLIDER */
body.dark-mode .hero-slider {
  background: #121212;
}

body.dark-mode .slide {
  filter: brightness(0.75) contrast(1.05);
}

/* ปุ่มเลื่อนซ้าย/ขวา */
body.dark-mode .slider-button {
  background-color: rgba(192, 160, 64, 0.85); /* ทอง */
  color: #121212;
}

body.dark-mode .slider-button:hover {
  background: #2e7d32; /* เขียว */
  color: #fff;
}

/* CUSTOM BUTTONS */
body.dark-mode .custom-buttons {
  z-index: 960;
}

body.dark-mode .custom-btn {
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid #2a2a2a;
  color: #ddd;
}

body.dark-mode .custom-btn:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #c0a040 100%);
  color: #fff;
  border-color: #c0a040;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

body.dark-mode .custom-btn i {
  color: #c0a040;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

body.dark-mode .custom-btn:hover i {
  color: #fff;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
}

/* TEXT */
body.dark-mode .custom-btn span {
  color: #ccc;
  text-shadow: none;
}

/* HERO SLIDER Transition เวลา hidden */
body.dark-mode .hero-slider.hidden {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
}
