/* ฟอนต์ทั้งหมดของเว็บไซต์ */
body {
  font-family: "Sarabun", sans-serif; /* กำหนดฟอนต์หลัก */
}


@keyframes moveCharacter {
  0% {
    left: -100px;
  }
  50% {
    transform: scaleX(-1); /* กลับด้านตัวการ์ตูน */
  }
  100% {
    left: 100%;
  }
}

.visitor-count {
  font-weight: bold;
  display: flex;
  align-items: center;
}

.visitor-count i {
  margin-right: 5px;
}

/* ตัวอย่างการกำหนดฟอนต์ให้ส่วนอื่น ๆ */
.navbar,
.footer {
  font-family: "Kanit", sans-serif;
}

/* Set text color for the navbar */
.navbar {
  color: #07014e5d; /* Navy blue for all text in navbar */
  top: 0;
  z-index: 1000; /* เพื่อให้ navbar อยู่เหนือเนื้อหาภายใน */
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand .text-center {
  text-align: center; /* Center align text */
  line-height: 1.2; /* Adjust spacing between lines */
}

.navbar .navbar-brand span {
  color: #0c0247; /* Navy blue for the navbar brand text */
  font-weight: bold;
}

.navbar .nav-link {
  color: #0c0247; /* Navy blue for menu items */
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: #0056b3; /* Darker navy blue on hover */
}

.navbar .dropdown-item {
  color: #0d6efd; /* Navy blue for dropdown items */
}

.navbar .dropdown-item:hover {
  color: #0056b3; /* Darker navy blue for dropdown hover */
  background-color: #f6c020; /* Light grey background on hover */
}

.navbar-brand .thai-name {
  color: #0c0247; /* Navy blue */
  font-weight: bold;
  font-size: 1.25rem; /* Larger font size */
}

.navbar-brand .english-name {
  color: #0c0247; /* Muted grey-blue */
  font-weight: 400;
  font-size: 1rem; /* Smaller font size */
  font-style: italic; /* Italic for distinction */
}

/* Logo */
.logo {
  width: 46px;
  height: auto;
}

/* Hero Image Container */
.hero-image {
  position: relative;
  width: 100%;
  height: 88vh;
  overflow: hidden;
}

.hero-image .slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-image .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.5s ease, transform 10s ease;
}

.hero-image .slide.active {
  opacity: 1;
  transform: scale(1.1);
}

/* Overlay */
/* .hero-image .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.654);
  z-index: 1;
} */

/* เปลี่ยนฟอนต์เฉพาะ hero-image */
.hero-image h1,
.hero-image p,
.hero-image a {
  font-family: "Kanit", sans-serif; /* เปลี่ยนเป็นฟอนต์ที่ต้องการ เช่น 'Kanit' */
}

/* Add shadow effect for hero section text */
.shadow-text {
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 2); /* เพิ่มเงาให้ข้อความ */
  color: #ffffff; /* สีข้อความ (ขาว) */
}

/* เพิ่ม Animation เพื่อเพิ่มความ Smooth */
.shadow-text:hover {
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9); /* เปลี่ยนเงาเมื่อ Hover */
  transition: text-shadow 0.5s ease-in-out;
}

/* Flex container for owner image and content */
.hero-image .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  z-index: 2;
  padding: 20px;
}

.hero-image .ripple {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.994) 0%,
    rgba(255, 255, 255, 0) 80%
  );
  border-radius: 5%;
  pointer-events: none; /* หลีกเลี่ยงการรบกวนการคลิก */
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-animation 0.6s ease-out;
  opacity: 0; /* เริ่มด้วยการซ่อน */
}

/* Keyframe สำหรับการ ripple */
@keyframes ripple-animation {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Ripple Effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0); /* ลดการกระตุก */
}

.ripple-effect::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: translate3d(0, 0, 0);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

/* Owner Image - Responsive */
.owner-image img {
  max-width: 100%; /* ทำให้รูปปรับตามขนาด container */
  height: auto; /* รักษาอัตราส่วน */
  max-height: 500px; /* จำกัดขนาดสูงสุด */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* เพิ่ม Transition */
  /* สร้างเอฟเฟกต์ขอบจาง ๆ ด้านล่าง */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 0, 0) 50%,
    rgba(255, 255, 255, 1) 100%
  );
  background-size: cover;
}

