﻿.nav-link {
	color: #003c8f !important;
	font-weight: 600;
	transition: all 200ms linear;
}

.nav-item:hover .nav-link {
	color: #c70a16 !important;
}

.nav-item.active .nav-link {
	color: #777 !important;
}

.nav-link {
	padding: 5px 0 !important;
	display: inline-block;
}

.nav-item:after {
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 100%;
	height: 2px;
	content: '';
	background-color: #8167a9;
	opacity: 0;
	transition: all 200ms linear;
}

.nav-item:hover:after {
	bottom: 0;
	opacity: 1;
}

.nav-item.active:hover:after {
	opacity: 0;
}

.nav-item {
	position: relative;
	transition: all 200ms linear;
	padding-bottom: 15px; /* tạo vùng hover kéo xuống dropdown */
}
	.nav-item.show .dropdown-menu {
		opacity: 1;
		visibility: visible;
		max-height: 999px;
		transform: translate3d(0, 0, 0);
	}

.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: -15px; /* bù lại padding-bottom của .nav-item để tạo cảm giác cách ra */
	padding: 0;
	font-size: 15px;
	letter-spacing: 0.5px;
	color: #000;
	background-color: #ffffff;
	border: none;
	border-radius: 4px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	transition: all 200ms ease-in-out;
	overflow: hidden;
	/*min-width: 220px;*/
	z-index: 1000;
}

.dropdown-item {
	padding: 8px 16px; /* 👉 giảm từ 12px xuống còn 6px chiều cao */
	color: #212121;
	font-weight: 500;
	background-color: #ffffff;
	border-bottom: 1px solid #eee;
	transition: all 0.2s ease-in-out;
}

/* Hover và mục đang chọn */
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
	background-color: #e40012; /* Nền đỏ tươi */
	color: #ffffff; /* Chữ trắng */
}

/* #Media
================================================== */
/* Hiển thị trên mobile */
@media (max-width: 767px) {
	.nav-link {
		position: relative;
		width: 100%;
		padding-right: 30px; /* Chừa chỗ cho mũi tên */
	}

	/* Bỏ ký hiệu thừa */
	.nav-item::before {
		display: none !important;
	}

	/* Mũi tên bên phải */
	.dropdown-toggle::after {
		position: absolute;
		top: 50%;
		right: 10px;
		transform: translateY(-50%);
		content: "▼"; /* Mũi tên xuống */
		font-size: 14px;
		color: #333;
		border: none;
		background: none;
		transition: transform 0.2s ease;
	}

	/* Khi mở dropdown thì xoay mũi tên */
	.dropdown-toggle[aria-expanded="true"]::after {
		transform: translateY(-50%) rotate(180deg); /* Xoay lên */
	}

	.dropdown-menu {
		padding: 0 !important;
		background-color: transparent;
		box-shadow: none;
		transition: all 200ms linear;
	}

	.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
		margin-top: 10px !important;
		margin-bottom: 20px !important;
	}

	/* Dark mode nếu cần */
	body.dark .dropdown-toggle::after {
		color: #fff;
	}
	.nav-item {
		padding-bottom: 2px !important;
	}
	.nav-link {
		padding-top: 2px !important;
		padding-bottom: 2px !important;
		font-size: 15px;
	}
}

/* Hiển thị trên máy tính */
@media (min-width: 767px) {
	.nav-item .dropdown-menu {
		transform: translate3d(0, 10px, 0);
		transition: all 200ms linear;
		display: block;
		visibility: hidden;
		opacity: 0;
		max-height: 0;
		padding: 0;
		margin: 0;
		min-width: 299px; /* hoặc 240px, 260px tùy mong muốn */
	}

	.nav-link {
		position: relative;
	}
}

