html,
body {
  font-size: 1rem;
  scroll-behavior: smooth !important;
}

:root { 
  --background-color: #ffffff;
  --default-color: #014198; 
  --heading-color: #014198; 
  --orange-color: #F57B23;
  --blue-color: #DBF2FA; 
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
  --accent-color: #014198;
}
:root {
  --nav-color: #014198;  /* The default color of the main navmenu links */
  --nav-hover-color: #F57B23; /* Applied to main navmenu links when they are hovered over or active */
  --nav-mobile-background-color: #ffffff; /* Used as the background color for mobile navigation menu */
  --nav-dropdown-background-color: #ffffff; /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
  --nav-dropdown-color: #014198; /* Used for navigation links of the dropdown items in the navigation menu. */
  --nav-dropdown-hover-color: #F57B23; /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

html,
body {
  height: 100%;
  color:var(--default-color);
}


/*General*/
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}
.container-smooth {
  max-width: 1320px;
}
.fd-normal {
  font-family: SukhumvitSet-light;
}
.fd-bold {
  font-family: SukhumvitSet-bold;
}
.text-default {
  color: var(--default-color)!important;
}
.main {
  height:100%;
}
.under-navbar {
  margin-top:60px;
}
.bg-gray {
  background-color: #faf9fb;
}
.bg-blue {
  background-color: #DBF2FA!important;
}
.bg-page {
  background-color: #F7F9FC;
}
.multiselect + .btn-group,
.multiselect + .btn-group * {
  font-family: inherit !important;
  font-weight: 400 !important;
}
.bg-light-blue {
  background-color: #f8fbff;
}
.hover-light-blue:hover {
  background-color: #f8fbff;
}
.bg-dark-blue {
  background-color:#014198!important;
}
.text-orange {
  color: var(--orange-color);
}
.text-gray {
  color: #606060;
}
.btn-magniify {
  transition: transform 0.2s ease-in-out;
}
.hover-orange {
  transition: color 0.2s ease;
}

