.be-year-tabs {
    margin: 2rem 0;
    --be-tab-active-bg: #0b5a2b;
    --be-tab-active-text: #ffffff;
    --be-tab-inactive-bg: #f5f5f5;
    --be-tab-inactive-text: #333333;
    --be-tab-hover-bg: #0d7a3a;
    --be-tab-hover-text: #ffffff;
}

/* radios hidden */
.be-year-tabs__input {
    display: none;
}

/* NAV (desktop tabs) */
.be-year-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #dddddd;
    gap: 0;
}

/* Hide horizontal scrollbar under tab strip */
.be-year-tabs__nav {
    scrollbar-width: none;   /* Firefox */
    -ms-overflow-style: none; /* IE + Edge Legacy */
}

.be-year-tabs__nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Wrapper that holds arrows + the nav strip */
.be-year-tabs__nav-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    margin-bottom: 0;
}

/* Arrow buttons (hidden on desktop by default) */
.be-year-tabs__arrow {
    border: none;
    background: transparent;
    padding: 0 0.4rem;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: none;          /* shown on mobile only */
}

.be-year-tabs__nav-item {
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    background: var(--be-tab-inactive-bg);
    color: var(--be-tab-inactive-text);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #dddddd;
    border-bottom: none;
    margin-bottom: -1px;
    transition: background 0.15s ease, color 0.15s ease;
}

.be-year-tabs__nav-item:hover {
    background: var(--be-tab-hover-bg);
    color: var(--be-tab-hover-text);
}

/* PANELS */
.be-year-tabs__panels {
    border: 1px solid #dddddd;
    padding: 1.25rem 1.5rem;
}

.be-year-tabs__panel {
    display: none; /* visibility is controlled by inline <style> from PHP */
}

/* STYLE 1 – original grid */
.be-year-tabs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem 2rem;
}

/* Common card styling */
.be-year-tabs__item {
    text-align: left;
}

.be-year-tabs__thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.be-year-tabs__title {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* =========================================================
   STYLE 2 – featured + side list for DESKTOP
   ========================================================= */

.be-year-tabs--style2 .be-year-tabs__style2 {
    display: grid;
    /* better balance: more room for right column */
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
    gap: 2rem;
    align-items: flex-start;
}

/* Featured card */
.be-year-tabs--style2 .be-year-tabs__featured-wrap .be-year-tabs__item--featured {
    display: block;
}

/* Smaller featured image */
.be-year-tabs--style2 .be-year-tabs__item--featured .be-year-tabs__thumb {
    max-height: 280px;
    overflow: hidden;
}
.be-year-tabs--style2 .be-year-tabs__item--featured .be-year-tabs__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.be-year-tabs--style2 .be-year-tabs__item--featured .be-year-tabs__title {
    font-size: 1.3rem;
    margin-top: 0.9rem;
}

.be-year-tabs--style2 .be-year-tabs__excerpt {
    margin-top: 0.6rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Right side list – 2 columns on desktop */
.be-year-tabs--style2 .be-year-tabs__style2-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
}

/* Each side item: small thumb + title inside each column */
.be-year-tabs--style2 .be-year-tabs__item--side {
    display: grid;
    grid-template-columns: 80px auto;
    gap: 0.6rem;
    align-items: flex-start;
}

/* Smaller titles on the side for less congestion */
.be-year-tabs--style2 .be-year-tabs__item--side .be-year-tabs__title {
    font-size: 0.85rem;
    line-height: 1.25;
}

/* Slightly smaller thumbs on the side */
.be-year-tabs--style2 .be-year-tabs__item--side .be-year-tabs__thumb {
    width: 70px;
}
.be-year-tabs--style2 .be-year-tabs__item--side .be-year-tabs__thumb img {
    width: 100%;
    height: auto;
}

/* =========================================================
   EDITOR PREVIEW (optional, only affects Gutenberg editor)
   ========================================================= */

.be-year-tabs-editor-preview {
    border: 1px dashed #ccc;
    padding: 1rem;
}

.be-year-tabs-editor-preview__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.be-year-tabs-editor-preview__nav-item {
    padding: 0.2rem 0.6rem;
    border: 1px solid #ddd;
    font-size: 0.8rem;
}

.be-year-tabs-editor-preview__hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

/* =========================================================
   MOBILE: accordion + thumb-left / text-right cards
   ========================================================= */
@media (max-width: 768px) {

    /* Show arrows only on small screens */
    .be-year-tabs__arrow {
        display: block;
    }

    .be-year-tabs__nav-wrapper {
        align-items: center;
    }

    /* Horizontal, scrollable tab strip */
    .be-year-tabs__nav {
        flex-wrap: nowrap;
        border-bottom: 1px solid #dddddd;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .be-year-tabs__nav-item {
        border-bottom: none;
        margin-bottom: 0;
        white-space: nowrap;
    }

    /* We no longer use plus/minus indicators */
    .be-year-tabs__nav-item::after {
        content: none;
    }

    .be-year-tabs__panels {
        border: none;
        padding: 0;
        margin-top: 0.5rem;
    }

    .be-year-tabs__panel {
        border: 1px solid #dddddd;
        border-top: none;
        padding: 1rem 1.2rem;
    }

    /* Generic list layout for STYLE 1 on mobile: thumb left, text right */
    .be-year-tabs__grid {
        display: block;
    }

    .be-year-tabs__item {
        display: flex;
        gap: 0.75rem;
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .be-year-tabs__thumb {
        flex: 0 0 110px;
        max-width: 110px;
    }

    .be-year-tabs__thumb img {
        width: 100%;
        height: auto;
        display: block;
    }

    .be-year-tabs__content {
        flex: 1 1 auto;
    }

    .be-year-tabs__title {
        margin-top: 0;
        font-size: 0.95rem;
    }

    /* ---- STYLE 2: behave like a vertical list on mobile ---- */

    .be-year-tabs--style2 .be-year-tabs__style2 {
        display: block;
    }

    .be-year-tabs--style2 .be-year-tabs__featured-wrap {
        margin-bottom: 1rem;
    }

    .be-year-tabs--style2 .be-year-tabs__style2-list {
        display: block;
        grid-template-columns: none;
    }

    .be-year-tabs--style2 .be-year-tabs__item--featured,
    .be-year-tabs--style2 .be-year-tabs__item--side {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .be-year-tabs--style2 .be-year-tabs__item--featured .be-year-tabs__thumb,
    .be-year-tabs--style2 .be-year-tabs__item--side .be-year-tabs__thumb {
        flex: 0 0 110px;
        max-width: 110px;
    }

    .be-year-tabs--style2 .be-year-tabs__item--featured .be-year-tabs__thumb img,
    .be-year-tabs--style2 .be-year-tabs__item--side .be-year-tabs__thumb img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

    .be-year-tabs--style2 .be-year-tabs__content {
        flex: 1 1 auto;
    }

    .be-year-tabs--style2 .be-year-tabs__title {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .be-year-tabs--style2 .be-year-tabs__excerpt {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}
