/* Finovate-inspired sections + richer reveal animations. */

:root {
  --spot-fin-dark: #16352b;
  --spot-fin-panel: #1a3d31;
  --spot-fin-lime: #a8ee70;
  --spot-fin-lime-deep: #87d84d;
  --spot-fin-cream: #f4f1ea;
  --spot-fin-ink: #13241d;
}

/* ——— Animations ——— */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal[data-reveal="fade"] {
  transform: none;
}

.reveal[data-reveal="zoom"] {
  transform: scale(0.94) translateY(16px);
}

.reveal[data-reveal="left"] {
  transform: translateX(-32px);
}

.reveal[data-reveal="right"] {
  transform: translateX(32px);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Auto-stagger common section children. */
.elementor-widget-spot_showcase .showcase-card.reveal:nth-child(1),
.elementor-widget-spot_featured_products .spot-featured-card.reveal:nth-child(1),
.elementor-widget-spot_approach .reference-card.reveal:nth-child(1) {
  --reveal-delay: 0ms;
}
.elementor-widget-spot_showcase .showcase-card.reveal:nth-child(2),
.elementor-widget-spot_featured_products .spot-featured-card.reveal:nth-child(2),
.elementor-widget-spot_approach .reference-card.reveal:nth-child(2) {
  --reveal-delay: 90ms;
}
.elementor-widget-spot_showcase .showcase-card.reveal:nth-child(3),
.elementor-widget-spot_featured_products .spot-featured-card.reveal:nth-child(3),
.elementor-widget-spot_approach .reference-card.reveal:nth-child(3) {
  --reveal-delay: 180ms;
}

/* ——— Shared Finovate bits ——— */
.spot-fin-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spot-fin-badge--soft {
  border-color: rgba(19, 36, 29, 0.12);
  background: rgba(255, 255, 255, 0.55);
  color: var(--spot-fin-ink);
}

.spot-fin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--spot-fin-ink);
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.25s, background 0.25s, color 0.25s;
}

.spot-fin-pill:hover {
  transform: translateY(-3px);
  background: var(--spot-fin-lime);
}

.spot-fin-pill--dark {
  background: var(--spot-fin-dark);
  color: #fff;
}

.spot-fin-pill--dark:hover {
  background: var(--green);
  color: #fff;
}

/* ——— Services ——— */
.spot-fin-services {
  padding: 28px 20px 10px;
}

.spot-fin-services__panel {
  padding: 54px 50px 48px;
  border-radius: 42px;
  background: linear-gradient(165deg, var(--spot-fin-panel) 0%, #0f2a22 100%);
  color: #fff;
  box-shadow: 0 30px 80px rgba(15, 42, 34, 0.18);
}

.spot-fin-services__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px 40px;
  align-items: end;
  margin-bottom: 36px;
}

.spot-fin-services__intro {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.spot-fin-services__title {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  font-weight: 800;
}

.spot-fin-services__title span {
  color: var(--spot-fin-lime);
}

.spot-fin-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.spot-fin-svc-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 16px 16px 18px;
  border-radius: 28px;
  background: var(--spot-fin-lime);
  color: var(--spot-fin-ink);
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.spot-fin-svc-card:hover {
  transform: translateY(-8px);
  background: var(--spot-fin-lime-deep);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.16);
}

.spot-fin-svc-card__media {
  position: relative;
  flex: 1;
  min-height: 210px;
  overflow: hidden;
  background: transparent;
  margin: -16px;
  border-radius: 28px;
}

/* White decorative shape behind the photo (Finovate ::before). */
.spot-fin-svc-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 220px;
  mask-image: var(--spot-svc-before);
  mask-size: contain;
  mask-position: left top;
  mask-repeat: no-repeat;
  -webkit-mask-image: var(--spot-svc-before);
  -webkit-mask-size: contain;
  -webkit-mask-position: left top;
  -webkit-mask-repeat: no-repeat;
  
  /* اللون سيظهر من خلال الماسك */
  background-color: var(--line); /* أو أي لون تريده */
  opacity: 0.85;
}

