.fcs-flip-grid,
.fcs-flip-grid * {
  box-sizing: border-box;
}

.fcs-flip-grid {
  --fcs-gap: clamp(16px, 2.6vw, 30px);
  display: grid;
  grid-template-columns: repeat(var(--fcs-columns, 2), minmax(0, 1fr));
  gap: var(--fcs-gap);
  width: min(100%, 1250px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
  background: var(--fcs-bg, #c5a770);
  overflow: hidden;
  isolation: isolate;
}

.fcs-flip-card {
  --fcs-depth: 320px;
  position: relative;
  min-width: 0;
  height: var(--fcs-card-height, 230px);
  perspective: 1200px;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
}

.fcs-flip-card:hover,
.fcs-flip-card:focus,
.fcs-flip-card:focus-within,
.fcs-flip-card.fcs-is-active {
  z-index: 5;
}

.fcs-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--fcs-depth) / -2)) rotateY(0deg);
  transition: transform 900ms cubic-bezier(.22,.8,.24,1);
  will-change: transform;
}

/* Cube-style action like the second sample: the new panel appears as the side of a 3D box. */
.fcs-hover .fcs-flip-card:hover .fcs-flip-inner,
.fcs-hover .fcs-flip-card:focus .fcs-flip-inner,
.fcs-hover .fcs-flip-card:focus-within .fcs-flip-inner,
.fcs-hover .fcs-flip-card.fcs-is-active .fcs-flip-inner {
  transform: translateZ(calc(var(--fcs-depth) / -2)) rotateY(-90deg);
}

.fcs-auto .fcs-flip-inner {
  animation: fcsCubeAuto 7s infinite cubic-bezier(.22,.8,.24,1);
}

.fcs-auto .fcs-flip-card:nth-child(2n) .fcs-flip-inner {
  animation-delay: 1.1s;
}

.fcs-auto .fcs-flip-card:nth-child(3n) .fcs-flip-inner {
  animation-delay: 2.2s;
}

.fcs-auto .fcs-flip-card:hover .fcs-flip-inner,
.fcs-auto .fcs-flip-card:focus .fcs-flip-inner {
  animation-play-state: paused;
}

.fcs-flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.8vw, 30px);
  overflow: hidden;
  background-color: var(--fcs-card-bg, #48231c);
  background-position: center;
  background-size: cover;
  color: var(--fcs-text, #d4b878);
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}

.fcs-flip-front {
  transform: translateZ(calc(var(--fcs-depth) / 2)) scale(1.002);
}

.fcs-flip-back {
  transform: rotateY(90deg) translateZ(calc(var(--fcs-depth) / 2)) scale(1.002);
}

.fcs-has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.fcs-face-content {
  position: relative;
  z-index: 2;
  max-width: 94%;
}

.fcs-face-content h3 {
  margin: 0 0 10px;
  color: inherit;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(32px, 3.0vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}


.fcs-flip-front .fcs-face-content h3 {
  color: var(--fcs-front-heading-card, var(--fcs-text, #d4b878));
}

.fcs-flip-back .fcs-face-content h3 {
  color: var(--fcs-text, #d4b878);
}

.fcs-face-content p {
  margin: 0;
  color: inherit;
  font-size: clamp(17px, 1.2vw, 22px);
  line-height: 1.45;
}

@keyframes fcsCubeAuto {
  0%, 34% {
    transform: translateZ(calc(var(--fcs-depth) / -2)) rotateY(0deg);
  }
  48%, 82% {
    transform: translateZ(calc(var(--fcs-depth) / -2)) rotateY(-90deg);
  }
  96%, 100% {
    transform: translateZ(calc(var(--fcs-depth) / -2)) rotateY(0deg);
  }
}

@media (max-width: 900px) {
  .fcs-flip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 760px);
  }
}

@media (max-width: 640px) {
  .fcs-flip-grid {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 14px;
    gap: 16px;
  }

  .fcs-flip-card {
    height: min(var(--fcs-card-height, 230px), 220px);
  }

  .fcs-face-content h3 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .fcs-face-content p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fcs-flip-inner {
    transition: none;
  }

  .fcs-auto .fcs-flip-inner {
    animation: none;
  }
}