/* Smart Home Interactive Showcase */
.smart-showcase {
  --accent: #0dc0c0;
  --accent-light: #5ee8e8;
  --accent-glow: rgba(13, 192, 192, 0.55);
  --accent-soft: rgba(13, 192, 192, 0.12);
  position: relative;
  width: 100%;
  min-height: 750px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.smart-showcase__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.smart-showcase__particles::before,
.smart-showcase__particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-ambient 8s ease-in-out infinite;
}

.smart-showcase__particles::before {
  width: 120px;
  height: 120px;
  left: 28%;
  top: 38%;
  background: radial-gradient(circle, rgba(13, 192, 192, 0.14) 0%, transparent 70%);
}

.smart-showcase__particles::after {
  width: 90px;
  height: 90px;
  right: 22%;
  top: 52%;
  background: radial-gradient(circle, rgba(94, 232, 232, 0.1) 0%, transparent 70%);
  animation-delay: 4s;
}

/* Large backlight glow — absolute behind building image */
.smart-showcase__glow {
  position: absolute;
    left: 50%;
    bottom: 0%;
    z-index: 0;
    width: 150%;
    max-width: 880px;
    height: 100%;
    min-height: 750px;
    transform: translateX(-50%);
    transform-origin: center bottom;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(ellipse 52% 48% at 50% 55%, rgba(94, 232, 232, 0.35) 0%, rgba(13, 192, 192, 0.75) 14%, rgba(13, 192, 192, 0.85) 30%, rgba(13, 192, 192, 0.95) 48%, rgba(13, 192, 192, 0.45) 62%, transparent 100%);
    filter: blur(60px);
    animation: building-glow-breathe 7s ease-in-out infinite;
}

@keyframes building-glow-breathe {
  0%,
  100% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes particle-ambient {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.smart-showcase__particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--accent);
  opacity: var(--opacity, 0.25);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: particle-float var(--duration, 12s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  left: var(--x, 50%);
  top: var(--y, 50%);
}

.smart-showcase__particle--glow {
  box-shadow: 0 0 14px var(--accent-glow), 0 0 24px rgba(13, 192, 192, 0.15);
}

.smart-showcase__particle--soft {
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: calc(var(--opacity, 0.2) * 0.8);
}

@keyframes particle-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: var(--opacity, 0.2);
  }
  50% {
    transform: translate(var(--dx, 12px), var(--dy, -18px)) scale(1.2);
    opacity: calc(var(--opacity, 0.2) * 1.5);
  }
}

.smart-showcase__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.5rem;
  height: 100%;
  min-height: inherit;
  overflow: visible;
}

.smart-showcase__image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 750px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.smart-showcase__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 750px;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  margin: 0 auto;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
  filter:
    drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 48px rgba(13, 192, 192, 0.12));
}

@media (hover: hover) and (pointer: fine) {
  .smart-showcase__image-wrap:has(.smart-showcase__image:hover) .smart-showcase__image {
    transform: scale(1.02);
    filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 40px rgba(13, 192, 192, 0.08));
  }
}

.smart-showcase__hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
}

.smart-showcase.is-popup-open .hotspot:not(.is-active) {
  opacity: 0.45;
  transform: scale(0.92);
}

/* Hotspot button */
.hotspot {
  position: absolute;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.35s ease, transform 0.35s ease, z-index 0s;
  -webkit-tap-highlight-color: transparent;
}

.hotspot__core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 0 var(--accent-glow),
    0 0 20px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: hotspot-breathe 3s ease-in-out infinite;
}

.hotspot__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0.55;
  animation: hotspot-pulse 2.2s ease-out infinite;
}

.hotspot__ring--delay {
  animation-delay: 1.1s;
}

.hotspot__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
}

.hotspot__icon svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}

@keyframes hotspot-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes hotspot-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(13, 192, 192, 0.4),
      0 0 16px rgba(13, 192, 192, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(13, 192, 192, 0.08),
      0 0 28px rgba(13, 192, 192, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: scale(1.06);
  }
}

@media (hover: hover) and (pointer: fine) {
  .hotspot:hover .hotspot__core {
    transform: scale(1.12);
  }

  .hotspot:hover {
    z-index: 5;
  }
}

.hotspot.is-active {
  z-index: 10;
}

.hotspot.is-active .hotspot__core {
  transform: scale(1.08);
  box-shadow:
    0 0 0 4px rgba(13, 192, 192, 0.25),
    0 0 32px rgba(13, 192, 192, 0.7),
    0 0 64px rgba(13, 192, 192, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: hotspot-active-glow 1.5s ease-in-out infinite;
}

.hotspot.is-active .hotspot__ring {
  animation: hotspot-ring-active 1.8s ease-out infinite;
}

.hotspot:focus-visible {
  outline: none;
}

.hotspot:focus-visible .hotspot__core {
  box-shadow:
    0 0 0 3px rgba(13, 192, 192, 0.5),
    0 0 24px rgba(13, 192, 192, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Inside landing hero */
#hero .smart-showcase {
  min-height: 750px;
  align-self: stretch;
}

#hero .smart-showcase__stage {
  padding: 0;
}

#hero .smart-showcase__image-wrap,
#hero .smart-showcase__image {
  min-height: 750px;
}

