.kamea-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    padding: 40px 0;
    max-width: 100%;
    margin: 0 auto;
    align-items: stretch;
}

@media (min-width: 992px) {
    .kamea-cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.kamea-card-v2 {
    width: 100%;
    max-width: 400px;
    position: relative;
    text-align: center;
    margin: 110px auto 30px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    /* Fix for subpixel rendering shifts during transitions */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.kamea-card-v2-bg {
    background: linear-gradient(to bottom, #cdc1a7 0%, #e2ddd0 40%, #ffffff 100%);
    border-top-left-radius: 21px;
    border-top-right-radius: 21px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    padding: 130px 20px 40px 20px; 
    box-shadow: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.kamea-card-v2-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 8px solid #ffffff;
    position: absolute;
    top: -110px;
    left: 50%;
    /* translate3d + permanent will-change keep the element on its own GPU layer
       so the browser never demotes it and re-snaps to integer pixels (no jitter) */
    transform: translate3d(-50%, 0, 0);
    transform-origin: center center;
    will-change: transform;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: border-color 0.4s ease, transform 0.4s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.kamea-card-v2-photo img {
    display: block;
    /* Ensure image also doesn't jitter */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.kamea-card-v2-title {
    font-family: 'Amatic SC', cursive;
    font-size: 32px;
    color: #4a3621;
    line-height: 1.1;
    margin: 0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.4s ease;
    text-align: center;
    width: 100%;
}

.kamea-v2-initial {
    color: #4a3621 !important;
    transition: none;
}

.kamea-card-v2:hover .kamea-card-v2-photo {
    border-color: var(--kamea-hover, #0096a9);
    /* Same translate3d base so only the scale changes during the transition */
    transform: translate3d(-50%, 0, 0) scale(1.03);
}

.kamea-card-v2:hover .kamea-card-v2-title {
    color: var(--kamea-hover, #0096a9);
}

@media (max-width: 480px) {
    .kamea-card-v2-photo {
        width: 180px;
        height: 180px;
        top: -90px;
    }
    .kamea-card-v2-title { font-size: 26px; }
}
