/* Teleflex Benefits Carousel — scoped to .tfb-benefits; does not style other Elementor widgets. */
.tfb-benefits,
.tfb-benefits * { box-sizing: border-box; }

.tfb-benefits {
    --tfb-navy: #00205B;
    --tfb-mint: #5ADCA5;
    --tfb-cyan: #00A9CE;
    --tfb-gap: 25px;
    --tfb-photo-height: 165px;
    position: relative;
    left: 50%;
    width: min(1600px, calc(100vw - 40px));
    max-width: none;
    transform: translateX(-50%);
    margin: 0 auto;
    padding: 0 0 12px;
    color: var(--tfb-navy);
    font-family: inherit;
}

.tfb-benefits .tfb-heading {
    margin: 0 0 18px;
    padding: 0;
    text-align: center;
    color: var(--tfb-navy);
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.tfb-benefits .tfb-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: clamp(14px, 2vw, 30px);
    row-gap: 3px;
    margin: 0 0 22px;
    padding: 0 8px;
    border: 0;
}

.tfb-benefits .tfb-tab {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 38px;
    margin: 0;
    padding: 7px 1px 9px;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    outline-offset: 3px;
    background: transparent;
    color: var(--tfb-navy);
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: border-color .18s ease, color .18s ease;
}

.tfb-benefits .tfb-tab:hover,
.tfb-benefits .tfb-tab.is-active,
.tfb-benefits .tfb-tab[aria-selected="true"] {
    color: var(--tfb-navy);
    border-color: var(--tfb-navy);
    background: transparent;
}

.tfb-benefits .tfb-tab:focus-visible,
.tfb-benefits .tfb-arrow:focus-visible,
.tfb-benefits .tfb-page:focus-visible,
.tfb-benefits .tfb-track:focus-visible {
    outline: 2px solid var(--tfb-cyan);
    outline-offset: 2px;
}

.tfb-benefits .tfb-stage { position: relative; min-width: 0; }

.tfb-benefits .tfb-track {
    display: flex;
    align-items: stretch;
    flex-flow: row nowrap;
    gap: var(--tfb-gap);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 7px 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
}
.tfb-benefits .tfb-track::-webkit-scrollbar { display: none; }
.tfb-benefits .tfb-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

.tfb-benefits .tfb-card {
    display: flex;
    flex: 0 0 calc((100% - var(--tfb-gap) - var(--tfb-gap) - var(--tfb-gap)) / 4);
    flex-direction: column;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 1px solid #E8ECEF;
    border-radius: 0;
    background: #fff;
    color: var(--tfb-navy);
    box-shadow: 0 4px 14px rgba(0,32,91,.06);
    scroll-snap-align: start;
    overflow: hidden;
}
.tfb-benefits .tfb-card[hidden] { display: none !important; }
.tfb-benefits .tfb-photo {
    height: var(--tfb-photo-height);
    width: 100%;
    flex: 0 0 var(--tfb-photo-height);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #E4EAF0;
}
.tfb-benefits .tfb-photo-logo { background: #fff; }
.tfb-benefits .tfb-photo .tfb-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: var(--tfb-object-fit, cover);
    object-position: var(--tfb-object-x, 50%) var(--tfb-object-y, 25%);
}
.tfb-benefits .tfb-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
    color: #8295A7;
}
.tfb-benefits .tfb-photo-placeholder svg { width: 52px; height: 52px; }
.tfb-benefits .tfb-card-title {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 39px;
    position: relative;
    margin: 0;
    padding: 9px 12px 9px 11px;
    border-left: 4px solid var(--tfb-mint);
    background: var(--tfb-navy);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.tfb-benefits .tfb-card-description {
    flex: 1 1 auto;
    padding: 13px 12px 18px;
    background: #fff;
    color: var(--tfb-navy);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.tfb-benefits .tfb-card-description p { margin: 0 0 10px; padding: 0; color: inherit; font: inherit; }
.tfb-benefits .tfb-card-description p:last-child { margin-bottom: 0; }

/* Static benefit cards: no hover raise, zoom or color changes.
   Only actual controls (category tabs and navigation) have hover states. */

.tfb-benefits .tfb-arrow {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(var(--tfb-photo-height) / 2 + 7px);
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--tfb-navy);
    box-shadow: 0 6px 22px rgba(0,32,91,.16);
    z-index: 10;
    cursor: pointer;
    transition: background-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.tfb-benefits .tfb-arrow svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    transition: transform .25s ease;
}
.tfb-benefits .tfb-arrow-prev { left: -8px; }
.tfb-benefits .tfb-arrow-next { right: -8px; }
.tfb-benefits .tfb-arrow:hover:not(:disabled) {
    background: var(--tfb-mint);
    color: var(--tfb-navy);
    box-shadow: 0 8px 26px rgba(0,32,91,.22);
}
.tfb-benefits .tfb-arrow-prev:hover:not(:disabled) svg { transform: translateX(-3px); }
.tfb-benefits .tfb-arrow-next:hover:not(:disabled) svg { transform: translateX(3px); }
.tfb-benefits .tfb-arrow:disabled {
    opacity: .25;
    cursor: default;
    pointer-events: none;
}

.tfb-benefits .tfb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 28px;
    margin: 16px 0 0;
    padding: 0;
}
.tfb-benefits .tfb-page {
    appearance: none;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: #737977;
    opacity: .35;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
}
.tfb-benefits .tfb-page.is-active { opacity: 1; background: #545B55; }
.tfb-benefits .tfb-pagination:empty { display: none; }
.tfb-benefits .tfb-empty {
    padding: 24px;
    margin: 0;
    text-align: center;
    color: var(--tfb-navy);
}
.tfb-benefits .tfb-empty[hidden] { display: none !important; }
.tfb-benefits .tfb-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1024px) {
    .tfb-benefits { --tfb-gap: 20px; --tfb-photo-height: 160px; width: calc(100vw - 36px); }
    .tfb-benefits .tfb-card { flex-basis: calc((100% - var(--tfb-gap)) / 2); }
    .tfb-benefits .tfb-card-title { font-size: 16px; }
    .tfb-benefits .tfb-card-description { font-size: 16px; }
    .tfb-benefits .tfb-arrow { width: 44px; height: 44px; }
    .tfb-benefits .tfb-arrow-prev { left: -5px; }
    .tfb-benefits .tfb-arrow-next { right: -5px; }
}
@media (max-width: 767px) {
    /* Mobil: respektuje skutečnou šířku rodičovského Elementor kontejneru.
       Žádné 100vw ani transformace, které posouvaly kartu doprava. */
    .tfb-benefits {
        --tfb-gap: 16px;
        --tfb-photo-height: 200px;
        position: static;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }
    .tfb-benefits .tfb-heading { font-size: 28px; margin-bottom: 14px; }
    .tfb-benefits .tfb-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        width: 100%;
        padding: 0 0 4px;
        gap: 17px;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-behavior: smooth;
        margin-bottom: 16px;
    }
    .tfb-benefits .tfb-tabs::-webkit-scrollbar { display: none; }
    .tfb-benefits .tfb-tab { flex: 0 0 auto; font-size: 15px; }
    .tfb-benefits .tfb-card { flex-basis: 100%; }
    .tfb-benefits .tfb-card-title { font-size: 16px; }
    .tfb-benefits .tfb-card-description { font-size: 16px; padding: 14px 12px 18px; }
    /* Navigace PŘES fotografii, uvnitř obou okrajů karty. */
    .tfb-benefits .tfb-stage {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }
    .tfb-benefits .tfb-track {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }
    .tfb-benefits .tfb-arrow {
        width: 30px;
        height: 30px;
        top: calc(7px + var(--tfb-photo-height) / 2);
        background: #fff;
        color: var(--tfb-navy);
        box-shadow: 0 2px 10px rgba(0,32,91,.10);
    }
    .tfb-benefits .tfb-arrow svg { width: 18px; height: 18px; }
    .tfb-benefits .tfb-arrow-prev { left: 0; }
    .tfb-benefits .tfb-arrow-next { right: 0; }
    .tfb-benefits .tfb-arrow:disabled { opacity: .38; }
    .tfb-benefits .tfb-arrow:hover:not(:disabled) {
        background: #fff;
        color: var(--tfb-navy);
        box-shadow: 0 2px 10px rgba(0,32,91,.10);
    }
    .tfb-benefits .tfb-arrow:hover:not(:disabled) svg { transform: none; }
}

