/* ===== Feature boxes — photo cards (site yellow / white tone) ===== */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.features-grid--app {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 16px;
  max-width: 1080px;
  margin-inline: auto;
  width: 100%;
}

.service-box {
  position: relative;
  width: 100%;
  min-width: 0;
}

.service-box-card {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: 16px;
  overflow: hidden;
  background: #fffbeb;
  isolation: isolate;
  border: 1px solid rgba(234, 179, 8, 0.28);
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.1);
}

.service-box-card--compact {
  height: 248px;
}

.service-box-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translate(-50%, -50%) scale(1.14);
  transform-origin: center center;
  transition: transform 0.55s ease, filter 0.45s ease;
  filter: sepia(0.14) saturate(1.08) brightness(1.07) hue-rotate(-6deg);
}

.service-box-card:hover .service-box-photo {
  z-index: 0;
  transform: translate(-50%, -50%) scale(1.08);
  filter: sepia(0.14) saturate(1.05) brightness(1.05) hue-rotate(-6deg);
}

.service-box-card:focus-within .service-box-photo,
.service-box-card:has(.service-box-link:active) .service-box-photo {
  z-index: 0;
  transform: translate(-50%, -50%) scale(1.04);
}

.service-box-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(254, 249, 195, 0.28) 38%,
    rgba(253, 230, 138, 0.82) 72%,
    rgba(255, 255, 255, 0.97) 100%
  );
  transition: background 0.45s ease;
  pointer-events: none;
}

.service-box-card:hover .service-box-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(254, 240, 138, 0.45) 30%,
    rgba(234, 179, 8, 0.88) 78%,
    rgba(255, 255, 255, 1) 100%
  );
}

.service-box-card--soon .service-box-photo {
  filter: sepia(0.2) saturate(0.75) brightness(0.95) grayscale(0.15);
}

.service-box-card--bankcard {
  background-color: #fffbeb;
}

.service-box-card--bankcard::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../cartpro.webp') center center / cover no-repeat;
  transform: scale(1.06);
  transform-origin: center center;
  transition: transform 0.55s ease;
}

.service-box-card--bankcard:hover::before,
.service-box-card--bankcard:focus-within::before,
.service-box-card--bankcard:has(.service-box-link:active)::before {
  z-index: 0;
  transform: scale(1.02);
}

.service-box-card--bankcard .service-box-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(254, 249, 195, 0.22) 40%,
    rgba(253, 230, 138, 0.78) 75%,
    rgba(255, 255, 255, 0.96) 100%
  );
}

.service-box-card--bankcard:hover .service-box-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(254, 240, 138, 0.4) 32%,
    rgba(234, 179, 8, 0.85) 78%,
    rgba(255, 255, 255, 1) 100%
  );
}

.service-box-card--wallet {
  background-color: #fffbeb;
}

.service-box-card--wallet::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../walletp.webp') center 28% / cover no-repeat;
  transform: scale(1.06);
  transform-origin: center center;
  transition: transform 0.55s ease;
}

.service-box-card--wallet:hover::before,
.service-box-card--wallet:focus-within::before,
.service-box-card--wallet:has(.service-box-link:active)::before {
  z-index: 0;
  transform: scale(1.02);
}

.service-box-card--wallet .service-box-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(254, 249, 195, 0.2) 38%,
    rgba(253, 230, 138, 0.76) 72%,
    rgba(255, 255, 255, 0.96) 100%
  );
}

.service-box-card--wallet:hover .service-box-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(254, 240, 138, 0.38) 30%,
    rgba(234, 179, 8, 0.84) 76%,
    rgba(255, 255, 255, 1) 100%
  );
}

.service-box-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 78px;
  padding: 12px 10px 14px;
  text-align: center;
  transition: min-height 0.45s ease, padding 0.45s ease, background 0.35s ease, z-index 0s;
  z-index: 3;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 22%,
    rgba(255, 251, 235, 0.94) 100%
  );
}

.service-box-card:hover .service-box-content,
.service-box-card:focus-within .service-box-content,
.service-box-card:has(.service-box-link:active) .service-box-content {
  min-height: 148px;
  padding-bottom: 16px;
  z-index: 10;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.92) 16%,
    rgba(255, 251, 235, 0.98) 100%
  );
}

.service-box-content h3 {
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.service-box-tags {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 6px 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.4s ease;
}

.service-box-card:hover .service-box-tags,
.service-box-card:focus-within .service-box-tags {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.service-box-tags span {
  padding: 3px 9px;
  color: var(--dark);
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 999px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.service-box-tags span:hover {
  background: #fff;
  border-color: var(--primary);
}

.service-box-link {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 7px 18px;
  background: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--dark);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.4s ease;
  margin-top: 2px;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
}

.service-box-card:hover .service-box-link,
.service-box-card:focus-within .service-box-link {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.service-box-link:hover {
  background: var(--primary-light);
}

@media (max-width: 1100px) {
  .features-grid--app {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 900px;
  }
}

@media (max-width: 860px) {
  .features-grid--app {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .service-box-card--compact {
    height: 232px;
  }
}

@media (max-width: 560px) {
  .features-grid--app {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .service-box-card--compact {
    height: 218px;
  }

  .service-box-content h3 {
    font-size: 0.88rem;
  }

  .service-box-card--compact .service-box-content {
    min-height: 140px;
    padding: 12px 10px 14px;
  }
}

@media (max-width: 380px) {
  .service-box-card--compact {
    height: 200px;
  }
}

/* responsive rules → css/responsive.css */
