/* Flip Cards component */
.flip-cards-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 0;
}
.flip-cards {
  display: grid;
  /* Use flexible columns that fill available space; minmax(0,1fr) prevents overflow
     and allows the gap to be exactly 20px between cards */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  align-items: stretch;
}
.flip-card {
  perspective: 1200px;
}
.flip-card__inner {
  position: relative;
  width: 380px;
  height: 300px;
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card__inner,
.flip-card:focus-within .flip-card__inner {
  transform: rotateY(180deg);
}
.flip-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: flex-end !important;
  justify-content: center;
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
}
.flip-card__face--front {
  /* Image is applied via inline background-image on the element; overlay is added with ::after */
  background-color: #333;
  color: #fff;
  position: relative;
  overflow: hidden;
  height: 300px;
}
.flip-card__face--back {
  transform: rotateY(180deg);
  background: #fff;
  color: #222;
  text-align: left;
  padding: 28px;
  overflow: auto;
  align-items: center !important;
}

.flip-card__back-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--e-global-color-primary);
  display: none;
}
.flip-card__title {
  font-family: var(--e-global-typography-primary-font-family), serif;
  font-size: 1.2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  z-index: 0;
}

/* Overlay using theme primary color with gradient from bottom */
.flip-card__face--front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--e-global-color-primary) 2%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Ensure title sits above overlay and is clamped to two lines */
.flip-card__title {
  position: relative;
  z-index: 2;
  display: -webkit-box;
}
.flip-card__face--back p {
  margin: 0;
  line-height: 1.6;
}

/* Dots navigation per slider mobile - identici a experience-marocco */
.flip-cards-dots {
  display: none; /* Nascosto su desktop */
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: transparent;
  z-index: 10;
  position: relative;
}

.flip-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4) !important;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: block;
  flex-shrink: 0;
  padding: 0;
}

.flip-card-dot.active {
  background: var(--e-global-color-primary) !important;
  width: 28px;
  border-radius: 5px;
}

.flip-card-dot:hover {
  background: rgba(0, 0, 0, 0.6);
}
