.flipcard-row {
    display: grid;
    grid-template-columns: repeat(3, 200px);
    gap: 50px 90px;
    justify-content: center;
    align-items: center;
    padding: 50px 80px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

.flipcard { animation: float 3.5s ease-in-out infinite; }
.flipcard:nth-child(1) { animation-delay: 0s; }
.flipcard:nth-child(2) { animation-delay: 0.4s; }
.flipcard:nth-child(3) { animation-delay: 0.8s; }
.flipcard:nth-child(4) { animation-delay: 1.2s; }
.flipcard:nth-child(5) { animation-delay: 1.6s; }
.flipcard:nth-child(6) { animation-delay: 2.0s; }

.flipcard {
    width: 200px;
    cursor: pointer;
}

.flipcard-inner {
    width: 100%;
    height: 280px;
    position: relative;
    transform-origin: center center;
    border-radius: 6px;
}

.flipcard-caption {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    margin: -20px 0 0 0;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* tilt and flip applied via JS */

.flipcard-front,
.flipcard-back {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;

    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.flipcard-front img,
.flipcard-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover shadow lift */
.flipcard:hover .flipcard-inner {
    box-shadow: 0 16px 36px rgba(0,0,0,0.18);
}