@keyframes hotspot-active-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

@keyframes hotspot-ring-active {
  0% {
    transform: scale(1);
    opacity: 0.9;
    border-width: 3px;
  }
  100% {
    transform: scale(2);
    opacity: 0;
    border-width: 1px;
  }
}

/* Popup — anchored near clicked hotspot (JS positions left/top) */
.smart-showcase__overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.smart-showcase__overlay.is-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.smart-showcase__overlay.is-centered .smart-showcase__popup {
  position: relative;
  left: auto !important;
  top: auto !important;
}

.smart-showcase__overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.smart-showcase__overlay.is-open .smart-showcase__popup {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.smart-showcase__beam {
  display: none !important;
}

.smart-showcase__popup {
  position: absolute;
  left: 0;
  top: 0;
  width: min(340px, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  margin: 0;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(
    155deg,
    rgba(28, 58, 88, 0.60) 0%,
    rgba(12, 28, 52, 0.65) 55%,
    rgba(8, 20, 40, 0.60) 100%
  );
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(13, 192, 192, 0.35);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    -4px 0 24px rgba(13, 192, 192, 0.12),
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(13, 192, 192, 0.15);
  color: #fff;
  opacity: 0;
  transform: translateY(10px) translateX(8px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}


.smart-showcase__popup-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-light) 35%,
    var(--accent) 50%,
    var(--accent-light) 65%,
    transparent 100%
  );
  opacity: 0.9;
  pointer-events: none;
}

.smart-showcase__popup-head,
.smart-showcase__popup-body {
  position: relative;
  z-index: 2;
}

.smart-showcase__popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.smart-showcase__popup-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.smart-showcase__popup-icon {
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 192, 192, 0.35) 0%, rgba(13, 192, 192, 0.08) 100%);
  border: 1px solid rgba(13, 192, 192, 0.45);
  color: var(--accent-light);
  box-shadow: 0 0 20px rgba(13, 192, 192, 0.2);
}

.smart-showcase__popup-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.smart-showcase__popup-titles {
  min-width: 0;
}

.smart-showcase__popup-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ef0f0;
}

.smart-showcase__popup-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.smart-showcase__popup-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.smart-showcase__popup-close:hover,
.smart-showcase__popup-close:focus-visible {
  background: rgba(13, 192, 192, 0.2);
  color: #fff;
  outline: none;
  transform: scale(1.05);
}

.smart-showcase__popup-body {
  padding: 0 1rem 1rem 1.15rem;
}

.smart-showcase__popup-desc {
  margin: 0.5rem 0 0.9rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.smart-showcase__popup-services-title {
  margin: 0 0 0.55rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ef8f8;
}

.smart-showcase__popup-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
  max-height: none;
}

.smart-showcase__popup-tags li {
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.3;
  color: #f0feff;
  background: rgba(13, 192, 192, 0.18);
  border: 1px solid rgba(13, 192, 192, 0.4);
  border-radius: 999px;
  white-space: nowrap;
  margin: 0.5rem 0px;
}

/* Standalone showcase page — popup centered in component */
.smart-showcase--standalone .smart-showcase__overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: transparent;
}

.smart-showcase--standalone .smart-showcase__popup {
  position: relative;
  left: auto !important;
  top: auto !important;
  width: min(340px, 92vw);
}

@media (max-width: 767px) {
  .smart-showcase {
    min-height: min(750px, 82dvh);
  }

  .smart-showcase__image-wrap,
  .smart-showcase__image {
    min-height: min(750px, 82dvh);
  }

  #hero .smart-showcase,
  #hero .smart-showcase__image-wrap,
  #hero .smart-showcase__image {
    min-height: min(750px, 82dvh);
  }

  .smart-showcase__stage {
    padding: 0.25rem;
  }

  .hotspot {
    width: 2.125rem;
    height: 2.125rem;
    margin: -1.0625rem 0 0 -1.0625rem;
  }

  .hotspot__icon svg {
    width: 0.85rem;
    height: 0.85rem;
  }

  .smart-showcase__popup {
    width: min(340px, 100%);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #hero .smart-showcase,
  #hero .smart-showcase__image-wrap,
  #hero .smart-showcase__image {
    min-height: min(560px, 68dvh);
  }

  #hero .smart-showcase {
    min-height: min(560px, 68dvh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smart-showcase__particles::before,
  .smart-showcase__particles::after,
  .smart-showcase__glow,
  .smart-showcase__glow::after {
    animation: none;
  }

  .smart-showcase__particle,
  .hotspot__ring,
  .hotspot__core,
  .hotspot.is-active .hotspot__core,
  .hotspot.is-active .hotspot__ring {
    animation: none;
  }

  .smart-showcase__image,
  .smart-showcase__popup,
  .smart-showcase__overlay {
    transition: none;
  }
}
