.header {
    background-color: #af0505 !important;
}
.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;
}
  
  
  
  .box-light{
    border: aliceblue;
    border-style: solid;
    text-align: center;
    padding: 15px;
  }
  .row4{
    height: 4em;
    overflow: hidden;
  }
  .row10{
    height: 10em;
    overflow: hidden;
  }
  .row20{
    height: 35em;
    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: rgba(0, 0, 0, 0.4); /* เงาดำ */
  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: #af0505;
}
.btn-submit{
  background-color: #af0505;
  color: #f5f5f5;
}
.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;
}
.group-click {
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s ease;
}
.group-click-active {
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}


.group-click:hover {
  color: #182968;
    background-color: #d9edf78c; /* สีเมื่อ hover */
}
.subject-new{
    height: 2em;
    overflow: hidden;
}
.detail-new{
    height: 3.2em;
    overflow: hidden;
}
.my-hover-box {
    background-color: #f5f5f5; /* สีพื้นหลังปกติ */
    transition: background-color 0.3s ease; /* ให้เปลี่ยนสีลื่นๆ */
}
.btn-q{
  background: #1f4e79;
    border-block-color: #1f4e79;
    color: #fff;
}
.number {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: #F37A01;
    font-family: "Tahoma", sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    line-height: 30px;
    text-align: center;
    position: absolute;
}
.faculty-data {
    width: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    font-family: "Tahoma", sans-serif;
    font-size: 14px;
    text-align: left;
}
.btn-pdf{
  margin-top: 5px;
    background: #9f0f17;
    border-color: #9f0f17;
    color: #fff;
}