.spot-fin-svc-card__media img {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  /* Smaller than the white before shape so it sits inside it. */
  width: 75%;
  height: 75%!important;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  transform-origin: left top;
  -webkit-mask-image: var(--spot-svc-mask);
  mask-image: var(--spot-svc-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: left top;
  mask-position: left top;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}

.spot-fin-svc-card:hover .spot-fin-svc-card__media img {
  transform: scale(1.04);
}

.spot-fin-mask--1,
.spot-fin-mask--blob {
  --spot-svc-before: url("../masks/mask-service-1-before.svg");
  --spot-svc-mask: url("../masks/mask-service-1-image.svg");
}

.spot-fin-mask--2,
.spot-fin-mask--flower {
  --spot-svc-before: url("../masks/spot-icon-frame.svg");
  --spot-svc-mask: url("../masks/spot-icon.svg");
}

.spot-fin-mask--3,
.spot-fin-mask--shield {
  --spot-svc-before: url("../masks/mask-service-3-before.svg");
  --spot-svc-mask: url("../masks/mask-service-3-image.svg");
}

.spot-fin-mask--4,
.spot-fin-mask--tilt {
  --spot-svc-before: url("../masks/mask-service-4-before.svg");
  --spot-svc-mask: url("../masks/mask-service-4-image.svg");
}

.spot-fin-svc-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 0 4px;
}

.spot-fin-svc-card__foot strong {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.spot-fin-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--spot-fin-ink);
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.25s, background 0.25s, color 0.25s;
}

.spot-fin-svc-card:hover .spot-fin-arrow {
  background: var(--spot-fin-dark);
  color: #fff;
  transform: rotate(45deg);
}

/* ——— Why Us ——— */
.spot-fin-why {
  --why-pin-top: 110px;
  padding: 28px 20px 40px;
}

.spot-fin-why__stage {
  position: relative;
  /* Tall runway — sticky pin stays in flow (no left/right jump). */
  min-height: 650px;
  overflow: visible;
  isolation: isolate;
  padding: 1px;
}

/* Clipped media/background layer (does not affect sticky). */
.spot-fin-why__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 42px;
  overflow: hidden;
  background-color: #2a3d35;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px rgba(15, 42, 34, 0.16);
  pointer-events: none;
}

.spot-fin-why__bg:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 28, 22, 0.28), rgba(12, 28, 22, 0.05) 55%, transparent);
}

/* Fallback if older markup still puts image on the stage. */
.spot-fin-why__stage[style*="background-image"] {
  border-radius: 42px;
  background-color: #2a3d35;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px rgba(15, 42, 34, 0.16);
}

.spot-fin-why__card {
  position: sticky;
  top: var(--why-pin-top);
  z-index: 2;
  width: min(620px, calc(100% - 48px));
  margin: 48px 0 48px 48px;
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(8px);
  color: var(--spot-fin-ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14);
  backface-visibility: hidden;
}

.spot-fin-why__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.spot-fin-why__mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--spot-fin-lime);
  color: var(--spot-fin-ink);
  font-size: 22px;
  font-weight: 800;
}

.spot-fin-why__title {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.spot-fin-why__title mark {
  display: inline;
  background: var(--spot-fin-lime);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 0.16em;
  font-size: 0.92em;
  white-space: pre-wrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.spot-fin-why__title mark.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  background: currentColor;
  vertical-align: -0.05em;
  animation: spot-why-caret 0.8s steps(1) infinite;
}

@keyframes spot-why-caret {
  50% {
    opacity: 0;
  }
}

.spot-fin-why__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
}

.spot-fin-why__text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(19, 36, 29, 0.72);
}

.spot-fin-why__card .spot-fin-pill {
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

/* Showcase lime — organic SVG mask only (no white before). */
.showcase-lime .showcase-cutout--organic {
  height: 420px;
  clip-path: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 18px 0;
}

.showcase-lime .showcase-cutout--organic img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
    -webkit-mask-image: url(../masks/star-mask.svg);
    mask-image: url(../masks/star-mask.svg);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    transition: transform 0.55s ease;
    margin: -35px 0 0 -45px;
}

.showcase-lime:hover .showcase-cutout--organic img {
  transform: scale(1.035);
}

@media (max-width: 1100px) {
  .spot-fin-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .spot-fin-services {
    padding: 18px 12px 6px;
  }

  .spot-fin-services__panel {
    padding: 34px 20px 22px;
    border-radius: 28px;
  }

  .spot-fin-services__head {
    grid-template-columns: 1fr;
  }

  .spot-fin-services__grid {
    grid-template-columns: 1fr;
  }

  .spot-fin-svc-card {
    min-height: 280px;
  }

  .spot-fin-why {
    --why-pin-top: 92px;
    padding: 18px 12px 28px;
  }

  .spot-fin-why__stage {
    min-height: 150vh;
  }

  .spot-fin-why__bg {
    border-radius: 28px;
  }

  .spot-fin-why__card {
    width: calc(100% - 32px);
    margin: 24px 16px;
    padding: 22px 18px;
  }

  .spot-fin-why__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .showcase-lime .showcase-cutout--organic {
    height: 300px;
  }
}
@media (max-width: 700px) {
  .spot-fin-svc-card__media img{
    width: 90%!important;
    height: 90% !important;
  }
}