.btn-default{
    color: #000000 !important;
    background: #ffff;
    border: 0;
    padding: 10px 30px;
    transition: 0.4s;
    border-radius: 0px;
}
.box{
    min-height: 400px;
    position: relative;
    display: flex;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 20px;
    padding: 20px;
}
swiper-container {
    width: 100%;
    height: 100%;
  }

  swiper-slide {
    background-position: center;
    background-size: cover;
  }

  swiper-slide img {
    display: block;
    width: 100%;
  }
  #yourElement {
    position: relative; /* เพิ่ม position เพื่อให้ pseudo-element ::before ทำงานได้ */
    background-size: cover; /* ให้ภาพพื้นหลังเต็มพื้นที่ */
    background-position: center;
    background-repeat: no-repeat;
    transition: background-color 0.3s ease; /* การเปลี่ยนแปลงพื้นหลังเมื่อ hover */
  }
  
  #yourElement:before {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    content: "";
    background: linear-gradient(to bottom, #111111 0%, #000 77%); /* พื้นหลังมืด */
    z-index: 1; /* อยู่ด้านบนของพื้นหลัง */
    opacity: .5; /* ความมืดของพื้นหลัง */
    transition: opacity 0.3s ease; /* ทำให้การเปลี่ยนแปลง opacity ราบรื่นเมื่อ hover */
  }
  
  #yourElement h1 {
    position: relative; /* ทำให้ข้อความอยู่ด้านบนสุด */
    z-index: 2; /* ให้ข้อความอยู่เหนือ pseudo-element */
    text-align: center; /* จัดตำแหน่งข้อความในแนวนอนให้เป็นกลาง */
  }
  
  #yourElement:hover {
    background-color: transparent; /* เอาความมืดออกเมื่อ hover */
  }
  
  #yourElement:hover:before {
    opacity: 0; /* ทำให้พื้นหลังมืด (ที่สร้างจาก ::before) หายไปเมื่อ hover */
  }
  .badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
}
.badge-success {
  color: #fff;
  background-color: #284aa7;
}
.badge-danger {
  color: #fff;
  background-color: #a72828;
}
  /* บล็อกใหญ่ */
.row.box {
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 30px 15px;
    margin-bottom: 20px;
    transition: background-image 0.3s ease;
    position: relative; /* เพื่อให้กล่องเล็ก absolute ได้ */
}

/* กล่องเล็ก container */
.small-box-container {
    position: absolute;
    bottom: 20px; /* ปรับตำแหน่งตามต้องการ */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* กล่องเล็ก */
.box-light {
    background-color: rgba(255,255,255,0.2);
    /* border-radius: 10px; */
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.h4-active{
  color: #00122e;
}
/* กล่องเล็ก active */
.group-click.group-click-active .box-light {
    background-color: #ffffff !important;
    color: #252525 !important;
}

  .row4{
     display: -webkit-box;
    -webkit-line-clamp: 4;  /* จำนวนบรรทัด */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #777777;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
  }
  .row10{
    height: 10em;
    overflow: hidden;
  }
  .row20{
    height: 32em;
    padding-top: 220px;
    overflow: hidden;
  }

.image-hover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
}

.image-hover .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgb(0 0 0 / 78%);/* เงาดำ */
  transition: 0.3s ease; /* ทำให้จางลงนุ่มนวล */
}

.image-hover:hover .overlay {
  background: rgba(0, 0, 0, 0); /* เงาหายเมื่อ hover */
}

.image-hover h1 {
  position: relative;
  z-index: 1; /* ให้ h1 อยู่บนสุด */
}
h1, h2, h3, h4, h5, h6 {
  color: #182968;
}
.slide-box {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 1px;
  overflow: hidden;
}

.slide-box .overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  color: white;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.fixed-img {
  width: 100%;
  height: 370px;
  object-fit: cover;
  border-radius: 5px;
}
.toregion.active {
  background-color: #00122e; /* Bootstrap primary */
  color: white;
  border-color: #00122e;
  border-radius: 0px;
}

.subject-new{
    height: 2.5em;
    overflow: hidden;
}
.detail-new{
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* จำนวนบรรทัด */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.my-hover-box {
    background-color: #f5f5f5; /* สีพื้นหลังปกติ */
    transition: background-color 0.3s ease; /* ให้เปลี่ยนสีลื่นๆ */
}
