/* CSS for Card flipping section */
.acf-layout-card-flipping-section {
  padding: 80px 0;
  position: relative;
  /* background-color: #2c2d2d; */
  background-color: var(--color-2);
  width: 100%;
}

/* Row wrapper with -10px horizontal margins to offset column gutters */
.card-flipping-row {
  margin-left: -10px !important;
  margin-right: -10px !important;
}

/* 10px padding on each side creates exactly a 20px gap between columns */
.card-flipping-row > [class*="col-"] {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* 3D Flip Card Container */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 350px;
  perspective: 1200px;
  cursor: pointer;
  box-sizing: border-box;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Flip active state (hover only on desktop or class toggled) */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

    .flip-card:hover .card-content-wrap {
        max-width: 100%;
    }

@media (min-width: 768px) {
  .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
  }
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-sizing: border-box;
}

/* Back Face needs 180deg rotation initially */
.flip-card-back {
  transform: rotateY(180deg);
}

/* Image Background (HTML img tag) spans 100% of card face */
.card-image-bg {
  position: absolute;
  top: 1%;
  left: 1%;
  width: 98%;
  height: 97%;
  object-fit: cover;
  z-index: 1;
  border-radius: inherit;
}

/* Back Face blurred background image */
.flip-card-back .card-image-bg.blurred {
  filter: blur(16px);
  transform: scale(1.15); /* prevents transparent blurred edges */
}

/* Dark gradient overlay spans 100% of card face */
.card-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}

/* Card rough SVG border overlay */
.card-rough-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  box-sizing: border-box;
}

.card-rough-border img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* Text Container */
.card-content-wrap {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: auto;
  z-index: 4;
  pointer-events: none;
  max-width: 70%;
}

.card-title,
.card-description {
  color: #000 !important;
  margin: 0;
  padding: 0;
}

.card-title {
  text-align: left;
  color: #000 !important;
}

.card-description {
  font-family: Clash Display;
font-weight: 400;
font-style: Regular;
font-size: 32px;
leading-trim: NONE;
line-height: 100%;
letter-spacing: 0%;

}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .acf-layout-card-flipping-section {
    padding: 50px 0;
  }
  .card-content-wrap {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .card-description {
    font-size: 1rem;
  }
  .flip-card {
    height: 135px;
  }
}
