:root {
  --primary: #1B2C63;
  --text: #10284f;
  --line: #e3ebfb;
}

body {
  font-family: "Kanit", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  min-height: 100vh;
}

a {
  text-decoration: none;
}
.btn {
	min-width: 140px;
	font-size: 17px;
}

.btn-lg {
	font-size: 30px;
    padding: 8px 34px;
}

.rounded-pill {
	border-radius: 15px !important;
}

.btn-outline-primary {
	border-width: 2px !important;
	border-color: var(--primary) !important;
	color: var(--primary) !important;
	background: transparent !important;
}

.topbar {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line) !important;
}

.site-brand-bar {
  margin-top: 49px;
  background: #fff;
  border-top: 16px solid var(--primary);
  overflow: visible;
}

.user-menu-row {
  gap: 14px;
}

.user-menu-text {
  text-align: left;
}

.user-menu-name {
  color: var(--primary);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.2;
}

.user-menu-role {
  color: var(--primary);
  font-size: 14px;
  line-height: 1.3;
}

.user-menu-control {
  flex-shrink: 0;
}

.user-menu-avatar {
  width: 52px;
  height: 52px;
  background: #e8eef8;
  color: var(--primary);
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px 0 0 10px;
}

.user-menu-dropdown-wrap {
  position: relative;
}

.user-menu-toggle {
  width: 44px;
  height: 52px;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0 10px 10px 0;
}

.user-menu-toggle::after {
  display: none;
}

.user-menu-icon {
  display: block;
  width: 22px;
  height: 14px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 50% / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
}

.user-menu-dropdown {
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 10px 0;
  min-width: 220px;
  margin: 0 !important;
  box-shadow: 0 10px 24px rgba(17, 50, 112, 0.2);
}

.user-menu-dropdown-wrap .dropdown-menu.show {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
}

.user-menu-dropdown .dropdown-item {
  color: #fff;
  font-size: 16px;
  padding: 10px 22px;
}

.user-menu-dropdown .dropdown-item:hover,
.user-menu-dropdown .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.main {
  margin-top: 40px;
  margin-bottom: 60px;
}

.navbar-brand .logo,
.hero .logo,
.site-brand-bar .logo {
  width: 110px;
  display: inline-block;
}