.hover-orange:hover {
  color: var(--orange-color);
}
.hover-boder-orange {
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: transform 200ms ease;
}
.hover-boder-orange:hover {
  border: 1px solid  var(--orange-color)!important;
  transform: scale(1.02);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.btn-magniify:hover {
  transform: scale(1.02);
}

.btn-underline {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.btn-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0; /* อยู่ล่างสุดของกล่อง */
  height: 3px;
  background-color: var(--orange-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease-in-out;
}
.btn-underline:hover::after {
  transform: scaleX(1); /* แสดงขีดเต็ม */
}

.btn-orange {
  color: #fff;
  background-color: var(--orange-color);
  border-color: var(--orange-color);
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s;
}

.btn-orange:hover {
  background-color: color-mix(in srgb, var(--orange-color), transparent 20%);
  border-color: var(--orange-color);
  color: #fff;
}

.btn-orange:focus,
.btn-orange:active {
  background-color: var(--orange-color)!important;
  border-color: var(--orange-color)!important;
  color: #fff!important;
}

.btn-outline-orange {
  color: var(--orange-color);
  background-color: transparent;
  border: 1px solid var(--orange-color);
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s;
}

.btn-outline-orange:hover {
  background-color: color-mix(in srgb, var(--orange-color), transparent 95%)!important;
  color: var(--orange-color)!important;
  border: 1px solid var(--orange-color)!important;
}

.btn-outline-orange:focus,
.btn-outline-orange:active {
  background-color: color-mix(in srgb, var(--orange-color), transparent 90%)!important;
}

.btn-outline-default {
  border: 1px solid #014198;
  color: #014198;
  transition: background-color 0.3s ease;
}
.btn-outline-default:hover {
  border: 1px solid #014198;
  background-color: #eef7fa;
  color: #014198;
  text-decoration: none;
}

.btn-icon-outline-default {
  width: 50px;
  height: 50px;
  border: 1px solid #014198;
  color: #014198;
  transition: background-color 0.3s ease;
}
.btn-icon-outline-default:hover {
  border: 1px solid #014198;
  background-color: #f3f3f3;
  color: #014198;
  text-decoration: none;
}

.centered-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  bottom:auto;
  right:auto;
}

.breadcrumb a {
  text-decoration: none;
}
.breadcrumb-item.active {
  color: var(--orange-color);
}

.vintage-frame {
  background: #fff;
  border: 3px solid #fff;
  box-shadow:
    4px 4px 15px rgba(0, 0, 0, 0.15); /* เงา */
  border-radius: 12px;
}

.img-hover-up {
  transition: transform 0.3s ease;
  transform-origin: bottom center; /* ให้ขยายจากด้านล่าง */
}

.img-hover-up:hover {
  transform: scale(1.05); /* ขยายเล็กน้อย */
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */

.navmenu {
  padding: 0;
}

.navmenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navmenu li {
  position: relative;
}

.navmenu>ul>li {
  white-space: nowrap;
  padding: 15px 14px;
}

.navmenu>ul>li:last-child {
  padding-right: 0;
}

.navmenu a,
.navmenu a:focus {
  color: var(--nav-color);
  font-size: 15px;
  padding: 0 2px;
  font-family: var(--nav-font);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  transition: 0.3s;
  position: relative;
  text-decoration: none;
}

.navmenu a i,
.navmenu a:focus i {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
  transition: 0.3s;
}

.navmenu>ul>li>a:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -6px;
  left: 0;
  background-color: #F57B23;
  visibility: hidden;
  width: 0px;
  transition: all 0.3s ease-in-out 0s;
}

.navmenu a:hover:before,
.navmenu li:hover>a:before,
.navmenu .active:before {
  visibility: visible;
  width: 100%;
}

.navmenu li:hover>a,
.navmenu .active,
.navmenu .active:focus {
  color: var(--nav-hover-color);
}

.navmenu .dropdown ul {
  margin: 0;
  padding: 10px 0;
  background: var(--nav-dropdown-background-color);
  display: block;
  position: absolute;
  visibility: hidden;
  left: 14px;
  top: 130%;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  border-radius: 4px;
  z-index: 99;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
}

.navmenu .dropdown ul li {
  min-width: 200px;
}

.navmenu .dropdown ul a {
  padding: 10px 20px;
  font-size: 15px;
  text-transform: none;
  color: var(--nav-dropdown-color);
}

.navmenu .dropdown ul a i {
  font-size: 12px;
}

.navmenu .dropdown ul a:hover,
.navmenu .dropdown ul .active:hover,
.navmenu .dropdown ul li:hover>a {
  color: var(--nav-dropdown-hover-color);
}

.navmenu .dropdown:hover>ul {
  opacity: 1;
  top: 100%;
  visibility: visible;
  pointer-events: auto;
}

.navmenu .dropdown .dropdown ul {
  top: 0;
  left: -90%;
  visibility: hidden;
}

.navmenu .dropdown .dropdown:hover>ul {
  opacity: 1;
  top: 0;
  left: -220px;
  visibility: visible;
  pointer-events: auto;
}

/*--------------------------------------------------------------
# Left Navbar Menu with Orange Hover Line
--------------------------------------------------------------*/
.left-navbar-nav .nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--default-color);
  position: relative;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* เส้นส้มสำหรับเมนูธรรมดา (ไม่มี dropdown) */
.left-navbar-nav .nav-link:not(.dropdown-toggle)::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 0;
  width: 2.5px;
  height: 80%;
  background-color: var(--orange-color);
  border-radius: 10px;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

/* เส้นส้มสำหรับ dropdown-toggle ใช้ ::before เพื่อไม่ทับ caret */
.left-navbar-nav .dropdown-toggle::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 0;
  width: 2.5px;
  height: 80%;
  background-color: var(--orange-color);
  border-radius: 10px;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

/* Hover / Active */
.left-navbar-nav .nav-link:hover::after,
.left-navbar-nav .nav-link.active::after,
.left-navbar-nav .dropdown-toggle:hover::before,
.left-navbar-nav .dropdown-toggle.active::before {
  transform: scaleY(1);
  opacity: 1;
}

.left-navbar-nav .nav-link:hover,
.left-navbar-nav .nav-link.active {
  color: #e85c00;
}

