/* Smart Sensors — premium hero gallery grid */

.pd-hero--sensors .pd-hero__media {
  max-width: min(100%, 720px);
}

.pd-sensor-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  width: 100%;
}

.pd-sensor-gallery__card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(0.85rem, 1.5vw, 1.05rem);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(6, 8, 14, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.45s var(--ease, ease),
    border-color 0.4s ease,
    box-shadow 0.45s ease;
  animation: pdSensorCardFloat 7s ease-in-out infinite;
}

.pd-sensor-gallery__card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 181, 255, 0.28);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(59, 139, 255, 0.1);
  animation-play-state: paused;
}

.pd-sensor-gallery__media {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 0.92;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.35rem, 1vw, 0.55rem);
  background:
    radial-gradient(circle at 50% 18%, rgba(59, 139, 255, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(12, 16, 24, 0.95), rgba(4, 6, 10, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pd-sensor-gallery__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  transition: transform 0.45s var(--ease, ease);
}

.pd-sensor-gallery__card:hover .pd-sensor-gallery__media img {
  transform: scale(1.03);
}

.pd-sensor-gallery__label {
  margin: 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

/* Per-sensor accent tints */
.pd-sensor-gallery__card--motion .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(59, 139, 255, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(10, 14, 24, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--door .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(80, 200, 255, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(10, 16, 22, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--smoke .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 170, 80, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(16, 12, 10, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--gas .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 120, 60, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(18, 10, 8, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--water .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(40, 180, 200, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(8, 14, 18, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--temp .pd-sensor-gallery__media {
  background:
    radial-gradient(circle at 50% 20%, rgba(160, 120, 255, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(12, 10, 20, 0.96), rgba(4, 6, 10, 0.98));
}

.pd-sensor-gallery__card--motion { animation-delay: 0s; }
.pd-sensor-gallery__card--door { animation-delay: 0.35s; }
.pd-sensor-gallery__card--smoke { animation-delay: 0.7s; }
.pd-sensor-gallery__card--gas { animation-delay: 1.05s; }
.pd-sensor-gallery__card--water { animation-delay: 1.4s; }
.pd-sensor-gallery__card--temp { animation-delay: 1.75s; }

@keyframes pdSensorCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

html[data-theme="light"] .pd-sensor-gallery__card {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.9)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .pd-sensor-gallery__media {
  border-color: rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .pd-hero--sensors .pd-hero__media {
    max-width: min(100%, 560px);
    margin: 0 auto;
  }

  .pd-sensor-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .pd-sensor-gallery {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-sensor-gallery__card {
    animation: none;
  }

  .pd-sensor-gallery__card:hover {
    transform: none;
  }
}
