* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Sarabun", sans-serif;
}

body {
  background: #ffffff;
}

/* HEADER */
.header {
  background: #e8e8e8;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
  height: 100px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  /* ระยะห่างโลโก้กับข้อความ */
}

/* search center */
.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.search-bar {
  width: 80%;
  background: #04214b;
  padding: 7px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
}

.logo {
  object-fit: contain;
  width: 80px;
  height: 80px;
}

.brand h1 {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
}

.brand span {
  color: #c0392b;
  font-size: 14px;
  font-weight: 600;
  font-size: 20px;
}

.login-btn {
  border: 2px solid #1e3a8a;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  color: #1e3a8a;
  font-weight: 600;
  transition: 0.3s;
}

.login-btn:hover {
  background: #1e3a8a;
  color: white;
}

/* NAVBAR */
.navbar {
  display: flex;
  background: #6b8fcf;
  padding: 15px 40px;
  justify-content: center;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: center;
  justify-content: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 600;
}

.nav-menu li a:hover {
  background: #345ca8;
  border-radius: 10px;
}

/* Hamburger */
.hamburger {
  display: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* BANNER */
.banner {
  display: flex;
  width: 100%;
  height: 380px;
  overflow: hidden;
}

/* ---------- LEFT SLIDER ---------- */
.banner-left {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  width: 100%;
  height: 100%;
  position: absolute;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active {
  opacity: 1;
}

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

/* ---------- PREV / NEXT BUTTON ---------- */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s;
}

.slide-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* ---------- RIGHT STATIC ART ---------- */
.banner-right {
  flex: 1;
  position: relative;
  text-decoration: none;
  color: #fff;
}

.banner-right img {
  width: 100%;
  height: 100%;
}

.right-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.right-text h2 {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.right-text button {
  margin-top: 15px;
  padding: 10px 25px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #542de0;
  color: #fff;
  cursor: pointer;
}

/* CS1-SECTIONS */
.section {
  padding: 80px 20px;
  text-align: center;
}

.section.alt {
  background: #eef2ff;
}

.section h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

.section p {
  font-size: 16px;
  color: #555;
}

.cs1-section {
  text-align: center;
  padding: 30px;
}

.cs1-slider-box {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

.cs1-track-container {
  overflow: hidden;
}

.cs1-track {
  display: flex;
  transition: transform 0.45s ease;
}

.cs1-slide {
  min-width: 100%;
}

.cs1-slide img {
  width: 100%;
  height: 550px;
  object-fit: cover;
}

/* ปุ่ม */
.cs1-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
}

.cs1-prev-btn {
  left: 10px;
}

.cs1-next-btn {
  right: 10px;
}

.cs1-nav-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* CS2-SECTION */
.cs2-section {
  width: 100%;
  position: relative;
  padding: 0;
  margin: 40px 0;
}

.cs2-link {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.cs2-full-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

/* ข้อความซ้อนบนภาพ */
.cs2-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 0px 3px 6px rgba(0, 0, 0, 0.5);
}

.cs2-text-overlay h3 {
  font-size: 2rem;
  margin: 0;
}

.cs2-text-overlay p {
  font-size: 1.2rem;
  margin-top: 5px;
}

/* CS3-SECTION */

.cs3-section {
  text-align: center;
  margin: 40px 0;
}

.cs3-grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 0 20px;
}

.cs3-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* จัดกึ่งกลางแนวนอน */
  justify-content: center;
  /* จัดกึ่งกลางแนวตั้ง */
  background: #ffffff;
  border-radius: 14px;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.12);
  transition: 0.25s;
}

.cs3-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.18);
}

/* ไอคอน/รูปด้านบน (กล่องเทาแบบตัวอย่าง) */
.cs3-icon {
  width: 100px;
  /* ลดขนาดให้กะทัดรัดขึ้น */
  height: 100px;
  background: #e6e6e6;
  border-radius: 20px;
  margin-bottom: 15px;
}

/* ข้อความ */
.cs3-text h4 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.cs3-text p {
  font-size: 0.95rem;
  color: #444;
}

/* CS4-SECTION */
.cs4-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 25px;
  margin-top: 30px;
  align-items: start;
  background: #ebebeb;
  padding: 20px;
}

/* SLIDER */
.cs4-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.cs4-slide-track {
  display: flex;
  transition: transform 0.45s ease;
}

.cs4-slide {
  min-width: 100%;
  position: relative;
}

