.section-hero {
	position: relative;
	background-size: cover;
}

.section-hero .container-content {
	align-self: center;
}

.container-category {
	padding: 10px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.08);
}
.category-item {
	width: 20%;
	padding: 10px;
	color: #141414;
	font-weight: 600;
}
.category-item:hover .category-item-inner,
.category-item:active .category-item-inner,
.category-item:focus .category-item-inner {
	border: 1px solid #0e2f9432;
	box-shadow: 0px 0px 8px 0px #0e2f9427;
}
.category-item-inner {
	width: 100%;
	height: auto;
	padding: 16px;
	align-items: center;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.08);
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	border: 1px solid #d2d1d13b;
}

.top-course .owl-dots > button > span {
	border: none;
	border-radius: 20%;
	height: 5px !important;
	width: 30px !important;
	margin: 0 5px;
}
.owl-theme .owl-dots .owl-dot.active span,
.owl-theme .owl-dots .owl-dot:hover span {
	background-color: #0e2f94 !important;
}
.owl-theme .owl-nav.disabled + .owl-dots {
	margin-top: 20px !important;
}

.course-item .course-item-summary * {
	line-height: 14px;
}
.course-item .course-item-summary > i {
	margin-right: 6px !important;
}
.course-item .course-item-summary > span {
	margin-top: 2px;
}

.container-student {
	width: 100dvw;
	min-height: 100dvh;
	height: auto;
	padding-top: 68px;
	background-color: #f7f7f7;
}

#sidebarMenu {
	background-color: white !important;
	/* max-height: 95dvh !important; */
	position: fixed;

	width: 100%;
	position: sticky !important;
	top: 68px;
}

#sidebarMenu .sidebar-sticky {
	/* width: 280px; */
}
.container-body {
	margin-left: 280px;
}

#sidebarMenu .nav-link {
	color: #747474;
	font-size: 16px;
}

#sidebarMenu .card:hover,
#sidebarMenu .card:focus {
	box-shadow: none !important;
}

#sidebarMenu .nav-item .nav-link {
	padding: 0.5rem 1rem 0.5rem 1rem;
}

#sidebarMenu .card .nav-item .nav-link {
	padding: 0.5rem 1rem 0.5rem 3rem;
}

#sidebarMenu .nav-link.active path {
	fill: #0e2f94;
}

#sidebarMenu .nav-link:hover,
#sidebarMenu .nav-link:focus {
	color: #2d2a2a;
}

#sidebarMenu .nav-link.active,
#sidebarMenu .nav-link.active * {
	color: #0e2f94;
	font-weight: 500;
	text-decoration: underline;
}

#sidebarMenu li.nav-item > .nav-link {
	display: flex;
	flex-direction: row;

	> * {
		align-self: center;
	}
}

.version-info {
	padding-left: 15px;
}

.page-student hr {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	opacity: 0.8;
}

/* ปุ่ม .btn-primary (สีปกติ/hover/active/focus ring) ย้ายไปเป็น global ใน style.css แล้ว
   เพื่อให้ฝั่ง admin (body ไม่มี .page-student) ได้ state เดียวกับ student — เลิก scope ที่นี่ */
.dropdown-toggle::after {
	color: white;
}

.modal-header .close {
	padding: 1rem 1rem;
	margin: -1rem -1rem -1rem auto;

	float: right;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	color: #000;
	text-shadow: 0 1px 0 #fff;
	opacity: 0.5;

	background-color: transparent;
	border: 0;
}

.modal-header .close:not(:disabled):not(.disabled):focus,
.modal-header .close:not(:disabled):not(.disabled):hover {
	opacity: 0.75;
}

a:hover {
	/* text-decoration: underline !important; */
}

.page-student * {
	-webkit-transition: all 0.05s ease-in-out;
	-moz-transition: all 0.05s ease-in-out;
	-o-transition: all 0.05s ease-in-out;
	-ms-transition: all 0.05s ease-in-out;
	transition: all 0.05s ease-in-out;
}
.page-searach-course .hero {
	background-color: #f6f8f7;
}

/* ลิงก์เบอร์โทร/อีเมลใน footer — ฟ้าอ่อนบนพื้นเข้ม ตรงกับ lms.chanwanich.com */
.new-template-color-link {
	color: #7999ff;
}

.text-right a {
	color: #0e2f94 !important;
}

/* .dropdown-menu .dropdown-item:active {
	background-color: #0e2f94 !important;
} */

@media (min-width: 768px) and (max-width: 1200px) {
	.bg-cover-mobile {
		background-position-y: 27% !important;
	}
	.category-item {
		width: 33.33% !important;
	}
	.section-category {
		margin-top: -50px !important;
	}
}

