
.niramit-extralight {
  font-family: "Niramit", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.niramit-light {
  font-family: "Niramit", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.niramit-regular {
  font-family: "Niramit", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.niramit-medium {
  font-family: "Niramit", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.niramit-semibold {
  font-family: "Niramit", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.niramit-bold {
  font-family: "Niramit", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.niramit-extralight-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 200;
  font-style: italic;
}

.niramit-light-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.niramit-regular-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.niramit-medium-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.niramit-semibold-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 600;
  font-style: italic;
}

.niramit-bold-italic {
  font-family: "Niramit", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.social-icon-yellow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffc107;
  color: #fff;
  border: 2px solid #e0a800;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 20px; /* ขนาดไอคอนเท่ากันทุกตัว */
  vertical-align: middle;
}

.brand-text {
  height: 40px;
  line-height: 0.2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.brand-text div {
  width: 100%;
  height: 100%;
  font-size: clamp(0.2rem, 1.2vw, 1.05rem); /* ขนาดปรับตามพื้นที่ */
}

.social-icon-yellow i {
  line-height: 1;
  display: block;
}

.smaller-text {
  font-size: 0.75rem;
  color: #800000;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: visible; /* ชั่วคราว */
  padding-right: 1ch; /* เว้นที่ขวานิดหน่อย */
  padding-left: 1ch;  /* เว้นที่ซ้ายนิดหน่อย */
  min-width: max-content;
}
.smaller-text-2 {
  font-size: 0.75rem;
  color: #8c8b8b;
  display: inline-flex;
  align-items: center;
}
.ms-2.border-start {
  display: inline-flex;   /* หรือ inline-block */
  align-items: center;   /* ให้ข้อความแนวตั้งตรงกลาง */
  height: auto;          /* หรือกำหนดความสูงตามต้องการ */
}
@keyframes typing {
  from { width: 0; }
  to { width: 20ch; } /* กว้างพอดีกับข้อความและสระ */
}


  .bg-nav-gradient-red {
    background: linear-gradient(90deg,rgb(208, 57, 2) 0%, rgb(153, 20, 2) 100%);
    color: white;
    padding: 0.2rem;
  }

  .bg-nav-gradient-blue {
    background: linear-gradient(90deg,rgb(58, 183, 251) 0%, rgba(63, 94, 251, 1) 100%);
    color: white;
    padding: 0.5rem;
  }

    .bg-foot-gradient-blue {
    background: linear-gradient(90deg, rgba(63, 94, 251, 1) 0%,  rgb(58, 183, 251) 100%);
    color: white;
    padding: 0.5rem;
  }

  .bg-gradient-blue {
    background: linear-gradient(90deg,rgba(63, 94, 251, 1) 0%, rgb(58, 183, 251) 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
  }

    .bg-gradient-blues {
    background: linear-gradient(90deg,rgb(58, 183, 251) 0%, rgba(63, 94, 251, 1) 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
  }

      .bg-gradient-red {
    background: linear-gradient(90deg,rgb(146, 1, 23) 0%, rgb(245, 107, 114) 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
  }

      .bg-gradient-reds {
    background: linear-gradient(90deg, rgb(245, 107, 114) 0%,  rgb(146, 1, 23) 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
  }

        .bg-gradient-purple {
    background: linear-gradient(90deg, rgb(150, 12, 237) 0%,  rgb(92, 105, 250) 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
  }



    .bg-gradient-redxx {
    background: linear-gradient(135deg, #c62828, #e53935, #ff5252);
    color: white;
    padding: 0.5em 0.75em;
    border-radius: 999px;
    font-weight: bold;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.4);
    display: inline-block;
  }

  .bounce-effect {
    animation: bounce 1.5s infinite;
  }

  @keyframes bounce {
    0%, 100% {
      transform: translateY(0);
    }
    30% {
      transform: translateY(-8px);
    }
    50% {
      transform: translateY(0);
    }
    70% {
      transform: translateY(-4px);
    }
  }

    .navbar-bordered {
    border-bottom: 5px solid #ffffff66; /* สีขาวโปร่งบาง */
  }
  

.hover-highlight {
  position: relative;
  color: #333;
  background-color: transparent;
  padding: 5px 8px;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-block;
  overflow: hidden; 
}

.hover-highlight:hover {
  color: #fbfabb;
  background-color: #f5c238;
  box-shadow: 0 0 10px rgba(245, 194, 56, 0.6);
  transform: scale(1.01);
}

/* ::before สำหรับสร้างแสงวิงวับ */
.hover-highlight:hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  transform: skewX(-20deg);
  animation: shine 1.2s ease-in-out forwards;
}

/* Keyframe สำหรับแสงวิงวับ */
@keyframes shine {
  to {
    left: 125%;
  }
}
  

  @keyframes slideBounce {
  0%   { transform: translateY(0); opacity: 0; }
  30%  { transform: translateY(-10px); opacity: 1; }
  60%  { transform: translateY(5px); }
  100% { transform: translateY(0); }
}

.hover-highlight.active {
  color: #fbfabb; /* สีเดียวกับ hover */
  background-color: #f5c238;
  padding: 5px 8px;
  border-radius: 5px;
  transition: 0.3s ease;
    /* ขอบดำรอบตัวอักษร */
  text-shadow: 0.5px 0.5px 1px #696969;
}

.animate-bounce-once {
  animation: slideBounce 1.2s ease-out;
  animation-fill-mode: forwards;
}

@keyframes slideInLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 1s ease-out forwards;
}

.glow-border {
  padding: 5px;
  border-radius: 10px;
  animation: glow 2s linear infinite;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px 2px yellow;
  }
  25% {
    box-shadow: 0 0 10px 4px gold;
  }
  50% {
    box-shadow: 0 0 15px 6px orange;
  }
  75% {
    box-shadow: 0 0 10px 4px gold;
  }
  100% {
    box-shadow: 0 0 5px 2px yellow;
  }
}

.glow-frame {
  position: relative;
  display: inline-block;
}

.glow-frame::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
  background: none;
}

.glow-frame::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(90deg, yellow, orange, yellow) border-box;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0) border-box;
  mask-composite: exclude;
  -webkit-mask-composite: destination-out;
  animation: border-glow 3s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes border-glow {
  0% {
    mask-position: 0% 0%;
  }
  100% {
    mask-position: 400% 0%;
  }
}

.glow-framexx {
  position: relative;
  display: inline-block;
  padding: 20px; /* เพิ่มพื้นที่รอบเนื้อหา */
}

.glow-framexx::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
  background: none;
}

.glow-framexx::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 12px;
  border: 5px solid transparent;
  background: linear-gradient(90deg, yellow, orange, yellow) border-box;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0) border-box;
  mask-composite: exclude;
  -webkit-mask-composite: destination-out;
  animation: border-glow 3s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes border-glow {
  0% {
    mask-position: 0% 0%;
  }
  100% {
    mask-position: 400% 0%;
  }
}

.shimmer-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* แถบแสง */
.shimmer-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  z-index: 2;
}

/* ทำให้แสงวิ่งตอน hover */
.shimmer-btn:hover::before {
  animation: shimmer 1s linear forwards;
}

@keyframes shimmer {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

.card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.00);
}

/* ขอบแสงวิ่ง */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  padding: 3px; /* ความหนาขอบ */
  background: linear-gradient(
    130deg,
    #f5c238,
    #ffffff,
    #f5c238,
    #f06292,
    #64b5f6,
    #f5c238
  );
  background-size: 300% 300%;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: borderShine 4s linear infinite;
}