.cs4-slide img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
}

/* ดอท */
.cs4-dots {
  text-align: center;
  margin-top: 12px;
}

.cs4-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 4px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}

.cs4-dot.active {
  background: #333;
}

/* ARTICLE */
.cs4-article h4 {
  font-size: 1.4rem;
  color: #c00000;
  margin-bottom: 10px;
}

.cs4-article p {
  font-size: 1rem;
  line-height: 1.4;
}

/* CS5-SECTION */
.cs5-section {
  text-align: center;
  margin-top: 40px;
}

.cs5-board-link {
  display: inline-block;
  text-decoration: none;
}

.cs5-board-box {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.cs5-board-box:hover {
  transform: none;
  box-shadow: none;
}

.cs5-board-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

/* FOOTER */
.footer {
  background: #fff;
  width: 100%;
  font-family: sans-serif;
  margin-top: 40px;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  /* ป้องกันล้น */
  background: #f0f0f0;
  padding: 20px;
}

.footer-logo img {
  width: 150px;
  max-width: 100%;
}

/* กล่องข้อมูลติดต่อ */
.footer-info {
  padding: 20px 30px;
  width: 100%;
  max-width: 700px;
  line-height: 1.6;
  /* ป้องกันข้อความล้น */
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 20px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 650px) {
  .cs5-board-box {
    max-width: 95%;
  }
}

@media (max-width: 850px) {
  .cs4-wrapper {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .cs4-slide img {
    height: 260px;
  }
}

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

@media (max-width: 600px) {
  .cs1-nav-btn {
    padding: 10px 12px;
    font-size: 22px;
  }

  .cs2-full-image {
    height: 200px;
  }

  .cs2-text-overlay h3 {
    font-size: 1.4rem;
  }

  .cs2-text-overlay p {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  .banner {
    flex-direction: column;
    height: 350px;
  }

  .banner-left,
  .banner-right {
    width: 100%;
    height: 220px;
  }

  .slide-btn {
    font-size: 24px;
    padding: 6px 10px;
  }

  .right-text h2 {
    font-size: 24px;
  }

  .right-text button {
    padding: 8px 20px;
    font-size: 16px;
  }
}

/* สำหรับมือถือเล็กจริง ๆ */
@media (max-width: 500px) {
  .cs3-grid {
    grid-template-columns: 1fr;
  }

  .banner-left,
  .banner-right {
    height: 180px;
  }

  .slide-btn {
    font-size: 20px;
    padding: 5px 8px;
  }

  .right-text h2 {
    font-size: 20px;
  }

  .right-text button {
    padding: 6px 16px;
    font-size: 14px;
  }
}

/* Tablet */
@media (max-width: 992px) {
  .banner {
    flex-direction: column;
    text-align: center;
  }

  .banner-art img {
    width: 280px;
    margin-top: 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    height: auto;
  }

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

  .header-search {
    width: 100%;
  }

  .search-bar {
    width: 100%;
    max-width: 100%;
  }

  .header-right {
    width: 100%;
    margin-top: 10px;
  }

  .logo {
    width: 52px;
    height: 52px;
  }

  .brand h1 {
    font-size: 18px;
    line-height: 1.2;
  }

  .brand span {
    font-size: 18px;
  }

  .login-btn {
    width: 100%;
    padding: 10px 10px;
  }

  /* Navbar */
  .nav-menu {
    display: none;
    flex-direction: column;
    background: #4a6eb3;
    padding: 10px;
    border-radius: 10px;
    position: absolute;
    top: 60px;
    width: 200px;
  }

  .nav-menu.show {
    display: flex;
    z-index: 9999;
  }

  .hamburger {
    display: block;
  }

  /* Banner */
  .banner-content h2 {
    font-size: 34px;
  }

  .banner-art img {
    width: 230px;
  }

  .cs1-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-info {
    width: 90%;
    /* ลดขนาดลงตามหน้าจอ */
    max-width: 100%;
    padding: 15px 20px;
  }

  .footer-logo img {
    width: 120px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .footer-info {
    width: 95%;
    padding: 12px 18px;
    font-size: 14px;
  }

  .footer-logo img {
    width: 100px;
  }

  .header-left .logo {
    object-fit: contain;
    width: 80px;
    height: 80px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .banner-content h2 {
    font-size: 30px;
  }

  .banner-content p {
    font-size: 15px;
  }
}
