/* Home services ambient — Fase 2 (opt-in con PORTAL_HOME_AMBIENT=1) */

.home-services-zone {
  position: relative;
  margin-top: -6px;
  padding-top: 10px;
  z-index: 1;
}

.home-services-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.62) 38%,
    rgba(255, 255, 255, 0.92) 72%,
    rgba(255, 255, 255, 1) 100%
  );
}

.home-services--ambient {
  position: relative;
  z-index: 1;
}

.home-services--ambient .home-service {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  border: 1px solid rgba(var(--brand-rgb), 0.14) !important;
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  opacity: 0;
  animation: portal-home-service-enter 0.52s ease forwards;
}

.home-services--ambient .home-service:nth-child(1) { animation-delay: 0.04s; }
.home-services--ambient .home-service:nth-child(2) { animation-delay: 0.1s; }
.home-services--ambient .home-service:nth-child(3) { animation-delay: 0.16s; }
.home-services--ambient .home-service:nth-child(4) { animation-delay: 0.22s; }
.home-services--ambient .home-service:nth-child(5) { animation-delay: 0.28s; }
.home-services--ambient .home-service:nth-child(6) { animation-delay: 0.34s; }
.home-services--ambient .home-service:nth-child(7) { animation-delay: 0.4s; }

@keyframes portal-home-service-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-services--ambient .home-service:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-rgb), 0.24) !important;
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(var(--brand-rgb), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.home-services--ambient .home-service-icon {
  overflow: hidden;
  border-radius: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .home-services--ambient .home-service {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.home-shell[data-portal-ambient-freeze="1"] .home-services--ambient .home-service {
  animation: none !important;
  opacity: 1;
  transform: none;
}
