/* =========================================================
   V38 — Features page targeted fixes
   Scope: Solution/Features page + shared Solution mega menu
   ========================================================= */
/* --- Solution mega menu: exactly two feature columns --- */
.v6-header .mega-menu-inner {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
.v6-header .feature-menu-grid, .v6-header .mega-grid.feature-menu-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.v6-header .mega-section {
  min-width: 0;
}
/* --- Hero/overview image motion: subtle product movement + scan --- */
.features-page .features-dashboard-motion {
  overflow: visible;
  isolation: isolate;
}
.features-page .features-dashboard-motion::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 2%;
  bottom: 2%;
  width: 22%;
  left: -28%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(76, 180, 255, .15), rgba(255,255,255,.08), transparent);
  filter: blur(5px);
  transform: skewX(-10deg);
  animation: fpDashboardScan 5.8s cubic-bezier(.42,0,.2,1) infinite;
}
.features-page .features-dashboard-motion > img {
  animation: fpDashboardFloat 6.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes fpDashboardFloat {
  0%,100% {
    transform: rotateX(4deg) translateY(0) scale(1);
  }
  50% {
    transform: rotateX(3deg) translateY(-7px) scale(1.006);
  }
}
@keyframes fpDashboardScan {
  0%, 18% {
    left: -28%;
    opacity: 0;
  }
  28% {
    opacity: .7;
  }
  62% {
    opacity: .85;
  }
  76%,100% {
    left: 112%;
    opacity: 0;
  }
}
/* --- Feature grid: filled rows, no visual holes --- */
.features-page .features-bento {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: minmax(270px, auto);
  align-items: stretch;
}
.features-page .feature-bento-card {
  min-height: 270px;
  height: 100%;
}
.features-page .feature-bento-wide {
  grid-column: span 2;
}
.features-page .feature-bento-tall {
  grid-row: span 1;
  min-height: 270px;
}
.features-page .feature-bento-card > div:not(.feature-mini-orbit) {
  margin-top: 32px;
}
.features-page .feature-bento-card p {
  padding-right: 0;
}
.features-page .feature-arrow {
  position: static;
  align-self: flex-end;
  flex: 0 0 auto;
  margin-top: 22px;
}
.features-page .feature-mini-orbit {
  margin-top: 26px !important;
  margin-bottom: 8px !important;
}
/* --- Signal → Action timeline animation --- */
.features-page .feature-flow-animated {
  position: relative;
  overflow: hidden;
}
.features-page .feature-flow-animated::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 57px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, #0077ff, #52b6ff, #0077ff);
  box-shadow: 0 0 16px rgba(0,119,255,.7);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}
.features-page .feature-flow-animated.timeline-active::before {
  animation: fpTimelineDraw 2.7s cubic-bezier(.22,.7,.2,1) forwards;
}
.features-page .feature-flow-animated article {
  transition: background-color .35s ease, box-shadow .35s ease;
}
.features-page .feature-flow-animated article > span {
  position: relative;
  z-index: 6;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  border: 1px solid rgba(0,119,255,.5);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #031326;
  color: #77beff;
}
.features-page .feature-flow-animated.timeline-active article > span {
  animation: fpStepPulse 3.8s ease-in-out infinite;
}
.features-page .feature-flow-animated.timeline-active article:nth-child(2) > span {
  animation-delay: .55s;
}
.features-page .feature-flow-animated.timeline-active article:nth-child(3) > span {
  animation-delay: 1.1s;
}
.features-page .feature-flow-animated.timeline-active article:nth-child(4) > span {
  animation-delay: 1.65s;
}
@keyframes fpTimelineDraw {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: .85;
  }
}
@keyframes fpStepPulse {
  0%,78%,100% {
    box-shadow: 0 0 0 rgba(0,119,255,0);
    border-color: rgba(0,119,255,.45);
  }
  84% {
    box-shadow: 0 0 0 6px rgba(0,119,255,.08), 0 0 24px rgba(0,119,255,.5);
    border-color: #59b5ff;
  }
}
/* --- Spotlight: equal-height columns --- */
.features-page .features-spotlight-grid {
  align-items: stretch;
}
.features-page .features-spotlight-copy, .features-page .features-spotlight-visual {
  min-height: 540px;
  height: 100%;
}
.features-page .features-spotlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.features-page .features-spotlight-visual {
  display: flex;
  align-items: stretch;
}
.features-page .features-spotlight-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* --- Responsive --- */
@media (max-width: 1050px) {
  .features-page .features-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features-page .feature-bento-wide {
    grid-column: span 2;
  }
  .features-page .feature-flow-animated::before {
    display: none;
  }
  .features-page .features-spotlight-copy,   .features-page .features-spotlight-visual {
    min-height: 0;
  }
  .features-page .features-spotlight-visual {
    aspect-ratio: 16/10;
  }
}
@media (max-width: 700px) {
  .v6-header .feature-menu-grid,   .v6-header .mega-grid.feature-menu-grid {
    grid-template-columns: 1fr !important;
  }
  .features-page .features-bento {
    grid-template-columns: 1fr;
  }
  .features-page .feature-bento-wide {
    grid-column: span 1;
  }
  .features-page .feature-bento-card {
    min-height: 250px;
  }
  .features-page .features-dashboard-motion::after {
    display: none;
  }
  .features-page .features-dashboard-motion > img {
    animation-duration: 7.5s;
  }
  .features-page .features-spotlight-visual {
    aspect-ratio: 4/3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .features-page .features-dashboard-motion::after,   .features-page .features-dashboard-motion > img,   .features-page .feature-flow-animated.timeline-active::before,   .features-page .feature-flow-animated.timeline-active article > span {
    animation: none !important;
  }
  .features-page .feature-flow-animated::before {
    transform: scaleX(1);
    opacity: .45;
  }
}
.features-page .features-dashboard-motion > img {
  translate: var(--fp-px, 0) var(--fp-py, 0);
  transition: translate .18s ease-out;
}

/* V56 shared compact mega menu */
@media (min-width: 993px) {
  .v6-header .mega-menu {
    width: min(840px, calc(100vw - 64px)) !important;
  }
  .v6-header .mega-menu-inner {
    padding: 18px !important;
  }
  .v6-header .feature-menu-grid,
  .v6-header .mega-grid.feature-menu-grid {
    gap: 6px !important;
  }
  .v6-header .mega-item {
    padding: 9px 10px !important;
  }
}
