/* ==========================================================================
    ATIC Tabs Widget
    ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.atic-tabbed-partners {
    position: relative;
}

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.atic-tp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 40px;
    background-color: #fff;
    z-index: 20;
}

.atic-tp-tabs--sticky {
    position: sticky;
    top: 0;
}

/* Individual tab button */
.atic-tabbed-partners .atic-tp-tabs button.atic-tp-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-bottom: 3px solid #cccccc;
    /* pull the bottom border flush with the container border */
    margin-bottom: -2px;
    background-color: #f4f4f4;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    min-width: 72px;
    text-align: center;
    outline: none;
    font-family: inherit;
}

.atic-tp-tab:hover {
    background-color: #e8e8e8;
}

.atic-tp-tab:focus-visible {
    outline: 2px solid var(--primary-color, #35c56f);
    outline-offset: 2px;
}

.atic-tabbed-partners .atic-tp-tabs button.atic-tp-tab.is-active {
    border-bottom-color: var(--primary-color, #35c56f);
    background-color: #f4f4f4;
}

/* Thumbnail image inside a tab */
.atic-tabbed-partners .atic-tp-tabs button.atic-tp-tab-thumb {
    display: block;
    max-height: 48px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.atic-tp-item-header .atic-tp-item-image-col img {
    max-height: 150px;
}

/* Text label inside a tab (shown when no image) */
.atic-tp-tab-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    color: #333333;
}

/* ── Single content item ─────────────────────────────────────────────────── */
.atic-tp-item {
    display: none;
    padding: 40px 0;
    border-bottom: none;
}

.atic-tp-item.is-active {
    display: block;
}

/* ── Item header: title left, image right (side-by-side on desktop) ────── */
.atic-tp-item-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

/* Image column - fixed width on desktop, right-aligned */
.atic-tp-item-image-col {
    flex-shrink: 0;
    width: auto;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

/* Title column - grows to fill space */
.atic-tp-item-title-col {
    flex: 1;
    min-width: 0;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .atic-tp-item-header {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 16px;
    }

    .atic-tp-item-image-col {
        width: 100%;
        max-width: 100%;
    }

    .atic-tp-item-title-col {
        width: 100%;
    }
}

/* Title */
.atic-tp-item-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #222222;
}

/* Title link */
.atic-tp-item-title-link {
    text-decoration: none;
    color: inherit;
}

.atic-tp-item-title-link:hover .atic-tp-item-title {
    text-decoration: underline;
}

/* Image link */
.atic-tp-item-image-link {
    display: inline-block;
    text-decoration: none;
}

/* Image */
.atic-tp-item-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.atic-tp-item-description {
    line-height: 1.75;
    color: #555555;
}

.atic-tp-item-description p {
    margin-top: 0;
    margin-bottom: 1em;
}

.atic-tp-item-description p:last-child {
    margin-bottom: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .atic-tp-tabs--sticky {
        position: static;
    }

    .atic-tp-tabs {
        gap: 4px;
    }

    .atic-tp-tab {
        padding: 8px 12px;
    }

    .atic-tp-tab-thumb {
        max-height: 36px;
        max-width: 100px;
    }

    .atic-tp-item-title {
        font-size: 20px;
    }
}