.card:hover::before {
  opacity: 1;
}

/* ให้เนื้อหาการ์ดอยู่ด้านบน */
.card > * {
  position: relative;
  z-index: 2;
}

/* แอนิเมชันแสงวิ่ง */
@keyframes borderShine {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

  .social-icon {
    transition: transform 0.4s ease;
    display: inline-block;
  }

  .social-icon:hover {
    transform: rotate(360deg);
  }

    .card-header.gradient-border-bottom {
    border-bottom: 4px solid;
    border-image: linear-gradient(to right, #f9d423 , #bb171a) 1; /* ไล่เฉดแดง-เหลือง */
  }

  .no-underline {
  text-decoration: none;
}

.boxed-heading-red {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid #800000;
  border-radius: 10px;
  background-color: #f9dada;
  color: #800000;
  font-weight: bold;
}

    .navbar-top {
      background-color: #343a40;
      color: white;
      padding: 1rem;
    }

    /* เริ่มต้น navbar-bottom อยู่ใน flow ปกติ */
    .navbar-bottom {
      position: static; /* ปกติ */
      background-color: #6c757d;
      color: white;
      padding: 1rem;
      width: 100%;
      transition: top 0.4s ease, position 0.4s ease;
      /* top: 0; */
      z-index: 1030;
    }

    /* เมื่อ scroll เกิน 100px ให้เป็น fixed และเลื่อนจากบนลงมานุ่มนวล */
.navbar-bottom.fixed {
  position: fixed;
  top: -70px;
  left: 0;
  animation: slideDown 0.5s forwards;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: none; /* ปิด transition top เพราะ animation คุมอยู่แล้ว */
}

    @keyframes slideDown {
      from {
        top: -70px;
      }
      to {
        top: 0px;
      }
    }

/* Dropdown menu */
#dropdownMenuList {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: block;
  pointer-events: none;
}

#dropdown-menu-wrapper.show #dropdownMenuList {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#dropdownMenuList .dropdown-item:hover {
  background-color: #ffd54f;
  color: #000;
  transition: background-color 0.3s ease;
}

