/**
 * G Blocks - Grid Cards Styles
 */

.g-grid-cards-block { width: 100%; margin: 30px 0; }

.g-grid-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.g-grid-card { width: 100%; max-width: 525px; margin: 0 auto; }

.g-grid-card__wrapper {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.g-grid-card__wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.g-grid-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.8) 100%);
}

.g-grid-card__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.g-grid-card__text { flex: 1; }

.g-grid-card__title {
    margin: 0 0 8px 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--promo-title, #fff) !important;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.g-grid-card__description {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: var(--promo-text, #fff) !important;
    opacity: 0.9;
}

.g-grid-card__button {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 24px;
    background: var(--promo-button, #f7b500) !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--promo-button-text, #000) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.g-grid-card__button:hover {
    opacity: .8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 181, 0, 0.4);
}

@media (max-width: 1024px) { .g-grid-cards-wrapper { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; } }

@media (max-width: 768px) {
    .g-grid-cards-wrapper { grid-template-columns: 1fr; gap: 16px; }
    .g-grid-card { max-width: 100%; }
    .g-grid-card__content { padding: 16px; }
    .g-grid-card__title { font-size: 24px; }
    .g-grid-card__button { padding: 8px 20px; font-size: 13px; }
}

.g-grid-cards-block.alignwide { max-width: 1400px; margin-left: auto; margin-right: auto; }
.g-grid-cards-block.alignfull { max-width: 100%; }
.g-grid-cards-block.alignfull .g-grid-cards-wrapper { max-width: 100%; padding: 0 20px; }