/* Výrazná navigace kategorií pouze na mobilu. Šipky mění aktivní kategorii. */
.tfb-benefits .tfb-category-toolbar { display: none; }
@media (max-width: 767px) {
    .tfb-benefits .tfb-category-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 0 4px;
        padding: 0;
        color: var(--tfb-navy);
    }
    .tfb-benefits .tfb-category-hint {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        font-size: 13px;
        line-height: 1.3;
        font-weight: 600;
    }
    .tfb-benefits .tfb-category-hint svg {
        display: block;
        width: 21px;
        height: 21px;
        flex: 0 0 21px;
        stroke: var(--tfb-cyan);
        fill: none;
    }
    .tfb-benefits .tfb-category-controls {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        gap: 6px;
    }
    .tfb-benefits .tfb-category-button {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        margin: 0;
        color: var(--tfb-navy);
        background: #fff;
        border: 1px solid #D5DFE8;
        border-radius: 0;
        box-shadow: none;
        cursor: pointer;
    }
    .tfb-benefits .tfb-category-button svg {
        display: block;
        width: 18px;
        height: 18px;
        stroke: currentColor;
        fill: none;
    }
    .tfb-benefits .tfb-category-button:disabled {
        opacity: .35;
        cursor: default;
    }
    .tfb-benefits .tfb-category-button:focus-visible {
        outline: 2px solid var(--tfb-cyan);
        outline-offset: 2px;
    }
    .tfb-benefits .tfb-tabs { margin-bottom: 13px; }
    .tfb-benefits .tfb-tab { min-height: 36px; }
}
@media (hover: hover) and (pointer: fine) {
    .tfb-benefits .tfb-category-button:hover:not(:disabled) {
        background: #EFF9F7;
        border-color: var(--tfb-mint);
    }
}
@media (prefers-reduced-motion: reduce) {
    .tfb-benefits *, .tfb-benefits *::before, .tfb-benefits *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* v1.3: category filtering may leave too few cards to scroll.
   Hide genuine carousel controls without hiding the category toolbar. */
.tfb-benefits .tfb-track { justify-content: flex-start !important; }
.tfb-benefits .tfb-arrow[hidden],
.tfb-benefits .tfb-pagination[hidden] { display: none !important; }
.tfb-benefits:not([data-tfb-ready="1"]) .tfb-arrow { visibility: hidden !important; }