#dropdownMenuList .dropdown-item.selected {
  background-color: #ffca28;
  color: #000;
  font-weight: 600;
  position: relative;
}

#dropdownMenuList .dropdown-item.selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  font-weight: bold;
  color: green;
}

/* ปรับ dropdown ให้เต็มจอ */
.custom-dropdown {
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  max-width: none;
  padding: 50rem 2rem;
  border: none;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.custom-dropdown .full-bg {
  position: absolute;

  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(191, 190, 190, 0.7); /* สีเทาโปร่งใส */
  z-index: 0;
  border-radius: 0.5rem; /* ถ้าต้องการขอบมน */
}


.custom-dropdown .container {
  position: relative;
  z-index: 1; /* ให้อยู่เหนือพื้นหลัง */
}


.eservice-btn {
  transition: 0.3s;
  border-radius: 4rem;
  padding: 1rem;
  /* background-color: #fffefe; */
  /* border: 2px solid #a30a21; */
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.eservice-btn:hover {
  transform: translateY(-10px);
}


.eservice-icon {
  font-size: 2rem;
  width: 70px;
  height: 70px;
  color: #a30a21;
  background-color: #ffd700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  margin-bottom: 1rem;
}

    .eservice-btn:hover .switch-text-th {
  transform: translateY(-3rem);
}

.eservice-btn:hover .switch-text-en {
  transform: translateY(-3rem);
}

.text-switcher {
  height: 3.5em;
}
.switch-text-th,
.switch-text-en {
  line-height: 1.2;
}

    .my-divider {
      border: none;
      height: 5px;
      background: linear-gradient(90deg, rgb(246, 189, 3), rgb(236, 3, 3), rgb(246, 154, 154));
      margin: 30px 0;
      border-radius: 15px;
      width: 100%;
      margin-left: auto;
      margin-right: auto;
    }

.nav-link {
  position: relative;
  color: #000;
  text-decoration: none;
  padding-bottom: 15px; /* ช่วยเว้นระยะห่างจากตัวหนังสือ */
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0; /* คงไว้ */
  width: 0;
  height: 2px;
  background-color: #f79605;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 85%;
}

.nav-link.active::after {
  width: 95%;
}
.nav-link.active {
  color: #f9ad07;
  font-weight: 600; /* หรือ 500 ก็ได้ แล้วแต่ความหนาที่ต้องการ */
}