.owner-image img:hover {
  transform: scale(1.05) translateY(-5px); /* ขยายและขยับขึ้นเล็กน้อย */
}

/* Owner Name */
.owner-name {
  font-size: 1.7rem; /* ขนาดของชื่อ */
  font-weight: bold;
  margin: 0;
  color: #f8f9fa; /* สีขาว */
}

/* Owner Position */
.owner-position {
  font-size: 1rem; /* ขนาดของตำแหน่ง */
  font-weight: normal;
  margin: 0;
  color: #dcdcdc; /* สีเทา */
}

/* Content on the right */
.content {
  flex: 2;
  display: flex; /* ใช้ Flexbox */
  flex-direction: column; /* จัดเรียงแนวตั้ง */
  align-items: center; /* จัดกึ่งกลางแนวตั้งในฝั่งขวา */
  justify-content: center;
  color: white;
  text-align: center; /* กึ่งกลางข้อความ */
}

.content h1,
.content p {
  margin-bottom: 15px;
}

/* Hero Logo */
.hero-logo {
  margin-bottom: 15px;
}

/* Hero Logo - Responsive */
.hero-logo-img {
  max-width: 100%; /* ทำให้โลโก้ปรับตาม container */
  height: auto; /* รักษาอัตราส่วน */
  max-height: 350px; /* จำกัดขนาดสูงสุด */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* เพิ่ม Transition */
  animation: rotateLogo3D 10s infinite;
  transform-style: preserve-3d;
  perspective: 1000px; /* มุมมอง 3D */
}

/* Keyframes สำหรับการหมุนแบบ 3D */
@keyframes rotateLogo3D {
  0% {
    transform: rotateY(0deg); /* เริ่มต้นที่การหมุน 0 องศา */
  }
  50% {
    transform: rotateY(180deg); /* หมุนไป 180 องศา */
  }
  100% {
    transform: rotateY(360deg); /* หมุนไป 360 องศา */
  }
}

.hero-logo-img:hover {
  transform: rotate(0.5deg) scale(1.1); /* ขยายเล็กน้อยพร้อมหมุน */
}

/* Popup Modal */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  visibility: hidden; /* Hide by default */
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup.show {
  visibility: visible;
  opacity: 1;
}

.popup-content {
  position: relative;
  width: 1280px;
  height: 720px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Adjust layout for smaller screens */
@media (max-width: 768px) {
  .container {
    flex-direction: column; /* เปลี่ยนการจัดเรียงเป็นแนวตั้ง */
    align-items: center; /* จัดให้ทุกอย่างอยู่กึ่งกลาง */
  }

  .content {
    order: 1; /* ให้ข้อความมาอยู่ก่อน */
    text-align: center; /* จัดข้อความให้อยู่กึ่งกลาง */
    margin-bottom: 20px;
  }

  .owner-image {
    order: 2; /* ให้รูปเจ้าของย้ายมาอยู่ล่างสุด */
    text-align: center;
    margin-top: 20px;
  }

  .owner-image img {
    max-height: 200px; /* ลดขนาดรูปเจ้าของบริษัทในหน้าจอเล็ก */
  }

  .hero-logo-img {
    max-height: 60px; /* ลดขนาดโลโก้ */
  }

  .content h1 {
    font-size: 1.75rem; /* ปรับขนาดตัวอักษรให้เล็กลง */
  }

  .content p {
    font-size: 1rem; /* ลดขนาดข้อความเพิ่มเติม */
  }

  .btn {
    font-size: 0.9rem; /* ลดขนาดปุ่ม */
    padding: 10px 20px; /* ปรับ padding ปุ่ม */
  }
}

/* Section Video */
.video-section {
  padding: 50px 0;
  background-color: #000b55;
}

.video-section .video-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-section .section-header {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.video-wrapper {
  display: flex;
  justify-content: center; /* จัดให้อยู่กึ่งกลางแนวนอน */
  align-items: center; /* จัดให้อยู่กึ่งกลางแนวตั้ง (กรณีใช้ฟีเจอร์เสริมในอนาคต) */
}

.video-wrapper iframe {
  max-width: 30%; /* รองรับการแสดงผลบนหน้าจอเล็ก */
  height: auto; /* ปรับตามสัดส่วน */
  aspect-ratio: 16 / 9; /* ป้องกันการผิดเพี้ยนของสัดส่วนวิดีโอ */
  border-radius: 8px; /* ขอบมนเล็กน้อยเพื่อความสวยงาม */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เงาเล็กน้อย */
}

/* Section 3: Blog Daily Mission */
.blog-daily-mission {
  padding: 50px 0;
  background: linear-gradient(to top, #ffffff 50%, #0d6efd 50%);
}

.blog-daily-mission .section-header h2 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
}

.blog-daily-mission .section-header p {
  font-size: 1.2rem;
  color: #6c757d;
}

/* Grid Layout */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(300px, 4fr)
  ); /* ลดขนาดให้เล็กลง */
  gap: 7px;
}

