.live-blackjack-software-games h2 {
    margin: 20px 0 12px;
}

.game-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.game-card-grid .game-card {
    /* Mobile: Full width */
    flex: 0 0 100%;
}

@media (min-width: 600px) {
    .game-card-grid .game-card {
        /* Tablet: 2 columns */
        flex: 0 0 calc(50% - 10px);
    }
}

@media (min-width: 992px) {
    .game-card-grid .game-card {
        /* Desktop: 4 columns */
        flex: 0 0 calc(25% - 15px);
    }
}

.card.game-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-thumb {
    position: relative;
    flex: 0 0 auto; /* Stop image container from stretching */
    aspect-ratio: 4 / 3; /* Force consistent aspect ratio for all images */
    overflow: hidden;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fit the container */
    display: block;
}

.game-card-body {
    padding: 14px;
    background: #fff; /* Ensure background is white */
    flex: 1 0 auto; /* Expand to fill remaining space */
    display: flex;
    flex-direction: column;
}

.game-card-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    /* Enforce 2 lines height to ensure uniformity */
    min-height: 2.8em; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card .game-preview-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.game-card .game-thumb:hover .game-preview-btn {
    opacity: 1;
}

.game-preview-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.game-preview-modal.open {
    display: flex;
}

.game-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.game-preview-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    width: 90%;
    max-width: 960px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.game-preview-iframe-wrap {
    position: relative;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
}

.game-preview-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.game-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.game-preview-cta {
    margin-top: 14px;
    text-align: right;
}

.game-preview-cta .btn {
    padding: 10px 16px;
    font-weight: 700;
}
