/*
 * Mega Menu Styles for S-Tech Solutions
 * Enhances the dropdown menu with a card-based mega menu layout
 */

/* Mega Menu Container - DESKTOP ONLY */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--dark-secondary);
  border: 1px solid rgba(78, 84, 255, 0.2);
  border-radius: var(--border-radius-lg);
  width: 90vw;
  max-width: 1100px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 100;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
}

/* Show mega menu on hover - DESKTOP ONLY */
@media (min-width: 992px) {
  .dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mega Menu Grid */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

/* Mega Menu Card */
.mega-menu-card {
  background: rgba(20, 26, 38, 0.7);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(78, 84, 255, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  z-index: 1;
}

.mega-menu-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.mega-menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(78, 84, 255, 0.3);
  border-color: rgba(78, 84, 255, 0.3);
}

/* Mega Menu Icon */
.mega-menu-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 3; /* Higher than the card's ::after pseudo-element */
  transition: transform 0.3s ease;
}

.mega-menu-icon i {
  font-size: 1.5rem;
  color: white;
}

/* Mega Menu Title */
.mega-menu-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--light);
  font-weight: 600;
  position: relative;
  z-index: 3; /* Higher than the card's ::after pseudo-element */
}

/* Mega Menu Description */
.mega-menu-description {
  font-size: 0.9rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
  flex-grow: 1;
  position: relative;
  z-index: 3; /* Higher than the card's ::after pseudo-element */
}

/* Mega Menu Link */
.mega-menu-link {
  display: inline-block;
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  z-index: 3; /* Higher than the card's ::after pseudo-element */
}

.mega-menu-link:hover {
  color: var(--secondary);
  transform: translateX(3px);
}

/* Enhanced Mobile Menu */
@media (max-width: 992px) {
  .mega-menu {
    display: none !important;
  }

  /* Show regular dropdown on mobile */
  .dropdown-menu {
    display: block;
  }

  /* Enhanced mobile dropdown items */
  .mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
  }

  .mobile-menu-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
  }

  .mobile-menu-icon i {
    font-size: 1rem;
    color: white;
  }

  .mobile-menu-content {
    flex: 1;
  }

  .mobile-menu-title {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.25rem;
  }

  .mobile-menu-description {
    font-size: 0.8rem;
    color: var(--gray-light);
  }
}

/* Show mega menu on large screens */
@media (min-width: 992px) {
  .mega-menu {
    display: block;
  }

  /* Hide regular dropdown on large screens */
  .dropdown-menu {
    display: none;
  }
}
