/* Hiệu ứng fade-in cho toàn bộ trang */

.page-container {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hiệu ứng cho các card thống kê */

.col[role="region"] {
  animation: slideInLeft 0.6s ease-out;
  animation-fill-mode: both;
}

.col[role="region"]:nth-child(1) {
  animation-delay: 0.1s;
}

.col[role="region"]:nth-child(2) {
  animation-delay: 0.2s;
}

.col[role="region"]:nth-child(3) {
  animation-delay: 0.3s;
}

.col[role="region"]:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hiệu ứng hover cho các card */

.card {
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loại bỏ hiệu ứng ::before phức tạp để tối ưu hiệu suất */

.card::before {
  content: none;
}

/* Hiệu ứng hover cho avatar */

.avatar-title {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar-title:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Hiệu ứng số liệu */

.fw-bold.h3 {
  transition: color 0.3s ease;
}

.card:hover .fw-bold.h3 {
  color: #007bff;
}

/* Hiệu ứng cho navigation tabs */

.nav-pills .nav-link {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-pills .nav-link:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, #007bff, #0056b3);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Hiệu ứng cho tab content khi chuyển đổi FAQ */

.tab-content {
  overflow: hidden;
  /* Ngăn nội dung tràn ra ngoài trong quá trình chuyển đổi */
}

/* Mặc định: ẩn và có hiệu ứng mờ & trượt */

.tab-pane {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.25, 1.25, 0.5, 1);
  pointer-events: none;
}

/* Khi hiển thị tab */

.tab-pane.show.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Hiệu ứng cho accordion */

.accordion-button {
  transition: background-color 0.3s ease;
}

.accordion-button:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
}

.accordion-body {
  animation: slideInRight 0.4s ease-out;
}

.accordion-collapse {
  transition: height 0.3s ease, opacity 0.3s ease;
  /* Hiệu ứng mượt mà khi accordion mở */
}

.accordion-collapse.show {
  opacity: 1;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hiệu ứng cho bảng */

.table-responsive {
  animation: fadeIn 0.6s ease-out 0.5s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.table tr {
  transition: background-color 0.3s ease;
}

.table tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* Hiệu ứng cho thông báo */

.card.mb-1 {
  animation: slideInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.card.mb-1:nth-child(1) {
  animation-delay: 0.1s;
}

.card.mb-1:nth-child(2) {
  animation-delay: 0.2s;
}

.card.mb-1:nth-child(3) {
  animation-delay: 0.3s;
}

.card.mb-1:nth-child(4) {
  animation-delay: 0.4s;
}

.card.mb-1:nth-child(5) {
  animation-delay: 0.5s;
}

.card.mb-1:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hiệu ứng hover cho avatar trong thông báo */

.avatar-sm {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.mb-1:hover .avatar-sm {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Hiệu ứng cho breadcrumb */

.breadcrumb {
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.breadcrumb-item a {
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #007bff;
  text-decoration: underline;
}

/* Loại bỏ hiệu ứng ::after phức tạp để tối ưu hiệu suất */

.card-body::after {
  content: none;
}

/* Hiệu ứng pulse cho số liệu quan trọng */

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

.card:hover .h3 {
  animation: pulse 1s infinite;
}

/* Hiệu ứng cho sidebar navigation */

.nav-pills {
  animation: fadeInLeft 0.6s ease-out 0.3s both;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive animations */

@media (max-width: 768px) {
  .card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Hiệu ứng cho time element */

time {
  transition: color 0.3s ease;
}

.card:hover time {
  color: #007bff;
}

/* Hiệu ứng cho blockquote */

blockquote {
  transition: padding-left 0.3s ease, border-left 0.3s ease;
}

.card:hover blockquote {
  padding-left: 15px;
  border-left: 3px solid #007bff;
}

/* Ensure SimpleBar compatibility */

[data-simplebar] {
  transform: none !important;
  animation: none !important;
}

[data-simplebar] .simplebar-content-wrapper,
[data-simplebar] .simplebar-content,
[data-simplebar] .card,
[data-simplebar] .card-body,
[data-simplebar] .card.mb-1,
[data-simplebar] .table-responsive {
  transform: none !important;
  animation: none !important;
}

/* Đảm bảo SimpleBar hoạt động đúng với nội dung bên trong */

[data-simplebar] .simplebar-content-wrapper {
  overflow: auto;
}
