/**
 * Terms Grid
 *
 * @package jGambling
 */


.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 24px 0;
}


.terms-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ecf0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.terms-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}


.terms-card__img-link {
    display: block;
    overflow: hidden;
    line-height: 0;
}

.terms-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
    margin-bottom: 0 !important;
}

.terms-card:hover .terms-card__img {
    transform: scale(1.03);
}

.terms-card__placeholder {
    display: block;
    width: 100%;
    height: 140px;
    background: #e8ecf0;
}


.terms-card__body {
    padding: 16px;
    flex: 1;
}

.terms-card__title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.terms-card__title-link {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.terms-card__title-link:hover {
    color: #2396f7;
}

.terms-card__count {
    font-size: 13px;
    color: #64748b;
}


@media (max-width: 768px) {
    .terms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .terms-card__img,
    .terms-card__placeholder {
        height: 100px;
    }

    .terms-card__body {
        padding: 12px;
    }

    .terms-card__title {
        font-size: 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .terms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .terms-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .terms-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
