/* ----------------------------------- */
/* Container Grid - Frontend           */
/* ----------------------------------- */
.gcg-card-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 30px 0;
}

/* Container Grid - Gutenberg Editor */
/* Target the inner layout div that Gutenberg generates */
.gcg-card-grid-wrapper .block-editor-block-list__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Responsive Breakpoints (Updated to 3 columns to match your design) */
@media (min-width: 600px) {
    .gcg-card-grid-wrapper,
    .gcg-card-grid-wrapper .block-editor-block-list__layout {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 900px) {
    .gcg-card-grid-wrapper,
    .gcg-card-grid-wrapper .block-editor-block-list__layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ----------------------------------- */
/* Gutenberg Editor Wrapper Fixes      */
/* ----------------------------------- */
/* Gutenberg wraps each card in a .wp-block div. We must force it to fill the grid cell. */
.gcg-card-grid-wrapper .block-editor-block-list__layout > .wp-block {
    margin: 0 !important;
    max-width: none !important;
    height: 100%;
    display: flex; 
}

/* ----------------------------------- */
/* Individual Card                     */
/* ----------------------------------- */
.gcg-card-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    color: inherit;
    border: 1px solid #f0f0f0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

a.gcg-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------- */
/* Image Wrap                          */
/* ----------------------------------- */
.gcg-card-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 10; /* Ensures all images maintain a uniform proportion */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa; 
}

.gcg-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Forces the image to fill the card neatly */
}

/* Image Placeholder (Editor Only) */
.gcg-placeholder {
    border: 1px dashed #ccc;
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ----------------------------------- */
/* Typography                          */
/* ----------------------------------- */
.gcg-card-item h3.gcg-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111;
    line-height: 1.3;
}

.gcg-card-item p.gcg-card-desc {
    font-size: 14px;
    color: #555;
    margin: 10px 0 0 0;
    line-height: 1.5;
    flex-grow: 1; /* Pushes the description to take available space */
}