/* =========================================================
   Megamenu — dropdown for "Serviços" in main topbar
   ========================================================= */

.nav-links { position: relative; }

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-item > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 4px;
  opacity: 0.55;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-item:hover > a::after { transform: rotate(180deg); opacity: 1; }

/* The dropdown panel */
.megamenu {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translate(-50%, 0);
  width: min(1080px, 92vw);
  padding: 0;
  background: linear-gradient(180deg, rgba(10,10,31,0.98) 0%, rgba(5,4,15,0.98) 100%);
  border: 1px solid rgba(229,52,139,0.2);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6),
              0 0 0 1px rgba(255,255,255,0.04),
              0 0 80px -20px rgba(229,52,139,0.35);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -12px) scale(0.98);
  transform-origin: top center;
  transition: opacity .3s cubic-bezier(0.16, 1, 0.3, 1),
              transform .4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility .3s;
  z-index: 9999;
  overflow: hidden;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.megamenu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

/* Decorative bg */
.megamenu::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 400px 200px at 20% -20%, rgba(229,52,139,0.18), transparent 60%),
    radial-gradient(ellipse 300px 200px at 80% 120%, rgba(255,74,156,0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.megamenu::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(229,52,139,0.6) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.megamenu-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
}

.megamenu-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 16px;
}

.megamenu-item {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: transparent;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.megamenu-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(229,52,139,0.12) 0%, rgba(229,52,139,0) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 0;
}
.megamenu-item:hover::before { opacity: 1; }
.megamenu-item:hover {
  transform: translateX(4px);
}

.megamenu-item .row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.megamenu-item .icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(229,52,139,0.18) 0%, rgba(229,52,139,0.06) 100%);
  border: 1px solid rgba(229,52,139,0.25);
  color: #FFB8D4;
  transition: all .3s ease;
}
.megamenu-item:hover .icon {
  background: linear-gradient(145deg, rgba(229,52,139,0.35) 0%, rgba(229,52,139,0.12) 100%);
  border-color: rgba(229,52,139,0.5);
  color: #FFFFFF;
  transform: scale(1.05);
}

.megamenu-item .text { flex: 1; }
.megamenu-item .name {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.megamenu-item .name .arrow {
  display: inline-block;
  opacity: 0;
  transform: translateX(-4px);
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #E5348B;
}
.megamenu-item:hover .name .arrow {
  opacity: 1;
  transform: translateX(0);
}
.megamenu-item .desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  line-height: 1.4;
}

/* Right side CTA column */
.megamenu-cta {
  position: relative;
  padding: 20px;
  background: linear-gradient(180deg, rgba(229,52,139,0.08) 0%, rgba(10,10,31,0.4) 100%);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
}
.megamenu-cta::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(229,52,139,0.15) 90deg, transparent 180deg);
  animation: mm-rotate 20s linear infinite;
  pointer-events: none;
}
@keyframes mm-rotate { to { transform: rotate(360deg); } }

.megamenu-cta .eb {
  position: relative;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E5348B;
}
.megamenu-cta h4 {
  position: relative;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 8px 0 0;
  text-wrap: balance;
}
.megamenu-cta p {
  position: relative;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin: 10px 0 0;
}
.megamenu-cta .btn {
  position: relative;
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .megamenu { display: none !important; }
}