@media (max-width: 767px) {
	.section-hero .title1 {
		font-size: 22px !important;
	}
	.section-hero .title2 {
		font-size: 20px !important;
	}
	/* ข้อความ + ช่องค้นหาอยู่กลางกรอบ hero (ค่า default ที่บรรทัด 6 คือ center อยู่แล้ว
	   ตรงนี้เคยดันขึ้นไปบนด้วย flex-start + margin-top 20% ตามรูปจัตุรัสของเดิม) */
	.container-content {
		align-self: center !important;
		margin-top: 0;
	}

	/* กฎนี้มีไว้ชดเชยรูปจัตุรัสของแท็บเล็ต — ต้องไม่โดนรูปแนวตั้งของมือถือ (.bg-cover-phone)
	   ซึ่งอัตราส่วนตรงกับกรอบอยู่แล้ว ถ้าโดนจะเลื่อนภาพหลุดกรอบไปด้านบน */
	.bg-cover-mobile:not(.bg-cover-phone) {
		/* height: 100dvw;
    max-height: none; */
		background-position-y: -40% !important;
	}

	.category-item {
		width: 50% !important;
	}

	.section-category {
		margin-top: -20px !important;
	}
}

/* จอมือถือ — ข้อความ hero ชิดซ้ายเหมือน lms.chanwanich.com */
@media (max-width: 575.98px) {
	/* banner มือถือของ Chanwanich EDTEX (new-template-bg-hero-mobile-vertical-v4) วางภาพ
	   isometric ไว้ครึ่งล่างของกรอบ ส่วนครึ่งบนเป็นพื้นน้ำเงินว่าง — ข้อความ + ช่องค้นหา
	   จึง "ชิดบน" ไม่ให้ทับภาพ (เดิม v3 เป็นภาพเมืองเต็มกรอบ จึงชิดล่างได้)
	   ใช้ dvw เหมือนความสูง hero (144.5dvw) เพื่อให้สัดส่วนเลื่อนตามความกว้างจอ */
	.section-hero .container-content {
		align-self: flex-start !important;
		padding-top: 10dvw;
		/* บล็อกใน design กว้าง 343 = เว้นขอบข้าง 16px ต่อด้าน (overlay มี px-2 = 8px อยู่แล้ว
		   จึงเหลือให้ .container อีก 8px แทนค่า gutter ปกติ 12px) */
		padding-left: 8px;
		padding-right: 8px;
	}
	/* ช่องค้นหาตาม design: สูง 53 ปุ่มกว้าง 100 — ค่าเดิม (58 / 120) เป็น inline style
	   ใน form_search.php ที่ใช้ร่วมกันทุกหน้า จึงต้อง !important และล้อมด้วย .section-hero
	   ให้มีผลแค่ hero ของหน้าแรกบนมือถือ ไม่กระทบช่องค้นหาหน้าอื่น */
	.section-hero .container-search {
		height: 53px !important;
	}
	.section-hero .container-search button.btn-submit {
		width: 100px !important;
	}
	/* design ให้ section ถัดไปเริ่มที่ขอบล่าง banner พอดี (y=608) ไม่เหลื่อมขึ้นมาทับ
	   (กฎ -20px อยู่ในบล็อก max-width 767px ด้านบน ยังใช้กับแท็บเล็ตต่อไป) */
	.section-category {
		margin-top: 0 !important;
	}

	/* ── การ์ดหมวดหมู่ตาม design (node 19189-14839) ──
	   3 ใบต่อแถว การ์ดกว้าง 114.33 ระยะห่าง 8px เว้นขอบจอ 8px
	   การ์ด padding 8 / ตัวหนังสือ 12px จัดกลาง / ไอคอน 24px วางบนข้อความ
	   ของเดิมบนมือถือคือ 2 ใบต่อแถว padding 16 (py-3) ตัวหนังสือ 16 ไอคอน 40
	   ต้องใช้ !important + specificity ของ .section-category เพราะ py-3 / me-2 / mb-2
	   เป็น utility ของ Bootstrap ที่ตั้ง !important มาแล้ว */

	/* 4px + padding อีก 4px ของ .category-item = เว้นขอบจอ 8px ตาม design พอดี
	   ที่ต้อง !important เพราะ bootstrap.min.css โหลด "หลัง" style-csp.css แล้ว
	   .container-fluid ตั้ง padding-left/right = 12px (gutter) ทับกฎ .container-category
	   ที่บรรทัด 10 ไว้ */
	.container-category {
		padding: 8px 4px !important;
	}
	.category-item {
		width: 33.3333% !important;
		padding: 4px;
	}
	.section-category .category-item-inner {
		padding: 8px !important;
		font-size: 12px;
	}
	.section-category .category-item-inner img {
		width: 24px !important;
		height: 24px !important;
		margin-right: 0 !important;
		margin-bottom: 8px !important;
	}
	.section-category .category-item-text {
		text-align: center;
	}
}

@media (max-width: 992px) {
	.container-body {
		padding-left: 0px;
	}
}