/* dropdown-item */
.left-navbar-nav .dropdown-menu .dropdown-item {
  position: relative;
  padding-left: 1.25rem;
  transition: color 0.3s ease;
}

.left-navbar-nav .dropdown-menu .dropdown-item::after {
  content: "";
  position: absolute;
  top: 20%;
  left: 0;
  width: 2px;
  height: 60%;
  background-color: var(--orange-color);
  border-radius: 10px;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

.left-navbar-nav .dropdown-menu .dropdown-item:hover::after,
.left-navbar-nav .dropdown-menu .dropdown-item.active::after {
  transform: scaleY(1);
  opacity: 1;
}

.left-navbar-nav .dropdown-menu .dropdown-item:hover,
.left-navbar-nav .dropdown-menu .dropdown-item.active {
  color: #e85c00;
}


/*--------------------------------------------------------------
# Sidebar Menu with Orange Hover Line
--------------------------------------------------------------*/
.right-navbar-nav .nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--default-color);
  position: relative;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* เส้นส้มด้านข้าง */
.right-navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 0;
  width: 2.5px;
  height: 80%;
  background-color: var(--orange-color);
  border-radius: 10px;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

/* Hover หรือ Active ให้แสดงเส้นส้ม */
.right-navbar-nav .nav-link:hover::after,
.right-navbar-nav .nav-link.active::after {
  transform: scaleY(1);
  opacity: 1;
}

/* Hover หรือ Active เปลี่ยนสีตัวอักษร */
.right-navbar-nav .nav-link:hover,
.right-navbar-nav .nav-link.active {
  color: #e85c00;
}

/*--------------------------------------------------------------
# Scrollspy Menu
--------------------------------------------------------------*/
/* Default: ไม่ใช้งาน sticky */
.sticky-sidebar {
  position: static;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  margin-bottom: 60px;
}

/* เฉพาะจอขนาด lg ขึ้นไป (≥992px) ใช้ sticky */
@media (min-width: 992px) {
  .sticky-sidebar {
    position: sticky;
    top: 75px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 15px;
  }
}

.scrollspy-menu {
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.scrollspy-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--default-color);
  border-radius: 8px;
  position: relative;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.scrollspy-menu a::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 0;
  width: 2.5px;
  height: 80%;
  background-color: var(--orange-color);
  border-radius: 10px;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
}

.scrollspy-menu a:hover::after,
.scrollspy-menu a.active::after {
  transform: scaleY(1);
  opacity: 1;
}
.scrollspy-menu a:hover,
.scrollspy-menu a.active {
  color: #e85c00;
}


