.card {
    position: relative;
    perspective: 1000px;
    aspect-ratio: 3 / 4;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(12, 110, 53, 0.3);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card-front {
    background-color: white;
    color: #0C6E35;
    z-index: 2;
}

.card-back {
    background-color: #0C6E35;
    color: #D7F9D0;
    transform: rotateY(180deg);
    z-index: 1;
}

.card img {
    width: 6rem;
    height: 6rem;
    border-radius: 9999px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 4px solid #0C6E35;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover .card-inner {
        transform: rotateY(180deg);
    }
}

@media (max-width: 640px) {
    .text-5xl { font-size: 2rem; }
    .text-4xl { font-size: 1.75rem; }
    .text-2xl { font-size: 1.25rem; }
    .text-xl  { font-size: 1.125rem; }
    .text-lg  { font-size: 1rem; }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-16, .pt-16, .pb-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .container {
        max-width: 100%;
        padding: 0 1rem;
    }

    #crew-cards,
    #honor-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem;
        justify-items: center;
    }

    iframe {
        max-height: 60vh !important;
    }

    .card {
        max-width: 100%;
        transform: none !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    }

    .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}
