/* ----------------------------------------------------------------- */
/* More Case Studies Block — Styles                                  */
/*                                                                   */
/* Layout:                                                           */
/*   - 2x2 grid, all cards equal size                               */
/*   - 16/10 aspect ratio on all cards                              */
/*                                                                   */
/* Hover state:                                                      */
/*   - Dark gradient overlay fades in over the image                */
/*   - Post title centred in the middle of the card                 */
/*   - Arrow pinned to the bottom-right of the card                 */
/*   - Subtle scale on the image                                    */
/* ----------------------------------------------------------------- */


/* ----------------------------------------------------------------- */
/* Outer block wrapper                                               */
/* ----------------------------------------------------------------- */

.mcs-block {
    width: 100%;
}


/* ----------------------------------------------------------------- */
/* Heading                                                           */
/* ----------------------------------------------------------------- */

.mcs-block__heading {
    margin-bottom: 3rem;
}


/* ----------------------------------------------------------------- */
/* Post grid — 2 equal columns, 2 rows                              */
/* ----------------------------------------------------------------- */

.mcs-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}


/* ----------------------------------------------------------------- */
/* Post link                                                         */
/* ----------------------------------------------------------------- */

.mcs-posts__link {
    display: block;
    text-decoration: none;
    color: inherit;
}


/* ----------------------------------------------------------------- */
/* Image wrapper                                                     */
/*                                                                   */
/* position: relative so the overlay can be absolutely positioned   */
/* inside it. overflow: hidden clips both the image and overlay.    */
/* ----------------------------------------------------------------- */

.mcs-posts__image {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 10;
}


/* ----------------------------------------------------------------- */
/* Featured image                                                    */
/* ----------------------------------------------------------------- */

.mcs-posts__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* Subtle scale on hover — transition defined here */
    transition: transform 0.4s ease;
}

/* Slight zoom on the image when the card is hovered */
.mcs-posts__link:hover .mcs-posts__img {
    transform: scale( 1.04 );
}


/* ----------------------------------------------------------------- */
/* Hover overlay                                                     */
/*                                                                   */
/* Absolutely positioned over the full image area.                  */
/* Uses a gradient — dark at bottom, fading to transparent at top.  */
/*                                                                   */
/* display: flex with align-items and justify-content center        */
/* centres the title in the middle of the card.                     */
/*                                                                   */
/* opacity: 0 by default, transitions to 1 on hover.               */
/* ----------------------------------------------------------------- */

.mcs-posts__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to top,
        rgba( 0, 0, 0, 0.75 ) 0%,
        rgba( 0, 0, 0, 0.4  ) 50%,
        rgba( 0, 0, 0, 0.15 ) 100%
    );

    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Reveal overlay on link hover */
.mcs-posts__link:hover .mcs-posts__overlay {
    opacity: 1;
}


/* ----------------------------------------------------------------- */
/* Title inside overlay                                              */
/*                                                                   */
/* Centred in the middle of the card via the flex overlay parent.   */
/* ----------------------------------------------------------------- */

.mcs-posts__title {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    padding: 0 1rem;
}


/* ----------------------------------------------------------------- */
/* Arrow icon inside overlay                                         */
/*                                                                   */
/* Pinned to the bottom-right of the overlay via absolute position. */
/* Starts slightly left, slides right on hover.                     */
/* ----------------------------------------------------------------- */

.mcs-posts__arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: inline-block;
    color: #fff;
    font-size: 1.25rem;

    /* Starts slightly left, slides right on hover */
    transform: translateX( -4px );
    transition: transform 0.3s ease;
}

.mcs-posts__link:hover .mcs-posts__arrow {
    transform: translateX( 0 );
}


/* ----------------------------------------------------------------- */
/* Empty / no posts message                                          */
/* ----------------------------------------------------------------- */

.mcs-posts__empty {
    font-style: italic;
    color: #666;
}


/* ----------------------------------------------------------------- */
/* Inspector picker: help text                                       */
/*                                                                   */
/* Contextual message showing selection state and what will render. */
/* ----------------------------------------------------------------- */

.mcs-picker__help {
    font-size: 0.8125rem;
    color: #757575;
    font-style: italic;
    margin: 0 0 0.75rem;
}


/* ----------------------------------------------------------------- */
/* Inspector picker: selected items list                             */
/* ----------------------------------------------------------------- */

.mcs-picker__selected-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.mcs-picker__selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 0.5rem;
}

.mcs-picker__selected-title {
    font-size: 0.8125rem;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ----------------------------------------------------------------- */
/* Inspector picker: remove button                                   */
/* ----------------------------------------------------------------- */

.mcs-picker__remove-btn {
    flex-shrink: 0;
}


/* ----------------------------------------------------------------- */
/* Inspector picker: search results list                             */
/* ----------------------------------------------------------------- */

.mcs-picker__results-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 2px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
}

.mcs-picker__result-item {
    border-bottom: 1px solid #f0f0f0;
}

.mcs-picker__result-item:last-child {
    border-bottom: none;
}

.mcs-picker__result-item .components-button {
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
    justify-content: flex-start;
}


/* ----------------------------------------------------------------- */
/* Inspector picker: no results notice                               */
/* ----------------------------------------------------------------- */

.mcs-picker__no-results {
    font-size: 0.8125rem;
    color: #757575;
    font-style: italic;
    margin: 0.5rem 0 0;
}