/* ปรับขนาดของแต่ละ grid-item */
.mission-grid .grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 1px; /* เพิ่มขอบมุมให้เป็นทรงโค้ง */
  transition: transform 0.3s ease-in-out;
}

/* ปรับขนาดของภาพ */
.mission-grid .grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ทำให้ภาพเต็มพื้นที่ */
  transition: transform 0.3s ease-in-out;
}

/* Content Overlay */
.grid-item .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 7px;
  background: linear-gradient(
    to top,
    rgba(0, 14, 121, 0.8) 20%,
    rgba(8, 0, 255, 0.5) 60%,
    rgba(0, 119, 255, 0) 100%
  );
  color: #ffffff;
}

.grid-item .content h4,
.grid-item .content h5 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.grid-item .content p {
  font-size: 0.8rem;
  margin-bottom: 5px;
}

.grid-item .content .btn {
  text-transform: uppercase;
  border-radius: 20px;
  transition: all 0.5s ease;
}

/* เปลี่ยนสีของปุ่มเมื่อ hover */
.mission-grid .grid-item .content .btn:hover {
  background-color: #0056b3; /* สีพื้นหลังเมื่อ hover */
  color: white; /* เปลี่ยนสีข้อความในปุ่ม */
}

/* Specific Grid Item Sizes */
.latest-mission {
  grid-column: span 2;
  grid-row: span 2;
}

.medium {
  grid-column: span 1;
  grid-row: span 2;
}

/* Overlay Content */
.mission-grid .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.7)
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grid-item:hover .overlay {
  opacity: 1;
}

/* ปรับขนาดของข้อความภายใน grid-item */
.mission-grid .grid-item .overlay h4,
.mission-grid .grid-item .overlay h5 {
  font-size: 1rem; /* ลดขนาดฟอนต์ */
}

.mission-grid .grid-item .overlay p {
  font-size: 0.875rem; /* ลดขนาดฟอนต์ */
}

/* เพิ่ม effect เมื่อ hover */
.mission-grid .grid-item:hover {
  transform: scale(1.05); /* ขยายเล็กน้อยเมื่อ hover */
}

.mission-grid .grid-item:hover img {
  transform: scale(1.1); /* ขยายภาพเล็กน้อยเมื่อ hover */
}

.overlay .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

/* เพิ่มการจัดตำแหน่งให้ปุ่มดูข่าวเพิ่มเติมอยู่ตรงกลาง */
.view-more-btn {
  text-align: center;
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mission-grid {
    grid-template-columns: 1fr;
  }

  .latest-mission,
  .medium,
  .view-more {
    grid-column: span 1;
  }
}

.executive-structure {
  background-color: #f8f9fa;
}

.executive-structure h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #0056b3;
  margin-bottom: 50px;
}

