/* Mega Menu Styles */
.main-menu .has-mega-menu {
  position: relative;
}

.main-menu .mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(0);
  transition: all 0.3s ease;
  z-index: 999;
  width: 100vw;
  max-width: 1200px;
  margin-left: 50%;
}

.main-menu .has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-inner {
  padding: 0;
  overflow: hidden;
}

.mega-menu-col {
  padding: 30px 15px;
}

.mega-menu-title {
  font-size: 16px;
  font-weight: 700;
  color: #0a2540;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cột trái - Menu cấp 2 */
.mega-menu .col-md-3 {
  /* Border removed - background image is the separator */
}

.mega-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block !important;
  flex-direction: column !important;
}

.mega-menu-list > li {
  margin-bottom: 10px;
  display: block !important;
  width: 100% !important;
  float: none !important;
}

.mega-menu-list > li > a {
  display: block;
  padding: 8px 12px;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.mega-menu-list > li > a:hover {
  background: #f3f4f6;
  color: #0066cc;
  padding-left: 16px;
}

/* Active state for menu cấp 2 */
.mega-menu-list > li.active > a {
  background: #0066cc;
  color: #ffffff;
  padding-left: 16px;
}

.mega-menu-list > li.has-children > a {
  position: relative;
}

.mega-menu-list > li.has-children > a::after {
  content: '›';
  position: absolute;
  right: 12px;
  font-size: 18px;
  font-weight: bold;
}

/* Cột phải - Menu cấp 3 */
.mega-menu-content {
  min-height: 300px;
  position: relative;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Overlay để content dễ đọc hơn trên background */
.mega-menu-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  z-index: 0;
}

/* Đảm bảo content hiển thị trên overlay */
.mega-menu-content > * {
  position: relative;
  z-index: 1;
}

.mega-menu-section {
  margin-bottom: 30px;
}

.mega-menu-section:last-child {
  margin-bottom: 0;
}

.mega-menu-section .mega-menu-title {
  color: #0066cc;
  font-size: 15px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.mega-menu-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.mega-menu-item:last-child {
  border-bottom: none;
}

.mega-menu-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.mega-menu-item-title a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mega-menu-item-title a:hover {
  color: #0052a3;
  text-decoration: underline;
}

.mega-menu-services {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-services li {
  margin-bottom: 6px;
}

.mega-menu-services li a {
  display: block;
  padding: 4px 0;
  color: #6b7280;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  padding-left: 12px;
}

.mega-menu-services li a::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #0066cc;
}

.mega-menu-services li a:hover {
  color: #0066cc;
  padding-left: 16px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .main-menu .mega-menu {
    display: none !important;
  }
}

@media (min-width: 992px) and (max-width: 1200px) {
  .mega-menu {
    max-width: 960px;
  }

  .mega-menu-inner {
    padding: 20px;
  }
}

/* Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.main-menu .has-mega-menu:hover .mega-menu {
  animation: fadeInDown 0.3s ease;
}
