/*
 Theme Name:   Astra Child
 Theme URI:    https://cmdeducacion.com/
 Description:  Child theme for Astra – CMD Educación
 Author:       Matt
 Template:     astra
 Version:      1.0.0
*/

/* =========================================================
   COURSES GRID – /cursos/
   Based on UAGB container: .uagb-block-132ede22
   Goal: Coursera-style cards, 3 per row on desktop
   ========================================================= */

/* Main grid container */
.uagb-block-132ede22 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; /* always 3 across on desktop */
    gap: 1.25rem !important; /* smaller gap between cards */
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch;
}

/* Tablet: 2 per row */
@media (max-width: 1024px) {
    .uagb-block-132ede22 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

/* Mobile: 1 per row */
@media (max-width: 640px) {
    .uagb-block-132ede22 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Ensure the individual cards don't add their own margins */
.uagb-block-132ede22 .uagb-infobox__content-wrap {
    margin: 0 !important;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

/* Hover effect: slight lift + stronger shadow */
.uagb-block-132ede22 .uagb-infobox__content-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

/* Make inner content fill card vertically */
.uagb-block-132ede22 .uagb-ifb-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image: fixed height, full width, cover */
.uagb-block-132ede22 .uagb-ifb-image-content img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

/* Title + description padding – reduced vs earlier version */
.uagb-block-132ede22 .uagb-ifb-title-wrap,
.uagb-block-132ede22 .uagb-ifb-desc {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Title spacing */
.uagb-block-132ede22 .uagb-ifb-title-wrap {
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.uagb-block-132ede22 .uagb-ifb-title {
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;
}

/* Description text */
.uagb-block-132ede22 .uagb-ifb-desc {
    margin-top: 0.25rem;
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #4b5563; /* neutral grey */
}

/* Button wrapper pushed to bottom of card */
.uagb-block-132ede22 .uagb-ifb-button-wrapper {
    margin-top: auto;
    padding: 0.75rem 0.75rem 1rem;
}

/* WhatsApp CTA – pill button like modern course catalogues */
.uagb-block-132ede22 .uagb-infobox-cta-link.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: #0056d2; /* you can swap this for your brand colour */
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.uagb-block-132ede22 .uagb-infobox-cta-link.wp-block-button__link:hover {
    background: #0042a3;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.3);
}

.uagb-block-132ede22 .uagb-infobox-cta-link svg {
    width: 16px;
    height: 16px;
}

/* Slight adjustments for smaller screens */
@media (max-width: 767px) {
    .uagb-block-132ede22 .uagb-infobox__content-wrap {
        border-radius: 12px;
        box-shadow: 0 3px 12px rgba(15, 23, 42, 0.16);
    }

    .uagb-block-132ede22 .uagb-ifb-image-content img {
        height: 170px;
    }
}
