/* -----------------------------------------------------------
   Remote Village – Events (Final Fixed Version)
   ----------------------------------------------------------- */

/* MAIN LIST WRAPPER */
.rv-events-list{
    display:flex;
    flex-direction:column;
    gap:32px;
    width:100%;
    margin:0;
    padding:0;
    background:transparent !important;
}

/* Remove last-card gap */
.rv-events-list .rv-event-row:last-child {
    margin-bottom: 0 !important;
}

/* HEADING */
.rv-events-heading{
    font-size:1.5rem;
    font-weight:600;
    margin:0 0 8px 0;
}

/* -----------------------------------------------------------
   EVENT ROW — image left, content right
   ----------------------------------------------------------- */
.rv-event-row{
    display:flex;
    align-items:stretch;        /* ensures image + content share height */
    text-decoration:none;
    color:inherit;
    background:#fff;
    padding:0;
    border-radius:16px;
    overflow:hidden;
    margin: 0 0 32px 0;
}

/* IMAGE COLUMN — background image, full height */
.rv-event-img{
    flex:0 0 260px;
    max-width:260px;
    min-height:200px;           /* ⭐ ensures image always displays */
    height:auto;                /* grows with content height */
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    border-radius:16px 0 0 16px;
}

/* CONTENT */
.rv-event-body{
    flex:1;
    padding:32px;
}

.rv-event-body h4{
    margin:0 0 6px 0;
    font-size:1.25rem;
    font-weight:600;
}

.rv-event-date{
    opacity:0.8;
    margin-bottom:8px;
    font-size:0.95rem;
}

/* -----------------------------------------------------------
   MOBILE STACK
   ----------------------------------------------------------- */
@media(max-width:680px){

    .rv-event-row{
        flex-direction:column;
        align-items:flex-start;
        border-radius:16px;
    }

    .rv-event-img{
        width:100%;
        max-width:100%;
        min-height:180px;         /* slightly shorter on mobile */
        aspect-ratio:16/9;        /* widescreen mobile look */
        border-radius:16px 16px 0 0;
    }

    .rv-event-body{
        padding:24px;
    }
}

/* -----------------------------------------------------------
   ARCHIVE PAGE FIXES
   ----------------------------------------------------------- */
.post-type-archive-event .wp-block-post,
.post-type-archive-event .wp-block-query,
.post-type-archive-event .wp-block-post-template{
    all:unset;
    display:block !important;
}

.post-type-archive-event .wp-block-post > *{
    display:block !important;
}

/* Flatten stray <p> wrappers */
.rv-events-list p{
    display:contents !important;
    margin:0 !important;
    padding:0 !important;
}