.scrollspy-menu a:hover::after,
.scrollspy-menu a.active::after {
  background-color: var(--orange-color);
}
/*--------------------------------------------------------------
# Global Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  padding-bottom: 20px;
  position: relative;
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--orange-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.section-title p {
  margin-top:40px;
}


/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
  color: var(--default-color);
  background-color: #fff;
  font-size: 14px;
  padding-bottom: 50px;
  position: relative;
}

.footer .footer-newsletter {
  background-color: color-mix(in srgb, var(--heading-color), transparent 95%);
  padding: 50px 0;
}

.footer .footer-newsletter h4 {
  font-size: 24px;
}

.footer .footer-newsletter .newsletter-form {
  margin-top: 30px;
  margin-bottom: 15px;
  padding: 6px 8px;
  position: relative;
  background-color: color-mix(in srgb, var(--background-color), transparent 50%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  box-shadow: 0px 2px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  transition: 0.3s;
  border-radius: 50px;
}

.footer .footer-newsletter .newsletter-form:focus-within {
  border-color: var(--accent-color);
}

.footer .footer-newsletter .newsletter-form input[type=email] {
  border: 0;
  padding: 4px;
  width: 100%;
  background-color: color-mix(in srgb, var(--background-color), transparent 50%);
  color: var(--default-color);
}

.footer .footer-newsletter .newsletter-form input[type=email]:focus-visible {
  outline: none;
}

.footer .footer-newsletter .newsletter-form input[type=submit] {
  border: 0;
  font-size: 16px;
  padding: 0 20px;
  margin: -7px -8px -7px 0;
  background: var(--accent-color);
  color: var(--contrast-color);
  transition: 0.3s;
  border-radius: 50px;
}

.footer .footer-newsletter .newsletter-form input[type=submit]:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.footer .footer-top {
  padding-top: 50px;
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-right: 10px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  color: var(--orange-color);
  border-color: var(--orange-color);
}

.footer h4 {
  font-size: 16px;
  font-weight: bold;
  position: relative;
  padding-bottom: 12px;
}

.footer .footer-links {
  margin-bottom: 30px;
}

.footer .footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer .footer-links ul i {
  margin-right: 3px;
  font-size: 12px;
  line-height: 0;
}

.footer .footer-links ul li {
  padding: 10px 0;
  display: flex;
  align-items: center;
}

.footer .footer-links ul li:first-child {
  padding-top: 0;
}

.footer .footer-links ul a {
  display: inline-block;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  line-height: 1;
}

.footer .footer-links ul a:hover {
  color: var(--orange-color);
}

.footer .footer-about a {
  color: var(--heading-color);
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--heading-font);
}

.footer .footer-contact p {
  margin-bottom: 5px;
}

.footer .copyright {
  padding-top: 25px;
  padding-bottom: 25px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .credits {
  margin-top: 6px;
  font-size: 13px;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid #ffffff;
  border-color: var(--orange-color) transparent var(--orange-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1.5s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--orange-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--orange-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/*--------------------------------------------------------------
# YouTube thumbnail
--------------------------------------------------------------*/
.youtube-placeholder {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.youtube-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--contrast-color);
  background-color: var(--accent-color);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none; /* ป้องกันคลิกโดนก่อน hover */
}

.youtube-placeholder:hover .youtube-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
  pointer-events: auto;
}

/* สำหรับหน้าจอเล็กกว่า md */
@media (max-width: 992px) {
  .main-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .main-card {
      flex-direction: column;   /* stack แนวตั้ง */
      width: 100%;             /* เต็ม container */
      max-width: 100%;         /* ไม่จำกัด */
      padding: 0;              /* เอาพื้นที่ภายในออก */
      margin: 0;               /* เอา margin ถ้ามี */
      border: none;            /* เอา border ออก */
      border-radius: 0;        /* เอาโค้งมุมออก */
      box-shadow: none;        /* เอาเงาออก ถ้ามี */
      border-radius: 0px!important;
  }

  .main-card-menu {
      width: 100%; /* ให้เต็มความกว้าง */
      margin-bottom: 1rem; /* เว้นระยะจาก content */
  }

  .main-card-content {
      width: 100%; /* เต็มความกว้าง */
      padding-left: 0;
      padding-right: 0;
  }
}

.countdown-wrapper {
  margin-bottom: 48px;
}

.countdown-wrapper .countdown {
  gap: 24px;
}

@media (max-width: 576px) {
  .countdown-wrapper .countdown {
    gap: 16px;
  }
}

.countdown-wrapper .countdown>div {
  background: color-mix(in srgb, var(--surface-color), transparent 10%);
  backdrop-filter: blur(10px);
  border: 2px solid color-mix(in srgb, var(--accent-color), transparent 85%);
  border-radius: 16px;
  padding: 20px 16px;
  min-width: 80px;
}

@media (max-width: 576px) {
  .countdown-wrapper .countdown>div {
    padding: 16px 12px;
    min-width: 70px;
  }
}

.countdown-wrapper .countdown>div h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
  font-family: var(--heading-font);
}

@media (max-width: 576px) {
  .countdown-wrapper .countdown>div h3 {
    font-size: 2rem;
  }
}

.countdown-wrapper .countdown>div h4 {
  font-size: 12px;
  font-weight: 500;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

#progressbar {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
  padding: 0;
  list-style: none;
}

/* step */
#progressbar li {
  flex: 1;
  text-align: center;
  position: relative;
  color: #999;
  font-weight: 500;
}

/* วงกลม */
#progressbar li .circle {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ccc;
  z-index: 1;
  position: relative;
}

