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

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

.admin-front-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-front-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
}

.admin-front-bar-identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  min-width: 0;
  font-size: 0.8125rem;
}

.admin-front-bar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 0.35rem;
  background: #3384fc;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
}

.admin-front-bar-signed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbd5e1;
}

.admin-front-bar-signed strong {
  color: #fff;
  font-weight: 600;
}

.admin-front-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-front-bar-link,
.admin-front-bar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-front-bar-link:hover {
  border-color: rgba(51, 132, 252, 0.55);
  background: rgba(51, 132, 252, 0.2);
}

.admin-front-bar-logout {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.35);
}

.admin-front-bar-logout:hover {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(185, 28, 28, 0.55);
  color: #fff;
}

.has-admin-front-bar .site-header {
  top: 2.5rem;
}

@media (max-width: 640px) {
  .admin-front-bar-signed {
    max-width: 9.5rem;
  }
}

.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-more {
  font-weight: 600;
  color: rgb(29 78 216);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mega-tech-more:hover {
  color: rgb(30 64 175);
}

.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;
  }
}

.dropdown-panel {
  pointer-events: none;
  visibility: hidden;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  min-width: 17.5rem;
  padding-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-item:hover .dropdown-panel,
.nav-item:focus-within .dropdown-panel,
.nav-item.is-open .dropdown-panel {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.dropdown-panel-inner {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.35);
}

.dropdown-panel-label {
  margin: 0 0 0.25rem;
  padding: 0.25rem 0.625rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1d65f1;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.625rem;
  border-radius: 0.75rem;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-link + .dropdown-link {
  margin-top: 0.125rem;
}

.dropdown-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.dropdown-link-icon {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #1d65f1;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-link-icon svg {
  width: 1rem;
  height: 1rem;
}

.dropdown-link:hover .dropdown-link-icon,
.mobile-sub-link:hover .dropdown-link-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.dropdown-link-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.125rem;
}

.dropdown-link-label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #1e293b;
  transition: color 0.15s ease;
}

.dropdown-link:hover .dropdown-link-label,
.mobile-sub-link:hover .dropdown-link-label {
  color: #1d4ed8;
}

.dropdown-link-desc {
  font-size: 0.75rem;
  line-height: 1.35;
  color: #64748b;
  transition: color 0.15s ease;
}

.dropdown-link:hover .dropdown-link-desc,
.mobile-sub-link:hover .dropdown-link-desc {
  color: rgba(29, 78, 216, 0.75);
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.625rem;
  border-radius: 0.75rem;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-sub-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.mobile-sub-link .dropdown-link-icon {
  width: 2rem;
  height: 2rem;
}

.mobile-sub-link .dropdown-link-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}
