/* Services mega menu - aligned 3×2 service grid + tech stack row */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.mega-panel {
  width: min(920px, 94vw);
}

.mega-panel-inner {
  overflow: visible;
  padding: 0.25rem;
}

.mega-panel-inner > .mega-footer {
  margin-top: 0.125rem;
  border-top: 1px solid rgb(226 232 240);
}

.mega-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0;
  align-items: stretch;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
  overflow: hidden;
}

.mega-subgroup {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.375rem 0.25rem;
  border-right: 1px solid rgb(226 232 240);
}

.mega-subgroup--development {
  grid-column: 1;
  grid-row: 1;
  background: rgb(255 255 255);
  border-bottom: 1px solid rgb(226 232 240);
}

.mega-subgroup--design {
  grid-column: 2;
  grid-row: 1;
  background: rgb(250 245 255);
  border-bottom: 1px solid rgb(226 232 240);
}

.mega-subgroup--ai {
  grid-column: 3;
  grid-row: 1;
  background: rgb(239 246 255);
  border-bottom: 1px solid rgb(226 232 240);
  border-right: none;
}

.mega-subgroup--marketing {
  grid-column: 1;
  grid-row: 2;
  background: rgb(241 245 249);
  border-bottom: 1px solid rgb(226 232 240);
}

.mega-subgroup--others {
  grid-column: 2;
  grid-row: 2;
  background: rgb(237 233 254);
  border-bottom: 1px solid rgb(226 232 240);
}

.mega-group-title {
  margin-bottom: 0.1875rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.mega-link {
  gap: 0.375rem;
  padding: 0.125rem 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.25;
}

.mega-subgroup .mega-link + .mega-link {
  border-top: 1px solid rgb(226 232 240);
}

.mega-link-icon {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.25rem;
}

.mega-link-icon svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Column 3: Technology Stack spans rows 2+3 */
.mega-tech-panel {
  grid-column: 3;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-top: none;
  border-left: 1px solid rgb(226 232 240);
  border-right: none;
  background: rgb(236 253 245);
  padding: 0.5rem 0.5rem 0.625rem;
}

/* Bottom tagline where View all used to sit */
.mega-tagline {
  grid-column: 1 / span 2;
  grid-row: 3;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 3.75rem;
  padding: 0.85rem 1rem;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.97), rgba(15, 29, 58, 0.95) 55%, rgba(30, 27, 75, 0.96)),
    #0f172a;
}

.mega-tagline::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 120% at 0% 50%, rgba(51, 132, 252, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 100% at 100% 50%, rgba(139, 92, 246, 0.22), transparent 50%);
  pointer-events: none;
}

.mega-tagline::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.45), transparent);
  pointer-events: none;
}

.mega-tagline-kicker {
  position: relative;
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.9);
}

.mega-tagline-text {
  position: relative;
  margin: 0;
  max-width: 28rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #f8fafc;
}

.mega-tagline-accent {
  background: linear-gradient(90deg, #7dd3fc, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mega-tech-lead {
  margin: 0 0.35rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgb(100 116 139);
}

.mega-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 0.35rem 0.15rem;
  align-content: flex-start;
}

.mega-tech-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255 / 0.92);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgb(71 85 105);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.mega-tech-tag:hover {
  border-color: rgb(191 219 254);
  background: rgb(239 246 255);
  color: rgb(29 78 216);
}

@media (max-width: 767px) {
  .mega-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .mega-subgroup,
  .mega-subgroup--development,
  .mega-subgroup--design,
  .mega-subgroup--ai,
  .mega-subgroup--marketing,
  .mega-subgroup--others {
    grid-column: 1;
    grid-row: auto;
    border-right: none;
    border-bottom: 1px solid rgb(226 232 240);
  }

  .mega-tech-panel,
  .mega-tagline {
    grid-column: 1;
    grid-row: auto;
    border-left: none;
  }

  .mega-tech-panel {
    border-top: 1px solid rgb(226 232 240);
  }
}

/* Header - WhatsApp Get a Quote */
.header-wa-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 1rem 0.4375rem 0.4375rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #34d399 0%, #16a34a 48%, #15803d 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 4px 16px -6px rgba(22, 163, 74, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-wa-quote:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px -8px rgba(22, 163, 74, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.header-wa-quote:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}

.header-wa-quote__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: #fff;
  color: #16a34a;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.2);
}

.header-wa-quote__icon svg {
  width: 1rem;
  height: 1rem;
}

.header-wa-quote__label {
  padding-right: 0.125rem;
}

.header-wa-quote--mobile {
  width: calc(100% - 0.5rem);
  justify-content: center;
  padding: 0.6875rem 1rem;
  font-size: 0.875rem;
}

.header-wa-quote--mobile .header-wa-quote__icon {
  width: 2rem;
  height: 2rem;
}

.header-wa-quote--mobile .header-wa-quote__icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (prefers-reduced-motion: reduce) {
  .header-wa-quote {
    transition: none;
  }

  .header-wa-quote:hover {
    transform: none;
  }
}