/* เส้นเชื่อมซ้าย (เริ่มจาก step 2 เป็นต้นไป) */
#progressbar li::before {
  content: "";
  position: absolute;
  top: 22px;          /* กึ่งกลางวงกลม */
  left: -50%;         /* เริ่มจากกลาง step ก่อนหน้า */
  width: 100%;        /* ยาวถึงกลาง step นี้ */
  height: 2px;
  background: #e0e0e0;
  z-index: 0;
}

#progressbar li:first-child::before {
  content: none; /* step แรกไม่มีเส้นซ้าย */
}

/* ========== ACTIVE ========== */
/* วงกลม */
#progressbar li.active .circle {
  border-color: var(--orange-color);
  background: var(--orange-color);
  color: #fff;
}
#progressbar li.active {
  color: var(--orange-color);
  font-weight: 600;
}

/* เส้นซ้ายกลายเป็นฟ้าเฉพาะตอน step นี้ active */
#progressbar li.active::before {
  background: var(--orange-color);
}


.table-container table {
 font-size: 14px;
 margin-bottom:10px;
 overflow-x:auto;
}
.rgt_searchbar {
  background-color: #f8fbff;
}
.table td, .table th {
  color: var(--accent-color);
}
/* จับเฉพาะ table-striped ที่เราต้องการ */
.table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-bg-type: #f8fbff;
}
.table-hover>tbody>tr:hover>* {
  --bs-table-bg-state: #DBF2FA;
}

.hover-icon-box i {
  font-size: 2rem;        /* ขนาดปกติ */
  transition: transform 0.3s ease; /* ทำให้โตขึ้นแบบนุ่มนวล */
}

.hover-icon-box:hover i {
  transform: scale(1.2);  /* ขยาย 1.5 เท่าเมื่อ hover */
}


/*--------------------------------------------------------------
# Related Books Section
--------------------------------------------------------------*/

.related-books .related-book-card {
  background-color: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: all 0.3s ease;
  overflow: hidden;
}

.related-books .related-book-card .book-image {
  position: relative;
  overflow: hidden;
  place-items: center;
  text-align: center;
  margin: auto;
}

.related-books .related-book-card .book-image img {
  width: 60%;
  transition: transform 0.5s ease;
}

.related-books .related-book-card .book-image .book-category {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 15px;
  border-radius: 20px;
}

.related-books .related-book-card .book-info {
  padding: 25px;
}

.related-books .related-book-card .book-info h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.related-books .related-book-card .book-info .book-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.related-books .related-book-card .book-info .book-meta span {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  display: flex;
  align-items: center;
}

.related-books .related-book-card .book-info .book-meta span i {
  color: var(--accent-color);
  margin-right: 5px;
}

.related-books .related-book-card .book-info .book-meta span:last-child i {
  color: #ffd700;
}

.related-books .related-book-card .book-info p {
  font-size: 15px;
  color: var(--default-color);
  line-height: 1.6;
  margin-bottom: 20px;
}

.related-books .related-book-card .book-info .book-actions {
  display: flex;
  gap: 10px;
}

.related-books .related-book-card .book-info .book-actions .btn-details {
  background-color: transparent;
  border: 1px solid var(--orange-color);
  color: var(--orange-color);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: grid;
  place-items: center;
}

.related-books .related-book-card .book-info .book-actions .btn-details:hover {
  background-color: color-mix(in srgb, var(--orange-color), transparent 90%);
}

.related-books .related-book-card .book-info .book-actions .btn-purchase {
  background-color: var(--orange-color);
  color: var(--contrast-color);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: grid;
  place-items: center;
}

.related-books .related-book-card .book-info .book-actions .btn-purchase:hover {
  background-color: color-mix(in srgb, var(--orange-color), transparent 20%);
}

.related-books .related-book-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-books .related-book-card:hover .book-image img {
  transform: scale(1.05);
}

.related-books .coming-soon {
  background-color: var(--surface-color);
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 40px;
  position: relative;
  overflow: hidden;
  margin-top: 30px;
}

