/* === MEGA MENU COMPLETE CSS === */

/* Header Spacing and Base Structure */
.site-header {
  background-color: #1e3a8a; /* Navy blue background */
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  padding: 0.3rem 0;
  background-color: rgba(17, 24, 39, 0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}


.logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 160px; /* Control logo size */
  width: auto;
  object-fit: contain;
  transition: max-height 0.3s ease;
}

.site-header.scrolled .logo img {
  max-height: 160px; /* Smaller logo when scrolled */
}

.logo span {
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

.nav-container {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  margin: 0 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.nav-links li {
  margin: 0 1rem;
  position: relative;
}

.nav-links li a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #ffffff;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

/* Radiant Glowing Button */
.btn-glow-radiant {
  position: relative;
  padding: 0.7rem 2rem;
  background: #3b82f6; /* Blue base color */
  color: white;
  border-radius: 6px;
  font-weight: 600;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  border: none;
  text-decoration: none;
  display: inline-block;
}

/* Glowing background */
.btn-glow-radiant::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
      #8b5cf6, /* Purple */
      #3b82f6, /* Blue */
      #ec4899, /* Pink */
      #8b5cf6  /* Purple again */
  );
  background-size: 400% 400%;
  z-index: -1;
  border-radius: 8px;
  animation: gradientBg 8s ease infinite;
}

/* Shimmering overlay */
.btn-glow-radiant::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
      transparent, 
      rgba(255, 255, 255, 0.2), 
      transparent
  );
  z-index: 1;
  animation: shimmer 3s infinite;
}

/* Hover effect */
.btn-glow-radiant:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  color: white;
}

/* Auth Buttons Section */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Basic Mega Menu Structure */
.nav-item.has-megamenu {
  position: static;
}

.nav-item.has-megamenu > a {
  position: relative;
  padding-right: 1.25rem;
}

.nav-item.has-megamenu > a i {
  font-size: 0.7rem;
  margin-left: 0.3rem;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-item.has-megamenu:hover > a i,
.nav-item.has-megamenu.active > a i {
  transform: rotate(180deg);
}

/* Mega Menu Container - Enhanced with 3D effects */
.megamenu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 0 0 1rem 1rem;
  border-top: 2px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(59, 130, 246, 0.15);
  padding: 2rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) rotateX(-5deg);
  transform-origin: top center;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 999;
  overflow: hidden;
}

/* Background glow effect */
.megamenu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 60%);
  z-index: -1;
}

/* Active state for mega menu */
.nav-item.has-megamenu:hover .megamenu,
.nav-item.has-megamenu.active .megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotateX(0);
}

/* Mega Menu Container Layout */
.megamenu-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
  position: relative;
}

/* Mega Menu Column */
.megamenu-column {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: calc(0.05s * var(--column-index, 0));
  opacity: 0;
}

.megamenu-column:nth-child(1) { --column-index: 1; }
.megamenu-column:nth-child(2) { --column-index: 2; }
.megamenu-column:nth-child(3) { --column-index: 3; }
.megamenu-column:nth-child(4) { --column-index: 4; }

/* Mega Menu Title */
.megamenu-title {
  color: #93c5fd;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  position: relative;
}

.megamenu-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  transition: width 0.3s ease;
}

.megamenu-column:hover .megamenu-title::after {
  width: 100%;
}

/* Mega Menu List Items */
.megamenu-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.megamenu-list li a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.megamenu-list li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #3b82f6;
  transform: translateX(-4px);
  opacity: 0;
  transition: all 0.3s ease;
}

.megamenu-list li a::after {
  display: none; /* Override the underline for mega menu links */
}

.megamenu-list li a i {
  color: #93c5fd;
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.megamenu-list li a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(5px);
}

.megamenu-list li a:hover::before {
  transform: translateX(0);
  opacity: 1;
}

.megamenu-list li a:hover i {
  transform: scale(1.2);
  color: #ffffff;
}

/* Featured Column */
.featured-column {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(79, 70, 229, 0.15));
  border-radius: 0.8rem;
  padding: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.featured-column::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.featured-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(79, 70, 229, 0.2));
  border-color: rgba(59, 130, 246, 0.4);
}

.featured-column:hover::before {
  opacity: 1;
  animation: pulse 3s infinite;
}

/* Featured Offer */
.featured-offer h4 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-offer h4 i {
  color: #f59e0b;
}

.featured-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-offer:hover .featured-image {
  transform: scale(1.05);
}

.featured-tool-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #93c5fd;
  transition: all 0.4s ease;
}

.featured-offer:hover .featured-tool-icon {
  transform: rotateY(180deg);
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}

.featured-offer p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.featured-offer .btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.featured-offer .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.featured-offer:hover .btn::before {
  left: 100%;
}

.featured-offer .btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu Ripple Effect */
.menu-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0.7; }
}

@keyframes ripple {
  to {
      transform: scale(4);
      opacity: 0;
  }
}

@keyframes gradientBg {
  0% {
      background-position: 0% 50%;
  }
  50% {
      background-position: 100% 50%;
  }
  100% {
      background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
      left: -100%;
  }
  100% {
      left: 100%;
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  .mobile-menu-toggle {
      display: block;
  }
  
  .nav-container {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background: rgba(17, 24, 39, 0.98);
      flex-direction: column;
      align-items: flex-start;
      padding: 1rem 0;
      transform: translateY(-100%);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      max-height: 80vh;
      overflow-y: auto;
  }
  
  .nav-container.active {
      transform: translateY(0);
      opacity: 1;
      visibility: visible;
  }
  
  .nav-links {
      flex-direction: column;
      width: 100%;
      margin: 0;
      padding: 0 1.5rem;
  }
  
  .nav-links li {
      margin: 0;
      width: 100%;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-links li a {
      padding: 1rem 0;
      width: 100%;
      display: block;
  }
  
  .nav-item.has-megamenu > a i {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
  }
  
  .megamenu {
      position: static;
      width: 100%;
      background: rgba(17, 24, 39, 0.7);
      border-radius: 0.5rem;
      box-shadow: none;
      border-top: none;
      padding: 0;
      max-height: 0;
      overflow: hidden;
      transform: none;
      transition: max-height 0.5s ease, padding 0.5s ease;
  }
  
  .nav-item.has-megamenu.active .megamenu {
      max-height: 2000px;
      padding: 1rem 0;
  }
  
  .megamenu-container {
      grid-template-columns: 1fr;
      padding: 0 1rem;
      gap: 1.5rem;
  }
  
  .featured-column {
      margin-top: 1rem;
  }
  
  .auth-buttons {
      width: 100%;
      justify-content: center;
      padding: 1rem 1.5rem 0;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 1rem;
  }
  
  .btn-glow-radiant {
      width: 100%;
      text-align: center;
  }
}

@media (max-width: 576px) {
  .logo span {
      display: none;
  }
  
  .site-header {
      padding: 0.5rem 0;
  }
  
  .container {
      padding: 0 1rem;
  }
  
  .featured-tool-icon {
      width: 60px;
      height: 60px;
      font-size: 1.8rem;
  }
  
  .megamenu-title {
      font-size: 1rem;
  }
}
