/* Basic styling for UCR Child Pages Listing */

.ucr-child-pages {
    display: grid;
    gap: 2.75rem; /* more space between cards */
    margin: 2.5rem 0;
    padding: 0 0 1rem;
}

/* Grid layout on larger screens */
.ucr-layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* List layout is a single column, but still uses gap */
.ucr-layout-list {
    grid-template-columns: 1fr;
}

.ucr-child-page {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Ensure image fits nicely */
.ucr-child-page__image img {
    display: block;
    width: 100%;
    height: auto;
}

.ucr-child-page__content {
    padding: 1.5rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ucr-child-page__title {
    font-size: 1.25rem;
    margin: 0 0 0.9rem;
}

/* Title link colour */
.ucr-child-page__title a {
    color: #1748a0;
    text-decoration: none;
}

.ucr-child-page__title a:hover,
.ucr-child-page__title a:focus {
    color: #13387b;
    text-decoration: underline;
}

.ucr-child-page__excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Button styles */
.ucr-child-page__actions {
    margin-top: auto;
}

.ucr-child-page__button {
    display: inline-block;
    padding: 0.55rem 1.7rem;
    border-radius: 50px;
    background-color: #1748a0;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.ucr-child-page__button:hover,
.ucr-child-page__button:focus {
    background-color: #13387b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .ucr-child-pages {
        gap: 2.25rem;
        margin: 2rem 0;
    }

    .ucr-child-page__content {
        padding: 1.35rem 1.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .ucr-child-pages {
        grid-template-columns: 1fr; /* single column on mobile */
        padding: 0 1rem 1.5rem; /* a bit of horizontal breathing room */
    }

    .ucr-child-page {
        border-radius: 8px;
    }
}
