/* =====================================================
   STEM Biodiversity Plugin — Frontend Styles
===================================================== */

.stembio-wrap {
    width: 100%;
}

.stembio-cat-section {
    margin-bottom: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid #000000;
}
.stembio-cat-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stembio-cat-heading {
    font-family: 'Albra Book Light', 'Albra', Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 300;
    color: #3D4321;
    margin: 0 0 24px 0;
    letter-spacing: 0.01em;
    line-height: 40px;
}

.stembio-slider {
    position: relative;
    overflow: hidden;
}

.stembio-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.stembio-slide {
    flex: 0 0 calc(
        ( 100% - ( var(--stembio-per, 3) - 1 ) * 24px )
        / var(--stembio-per, 3)
    );
    min-width: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Per-column widths are applied inline by JS when custom values are set.
   This rule is only the auto equal-width fallback. */

/* ── Photo box ──
   Full column width, fixed height (set via Elementor slider, default 420px).
   object-fit: cover keeps image centered and fills the box — no letterbox.  */
.stembio-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: unset;
    max-height: unset;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8e5de;
    box-sizing: border-box;
}

.stembio-photo img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    display: block;
    object-fit: cover !important;
    object-position: center top;
    max-width: none !important;
}

.stembio-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
    font-style: italic;
    background: #e8e5de;
}

/* ── Metadata rows ── */
.stembio-meta {
    margin-top: 16px;
}

.stembio-meta-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0 8px;
    font-family: 'Atlas Grotesk Regular', 'Atlas Grotesk', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #3D4321;
}

.stembio-meta-label { color: #3D4321; }
.stembio-meta-value { color: #3D4321; }

/* ── Navigation ── */
.stembio-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.stembio-arrow {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 22px;
    color: #3D4321;
    opacity: 0.65;
    transition: opacity 0.2s;
    line-height: 1;
}

.stembio-arrow:hover { opacity: 1; }

/* ── Responsive ── */
@media ( max-width: 900px ) {
    .stembio-cat-heading { font-size: 28px; }
}

@media ( max-width: 600px ) {
    .stembio-track { gap: 14px; }
    .stembio-cat-heading { font-size: 22px; }
    .stembio-meta-row {
        grid-template-columns: 76px 1fr;
    }
}

/* ── ShortPixel / Smash Balloon / other lazy-loaders set opacity:0 on .sp-img-fade.
   Cloned slider slides never get the scroll event that triggers opacity:1,
   so force all images inside the slider to be visible regardless of class. ── */
.stembio-slider img {
    opacity: 1 !important;
    visibility: visible !important;
}