.executive-card {
  text-align: center;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 35px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.executive-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.executive-photo {
  max-width: 250px; /* กำหนดขนาดสูงสุดใหม่ */
  max-height: 250px; /* กำหนดขนาดสูงสุดใหม่ */
  border-radius: 12%; /* มุมโค้ง */
  object-fit: cover; /* รักษาสัดส่วนของรูปภาพ */
  margin-bottom: 15px; /* เว้นระยะด้านล่าง */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เพิ่มเงา */
}

.executive-name {
  font-size: 1.25rem;
  font-weight: bold;
  color: #333333;
}

.executive-title {
  font-size: 1rem;
  color: #555555;
}

.contact-section {
  background-color: #f8f9fa;
}

.contact-info-box {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-info-box i {
  color: #ff4c4c;
}

.map-container {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}
  .carousel-container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px 0;
      
    }
    /* กำหนดขนาดสูงสุดให------------------------------------------------------------------------------------------------------------------ม่ */

 .swiper {
      width: 100%;
    }

    .swiper-slide {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 15px;
      background-color: #f9f9f9;
      border: 1px solid #ddd;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .swiper-slide img {
      width: 100%;
      max-height: 200px;
      object-fit: cover;
      border-radius: 8px;
    }

    .swiper-slide h5 {
      margin: 15px 0 10px;
    }

    .swiper-slide p {
      font-size: 14px;
      color: #555;
    }

    .swiper-button-next,
    .swiper-button-prev {
      color: #007bff;
    }

    .swiper-pagination-bullet {
      background-color: #007bff;
    }
    
        /* ห------------------------------------------------------------------------------------------------------------------ม่ */

    .container.style-two {
      display: grid;
      grid-template-columns: repeat(3, 1fr); /* แบ่งเป็น 3 คอลัมน์ */
      gap: 20px; /* ช่องว่างระหว่างคอนเทนต์ */
    }
    .item {
      background-color: #ffffff;
      border: 1px solid #ddd;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      text-align: center;
      display: flex;
      flex-direction: column;
    }
    .item img {
      width: 100%;
      height: 280px;
      object-fit: cover; /* ตัดภาพให้พอดีกับพื้นที่ */
    }
    .item .text {
      padding: 15px;
      color: #333;
    }
    .item .text a {
      text-decoration: none;
      color: #4CAF50; /* สีเขียวสำหรับลิงก์ */
      font-weight: bold;
    }
    .item .text a:hover {
      text-decoration: underline;
      color: #388E3C; /* เปลี่ยนสีเมื่อชี้เมาส์ */
    }
    @media (max-width: 768px) {
      .container {
        grid-template-columns: repeat(2, 1fr); /* เปลี่ยนเป็น 2 คอลัมน์ในหน้าจอเล็ก */
      }
    }
    @media (max-width: 480px) {
      .container {
        grid-template-columns: 1fr; /* เปลี่ยนเป็น 1 คอลัมน์ในหน้าจอมือถือ */
      }
    }
    .news-container {
  width: 80%;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Main News Section */
.main-news {
  background-color: white;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.main-news img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.news-title {
  font-size: 2.5rem;
  color: #333;
  margin-top: 1rem;
}

.news-date {
  font-size: 1rem;
  color: #777;
}

.news-content {
  margin-top: 1rem;
  line-height: 1.6;
}

/* Related News Section */
.related-news {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 2rem;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.news-item {
  background-color: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.news-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.news-item h3 {
  font-size: 1.25rem;
  margin-top: 1rem;
  color: #333;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .news-container {
    width: 95%;
  }

  .main-news {
    padding: 1.5rem;
  }

  .news-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .news-gallery {
    grid-template-columns: 1fr;
  }
}
.center-content2 {
  display: flex;
  justify-content: center; /* จัดให้อยู่กลางในแนวนอน */
  align-items: center;    /* จัดให้อยู่กลางในแนวตั้ง */
  height: 30vh;          /* ให้ div ครอบคลุมความสูงทั้งหมดของจอ */
  text-align: center;     /* จัดข้อความให้อยู่กลาง */
  background-color: #0c0032; /* (ไม่บังคับ) เพิ่มพื้นหลังเพื่อดูชัดเจน */
}
.shadow-text2 {
  color: #fdf324; /* เปลี่ยนเป็นสีฟ้า */
}

.section-title3 {
  color: #0c0032; /* เปลี่ยนเป็นสีฟ้า */
  line-height: 3; /* เพิ่มระยะห่างระหว่างบรรทัด */
}
.section-title4 {
  color: #0c0032; /* เปลี่ยนเป็นสีฟ้า */
  line-height: 2; /* เพิ่มระยะห่างระหว่างบรรทัด */
}

.hero-video {
  position: relative;
  height: 80vh; /* ความสูงครึ่งหนึ่งของหน้าจอ*/
  overflow: hidden;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* ทำให้วิดีโอเต็มพื้นที่ 
  object-fit: cover; /* ครอบคลุมพื้นที่อย่างเหมาะสม */
}
@media (max-width: 768px) {
    .container.style-two {
        flex-direction: column; /* จัดเรียงแนวตั้ง */
        align-items: center; /* จัดให้อยู่ตรงกลาง */
    }

}