.related-books .coming-soon .coming-soon-badge {
  position: absolute;
  top: 20px;
  right: 0;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  text-align: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.related-books .coming-soon .upcoming-book-image {
  position: relative;
}

.related-books .coming-soon .upcoming-book-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.related-books .coming-soon .upcoming-book-image img:hover {
  transform: scale(1.03);
}

.related-books .coming-soon .upcoming-book-info {
  text-align: left;
  padding-left: 20px;
}

.related-books .coming-soon .upcoming-book-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.related-books .coming-soon .upcoming-book-info .release-date {
  font-size: 16px;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-weight: 500;
}

.related-books .coming-soon .upcoming-book-info .description {
  font-size: 15px;
  color: var(--default-color);
  line-height: 1.6;
  margin-bottom: 25px;
}

.related-books .coming-soon .upcoming-book-info .btn-notify {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.related-books .coming-soon .upcoming-book-info .btn-notify:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .related-books .coming-soon .upcoming-book-info {
    padding-left: 0;
    text-align: center;
  }

  .related-books .coming-soon .upcoming-book-info h3 {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .related-books .coming-soon {
    padding: 30px;
  }
}

@media (max-width: 992px) {
  .related-books .section-header h2 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {

  .related-books .section-header h2 {
    font-size: 24px;
  }

  .related-books .related-book-card .book-info {
    padding: 20px;
  }

  .related-books .related-book-card .book-info h3 {
    font-size: 18px;
  }
}

.hover-constrast .icon-constrast {
  transition: all 0.3s ease;
}
.hover-constrast  .icon-constrast {
background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
}
.hover-constrast:hover .icon-constrast {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.table-no-border {
  border-collapse: collapse;
  width: 100%;
}

.table-no-border,
.table-no-border th,
.table-no-border td {
  border: none;
}

/* ใส่เส้นเฉพาะด้านล่างของแต่ละแถว */
.table-no-border tbody tr {
  border-bottom: 1px solid #ddd;
}

/* ยกเว้นแถวสุดท้าย */
.table-no-border tbody tr:last-child {
  border-bottom: none;
}
/* ===== LINE Connect Card — offcanvas navbar (แบบ J: Soft + Pulse Badge) ===== */
.line-connect-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  margin-bottom: 12px;
  position: relative;
  background: #f0fdf4;
  color: #333 !important;
  border-left: 5px solid #06C755;
  overflow: visible;
}
.line-connect-card:hover {
  background: #e6f9ed;
  color: #333;
  box-shadow: 0 3px 14px rgba(6, 199, 85, 0.2);
  transform: translateY(-2px);
}
.line-connect-card .line-connect-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  background: #06C755;
  color: #fff;
}
.line-connect-card .line-connect-body {
  flex-grow: 1;
  min-width: 0;
}
.line-connect-card .line-connect-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 2px;
  color: #05a847;
}
.line-connect-card .line-connect-desc {
  font-size: 12px;
  line-height: 1.3;
  color: #556;
}
.line-connect-card .line-connect-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: #06C755;
}
.line-connect-card .line-connect-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #F57B23;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(245, 123, 35, 0.5);
  letter-spacing: 0.5px;
  animation: line-connect-pulse 2s ease-in-out infinite;
}
@keyframes line-connect-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(245, 123, 35, 0.5); }
  50% { transform: scale(1.1); box-shadow: 0 2px 12px rgba(245, 123, 35, 0.9); }
}

/*--------------------------------------------------------------
# School Project Detail (component: getSchoolProjectDetail)
# ผลงานโรงเรียน — ใช้ร่วมใน project/school/detail + history/project/detail
--------------------------------------------------------------*/
.school-detail-hero,
.school-detail-hero + section,
.school-detail-hero ~ section,
.cert-congrats-section {
  background: #F7F9FC;
}

.school-profile-card {
  background: #fff;
  border: 1px solid #d0e8f5;
}