.nav-link {
  color: #304254;
  opacity: 0.7;
  font-weight: 500;
  font-size: 16px;
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.active {
  color: var(--primary) !important;
  opacity: 1;
  font-weight: 700;
}

.page-no {
  font-size: 13px;
  color: #334c7e;
}

a.hero-brand {
  color: inherit;
}

a.hero-brand:hover {
  opacity: 0.88;
}

.hero-brand .brand-text strong {
  	display: block;
  	font-size: 28px;
    font-weight: 400;
    font-style: normal;
    color: var(--primary);
    font-kerning: none;
    text-decoration-line: none;
    text-decoration-thickness: initial;
    text-decoration-style: initial;
}

.hero-brand .brand-text span {
  	font-size: 22px;
  	color: var(--primary);
}

.hero-title {
  color: var(--primary);
  font-size: clamp(22px, 2.5vw, 40px);
  margin-bottom: 10px;
}

.hero-subtitle {
  color: var(--primary);
  font-size: clamp(12px, 1.1vw, 20px);
  margin-bottom: 35px;
}

.btn-theme {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.search-wrap {
  max-width: 560px;
}

.search-input.form-control {
	border: 2px solid var(--primary);
    border-right: 0;
    border-radius: 999px 0 0 999px;
    font-size: 20px;
    color: var(--primary);
    padding: 6px 22px;
    border-radius: 15px 0 0 15px;
}

.search-btn {
  border: 2px solid var(--primary);
  border-left: 0;
  border-radius: 0 15px 15px 0;
}

.search-banner {
  max-width: 1120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d9e3f7;
  box-shadow: 0 10px 22px rgba(17, 50, 112, 0.14);
}

section {
	padding-bottom: 100px;
}

.assessment-section {
  padding-bottom: 60px;
}

.card-slider {
  position: relative;
}

.card-slider-viewport {
  container-type: inline-size;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}

.card-slider-viewport::-webkit-scrollbar {
  display: none;
}

.card-slider-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.slider-card-link {
  flex: 0 0 calc((100cqi - 48px) / 3.5);
  min-width: 0;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-card-link:hover {
  color: inherit;
  transform: translateY(-4px);
}

.slider-card-link:hover .slider-card {
  box-shadow: 0 12px 28px rgba(17, 50, 112, 0.18);
}

.slider-card {
  /* 3.5 การ์ดต่อหน้าจอ — โผล่ครึ่งซ้าย/ขวาตามตำแหน่งเลื่อน */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 1px solid #d9e3f7;
  border-radius: 15px;
  overflow: hidden;
}

.slider-card-image {
  flex-shrink: 0;
  height: 300px;
  width: 100%;
  object-fit: cover;
}

.slider-card .card-body-custom {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.slider-card .card-body-custom .card-title {
  line-height: 1.4;
  margin-bottom: 12px;
}

.slider-card .card-body-custom .card-sub {
  flex: 1;
  line-height: 1.45;
}

.card-slider-btn {
	position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 80px;
    height: 80px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 75px;
    display: inline-flex;
	align-items: anchor-center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 6px 14px rgba(17, 50, 112, 0.25);
}

.card-slider-btn:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.05);
}

.card-slider-prev {
  left: 25px;
}

.card-slider-next {
  right: 25px;
}

.card-slider-prev.is-hidden,
.card-slider-next.is-hidden {
  display: none !important;
}

@media (max-width: 991.98px) {
  .slider-card-link {
    flex: 0 0 calc((100cqi - 16px) / 2.5);
  }
}

@media (max-width: 575.98px) {
  .slider-card-link {
    flex: 0 0 calc((100cqi - 16px) / 1.15);
  }
}

.section-title {
  font-size: clamp(20px, 2vw, 35px);
  color: var(--primary);
}

.course-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #d9e3f7;
  box-shadow: 0 8px 18px rgba(17, 50, 112, 0.14);
  overflow: hidden;
  border-radius: 15px;
}

.course-card .card-body-custom {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.course-card .card-body-custom .card-title {
  line-height: 1.4;
}

.course-card .card-body-custom .card-sub {
  flex: 1;
  line-height: 1.45;
}

.card-image {
  height: 300px;
  padding: 10px;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(140deg, #3d90e3, #143f91 55%, #11285c);
}

img.card-image {
  width: 100%;
  padding: 0;
  display: block;
  object-fit: cover;
  background: none;
}

.card-body-custom {
  background: var(--primary);
  color: #fff;
}

.card-body-custom .card-title {
  font-size: 20px;
  margin-bottom: 15px;
}

.card-sub {
  font-size: 11px;
  opacity: 0.92;
}

.footer {
  background: var(--primary);
  color: #fff;
  padding: 28px 0 22px;
}

.footer-top {
  margin-bottom: 50px;
}

.footer-logo {
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.footer-name {
  font-size: 26px;
  line-height: 1.15;
}

.footer-tagline {
	font-size: 20px;
    font-weight: 400;
    margin-top: 2px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity 0.2s ease;
}

.footer-social-link:hover {
  color: #fff;
  opacity: 0.75;
}

.copyright {
  font-size: 16px;
}

@media (max-width: 991.98px) {
  .site-brand-bar {
    margin-top: 56px;
  }

  .navbar-collapse {
    background: #fff;
    margin-top: 8px;
    padding: 8px 0;
  }

  .nav-link {
    font-size: 14px;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 575.98px) {
  .hero-brand {
    width: 100%;
    justify-content: center;
  }

  .hero-brand .brand-text {
    text-align: left;
  }

  .footer-name {
    font-size: 20px;
  }

  .footer-tagline {
    font-size: 13px;
  }

  .footer-top {
    justify-content: center !important;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
  }

  .footer-social {
    width: 100%;
    justify-content: center;
  }
}