/**
 * Project CPT: flexible image rows (`template-parts/project/project-flex-gallery.php`).
 * Loaded only on singular `project`; depends on main theme CSS for `.exhibition_two_col_imgs` base styles.
 */

.project-flex-gallery-meta {
    padding-bottom: 80px;
    width: 100%;
}

/* Single landscape row — match full-width inset image feel */
.project-flex-gallery--single figure {
    margin: 0 auto;
    padding-bottom: 0;
}

.project-flex-gallery--single figure img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Two equal landscape tiles */
.project-flex-gallery--two-landscape .exhibition_two_col_imgs {
    padding-bottom: 80px;
}

.project-flex-gallery--two-landscape .exhibition_two_col_imgs figure,
.project-flex-gallery--two-landscape .exhibition_two_col_imgs figure:nth-child(2n+2) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
}

/* Mixed 1/3 - 2/3 rows */
.project-flex-gallery--mix .exhibition_two_col_imgs figure {
    min-width: 0;
}

.project-flex-gallery--landscape-portrait .exhibition_two_col_imgs figure:nth-child(1) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 66.666667% !important;
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
}

.project-flex-gallery--landscape-portrait .exhibition_two_col_imgs figure:nth-child(2) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 33.333333% !important;
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

.project-flex-gallery--portrait-landscape .exhibition_two_col_imgs figure:nth-child(1) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 33.333333% !important;
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

.project-flex-gallery--portrait-landscape .exhibition_two_col_imgs figure:nth-child(2) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 66.666667% !important;
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
}

/* Three portrait columns */
.project-flex-gallery--three-portrait .exhibition_two_col_imgs figure,
.project-flex-gallery--three-portrait .exhibition_two_col_imgs figure:nth-child(2n+2) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 33.333333%;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

/* Four portrait — single row */
.project-flex-gallery--four-portrait .exhibition_two_col_imgs figure {
    min-width: 0;
}
.project-flex-gallery--four-portrait .exhibition_two_col_imgs figure,
.project-flex-gallery--four-portrait .exhibition_two_col_imgs figure:nth-child(2n+2) {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
}