.school-profile-header {
  background: linear-gradient(135deg, #ffffff 0%, #f5fbfe 50%, #effafd 100%);
}

.school-logo-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.school-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.level-badge-wrapper {
  text-align: center;
}

.school-detail-card {
  background: #fff;
  border: 1px solid #d0e8f5;
  transition: all 0.3s ease;
}

.student-version-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.student-version-tag-v1 {
  background: #e8f5ec;
  color: #1e6b3a;
}

.student-version-tag-v2 {
  background: #FFF8ED;
  color: #8A5A00;
}

.student-version-left {
  border-right: 1px solid #d0e8f5;
}

.school-detail-card:hover {
  border-color: #a8d4ed;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.school-stat-card {
  background: #fff;
  border: 1px solid #d0e8f5;
  transition: all 0.3s ease;
}

.school-stat-card:hover {
  transform: translateY(-4px);
  border-color: #a8d4ed;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.school-stat-card .stat-icon {
  font-size: 1.5rem;
}

.school-info-table th {
  white-space: nowrap;
  color: #64748b;
  font-weight: 500;
  padding: 8px 12px 8px 0;
  width: 140px;
}

.school-info-table td {
  padding: 8px 0;
  color: #1e293b;
}

.score-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mission-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.mission-table td {
  background: #fff;
}

.star-empty {
  color: #d6d6d6;
}

.teacher-item:last-child {
  border-bottom: none !important;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-color);
}

.class-item:last-child {
  border-bottom: none !important;
}

@media (max-width: 799px) {
  .school-logo-wrapper {
    width: 90px;
    height: 90px;
  }

  .school-info-table th {
    width: 120px;
    font-size: 0.9rem;
  }

  .school-info-table td {
    font-size: 0.9rem;
  }

  .school-stat-card .fs-2 {
    font-size: 1.5rem !important;
  }

  .school-stat-card .stat-icon {
    font-size: 1.2rem;
  }

  .mission-table {
    font-size: 0.9rem;
  }
}

/*--------------------------------------------------------------
# Certificate congratulation card (premium gold) — 5-star schools
--------------------------------------------------------------*/
.cert-congrats-card {
  cursor: pointer;
  color: #4a3f1a;
  background:
    radial-gradient(ellipse at 15% 100%, rgba(220, 190, 115, 0.45) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 0%, rgba(220, 190, 115, 0.4) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, #fdf7e0 0%, #f5e7b8 55%, #e9d596 100%);
  border: 1px solid rgba(200, 170, 95, 0.4);
  box-shadow:
    0 6px 18px rgba(200, 170, 95, 0.25),
    0 14px 36px rgba(180, 150, 75, 0.18);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease;
}

.cert-congrats-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(115deg, transparent 8%, rgba(212, 182, 105, 0.22) 10%, rgba(212, 182, 105, 0.22) 13%, transparent 15%),
    linear-gradient(115deg, transparent 18%, rgba(212, 182, 105, 0.18) 20%, rgba(212, 182, 105, 0.18) 26%, transparent 28%),
    linear-gradient(115deg, transparent 72%, rgba(212, 182, 105, 0.18) 74%, rgba(212, 182, 105, 0.18) 82%, transparent 84%),
    linear-gradient(115deg, transparent 88%, rgba(212, 182, 105, 0.22) 90%, rgba(212, 182, 105, 0.22) 93%, transparent 95%);
  z-index: 0;
}

.cert-congrats-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 24px rgba(200, 170, 95, 0.35),
    0 18px 48px rgba(180, 150, 75, 0.25);
}

.cert-congrats-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 30%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.25) 70%,
    transparent 100%
  );
  transform: translateX(-200%);
  animation: certShine 4.5s ease-in-out infinite;
  mix-blend-mode: overlay;
  z-index: 2;
}

@keyframes certShine {
  0%   { transform: translateX(-200%); }
  55%  { transform: translateX(400%); }
  100% { transform: translateX(400%); }
}

/* Certificate shine button — gold theme + shine (teacher/student) */
.cert-shine-btn {
  position: relative;
  overflow: hidden;
  color: #4a3f1a;
  background:
    radial-gradient(ellipse at 15% 100%, rgba(220, 190, 115, 0.45) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 0%, rgba(220, 190, 115, 0.4) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, #fdf7e0 0%, #f5e7b8 55%, #e9d596 100%);
  border: 1px solid rgba(200, 170, 95, 0.4);
  box-shadow:
    0 2px 6px rgba(200, 170, 95, 0.25),
    0 4px 12px rgba(180, 150, 75, 0.18);
}

.cert-shine-btn:hover,
.cert-shine-btn:focus {
  color: #4a3f1a;
  border-color: rgba(200, 170, 95, 0.6);
  box-shadow:
    0 3px 8px rgba(200, 170, 95, 0.35),
    0 6px 16px rgba(180, 150, 75, 0.25);
}

.cert-shine-btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.4) 70%,
    transparent 100%
  );
  transform: translateX(-200%);
  animation: certShine 4.5s ease-in-out infinite;
  mix-blend-mode: overlay;
  z-index: 1;
}

