/* Custom styles */
.navbar {
  background-color: #000; /* สีพื้นหลังของ Navbar */
}

.navbar-brand img {
  max-height: 40px; /* ความสูงของโลโก้ */
}

.navbar-nav {
  margin-left: auto; /* ย้ายเมนูไปไว้ทางขวา */
  display: flex;
  justify-content: space-between; /* จัดเรียงวัตถุใน Navbar ให้มีช่องว่างระหว่างสองส่วนเท่ากัน */
  align-items: center; /* จัดเรียงวัตถุใน Navbar ให้กึ่งกลางตามแนวดิ่ง */
}

.navbar-nav .nav-link {
  color: #ffffff; /* สีของข้อความในเมนู */
}

.dropdown-menu {
  background-color: #0e549a; /* สีพื้นหลังของเมนูแบบ dropdown */
}

.dropdown-menu .dropdown-item {
  color: #ffffff; /* สีของข้อความในเมนู */
}

.dropdown-menu .dropdown-item:hover {
  background-color: #000; /* เมื่อชี้หรือ hover เมนู */
  color: #fff; /* สีของข้อความเมื่อชี้หรือ hover เมนู */
}

/* Custom styles */
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu {
  display: none;
}

.text-center {
  margin-top: 20px; /* เพิ่มระยะห่างด้านบน */
}

@media (max-width: 768px) {
  .navbar-nav {
    /* ใช้ display: flex; เพื่อให้เมนูแสดงเมื่อเปิดในโหมดมือถือ */
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background-color: #343a40;
    /* เพิ่ม padding เพื่อให้เมนูไม่ติดกับด้านบน */
    padding-top: 10px;
  }

  .navbar-nav .nav-item {
    text-align: center; /* จัดข้อความในเมนูตรงกลาง */
  }
}

/* Custom styles for video */
#myVideo {
  width: 100%;
  height: calc(80vh - 56px); /* 56px คือความสูงของ Navbar */
  object-fit: cover;
}

/* Custom styles */
@media (max-width: 576px) {
  .text-center h2 {
    font-size: 1.5rem; /* ขนาดฟอนต์เมื่อเป็นมือถือขนาดเล็ก */
  }
}
/* CSS for overlay */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
}

.overlay:hover {
  opacity: 1;
}

.text {
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.img-fluid {
  border-radius: 15px;
}
.image-container {
    position: relative;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* สีดำจางๆ */
    color: white; /* สีข้อความขาว */
    padding: 10px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*background-color: rgba(0, 0, 0, 0.5); /* สีพื้นหลัง */
  color: #ffffff; /* สีข้อความ */
  padding: 10px;
  border-radius: 5px; /* รูปทรงขอบ */
}

.text-overlay p {
  margin: 5px 0;
  font-weight: bold;
  font-size: 18px; /* ขนาดตัวอักษร */
}

.text-overlay .text-center p {
  color: white;
  font-weight: bold;
  font-size: 18px; /* ปรับขนาดตามต้องการ */
}

.text-overlay .text-center p:last-child {
  background-color: black;
  padding: 5px 10px; /* ปรับขนาดของกรอบตามต้องการ */
  border-radius: 5px; /* ปรับขนาดของขอบกรอบตามต้องการ */
}
.text-overlay .text-center p:last-child a {
  color: white;
  text-decoration: none; /* เอา underline ออก */
}

.text-overlay .text-center p:last-child a:hover {
  color: yellow; /* เปลี่ยนสีเมื่อเม้าส์ hover ที่ลิงค์ */
}

#floating-icon {
    position: fixed;
    padding-right: 15px;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

#floating-icon img {
  display: block; /* ตั้งให้รูปภาพแสดงเป็นบล็อก (block element) เพื่อให้แสดงในแนวตั้ง */
    margin-bottom: 5px; /* ช่องว่างด้านล่างของรูปภาพ */
}
