/* Base card layout properties */
.flip-card {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    margin: 0 auto;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}

.flip-front {
    background: linear-gradient(135deg, #1a1a3e 0%, #0a0a1e 100%);
    border: 1px solid rgba(127, 119, 221, 0.4);
    box-shadow: 0 0 24px rgba(127, 119, 221, 0.15);
}

.flip-back {
    background: linear-gradient(135deg, #3d38a0 0%, #1a1a3e 100%);
    border: 1px solid rgba(127, 119, 221, 0.6);
    box-shadow: 0 0 24px rgba(127, 119, 221, 0.3);
    transform: rotateY(180deg);
    text-align: center;
}

/* ==========================================================================
   MOBILE & TABLET LOGIC (Automatically open)
   ========================================================================== */
.flip-card.force-open .flip-inner {
    transform: rotateY(180deg);
}

/* ==========================================================================
   LAPTOP & DESKTOP LOGIC (Hover actions)
   ========================================================================== */
@media (min-width: 1024px) {
    /* Manual desktop hover */
    .flip-card:not(.sequence-flip):hover .flip-inner {
        transform: rotateY(180deg);
    }

    /* Intro preview reveal sequence keyframes */
    .sequence-flip .flip-inner {
        animation: previewFlip 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

@keyframes previewFlip {
    0% { transform: rotateY(0deg); }
    30% { transform: rotateY(180deg); }
    70% { transform: rotateY(180deg); }
    100% { transform: rotateY(0deg); }
}

/* Custom Text Typography Details */
.flip-title { font-size: 1.4rem; font-weight: 700; color: white; }
.flip-text { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); line-height: 1.6; }
.icon { font-size: 2.5rem; display: flex; align-items: center; justify-content: center; }
.noselect { user-select: none; -webkit-user-select: none; }