.cert-shine-btn-content {
  position: relative;
  z-index: 2;
}

.cert-congrats-card > .p-3,
.cert-congrats-card > .p-md-4 {
  position: relative;
  z-index: 3;
}

.cert-congrats-level-wrap {
  display: flex;
  justify-content: center;
}

.cert-congrats-level-img {
  height: 90px;
  width: auto;
  filter: drop-shadow(0 3px 6px rgba(120, 90, 20, 0.28));
}

@media (max-width: 799px) {
  .cert-congrats-level-img { height: 70px; }
}

.cert-congrats-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 1.5rem;
  line-height: 1;
}

.cert-congrats-stars .bi-star-fill {
  color: #d4a63a;
  filter: drop-shadow(0 1px 1px rgba(120, 90, 20, 0.3));
  animation: certStarPop 0.6s cubic-bezier(.2,1.4,.6,1) backwards;
}

.cert-congrats-stars .bi-star-fill:nth-child(1) { animation-delay: 0.05s; }
.cert-congrats-stars .bi-star-fill:nth-child(2) { animation-delay: 0.15s; }
.cert-congrats-stars .bi-star-fill:nth-child(3) { animation-delay: 0.25s; }
.cert-congrats-stars .bi-star-fill:nth-child(4) { animation-delay: 0.35s; }
.cert-congrats-stars .bi-star-fill:nth-child(5) { animation-delay: 0.45s; }

@keyframes certStarPop {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
  70%  { transform: scale(1.25) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.cert-congrats-title {
  color: #4a3f1a;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cert-congrats-subtitle {
  color: #6b5a22;
  font-weight: 600;
}

.cert-congrats-subtitle i {
  color: #b88a2b;
}

@media (max-width: 799px) {
  .cert-congrats-stars { font-size: 1.2rem; gap: 4px; }
  .cert-congrats-title { font-size: 1.1rem !important; }
  .cert-congrats-subtitle { font-size: 0.95rem !important; }
}

/*--------------------------------------------------------------
# Certificate popup — pre-rendered JPG (fixed A4 landscape ratio)
--------------------------------------------------------------*/
.cert-popup-outer {
  width: 100%;
}

.cert-popup-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 29.7 / 21;
  background: #f5f5f5;
  overflow: hidden;
}

.cert-popup-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

#cert-popup-card {
  max-width: 95vw;
  width: 1100px;
}

/* ============================================================
 * Report Archive (สรุปผลงาน — ดึงมาจาก sila5.com เก่า)
 * Scope: .report-archive-content
 * ============================================================ */
.report-archive-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}
.report-archive-content h3,
.report-archive-content h4 {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.report-archive-content h4 u {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.report-archive-content .grid-item {
  display: inline-block;
  width: calc(33.333% - 8px);
  margin: 4px;
  vertical-align: top;
}
.report-archive-content .img-item {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.report-archive-content table.RCA {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.report-archive-content table.RCA th,
.report-archive-content table.RCA td {
  border: 1px solid #ccc;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.report-archive-content table.RCA th {
  background: #f8f9fa;
}
.report-archive-content .row + .row {
  margin-top: 0.5rem;
}
.report-archive-content .page-break {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #dee2e6;
}
.report-archive-content .topbolder {
  margin-top: 0.75rem;
}
.report-archive-content .topmargin {
  margin-top: 1rem;
}
.report-archive-html-frame {
  width: 100%;
  min-height: 400px;
  border: none;
}
@media (max-width: 799px) {
  .report-archive-content .grid-item {
    width: calc(50% - 8px);
  }
}
@media (max-width: 480px) {
  .report-archive-content .grid-item {
    width: calc(100% - 8px);
  }
}
