.tehco-post-slider {
    --tehco-transition: 450ms;
    --tehco-thumb-height: 80px;
    --tehco-arrow-x: 20px;
    --tehco-arrow-y: 22px;
    --tehco-thumbbar-space: calc(var(--tehco-thumb-height) + 48px);
    --tehco-thumb-align: center;
    --tehco-thumb-hover-border: #28B8A7;
    --tehco-thumb-active-border: #FFFFFF;
    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    direction: rtl;
    background: #171717;
    color: #fff;
}

.tehco-post-slider:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.tehco-post-slider__viewport,
.tehco-post-slider__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.tehco-post-slider__viewport {
    min-height: 280px;
}

.tehco-post-slider__slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--tehco-transition) ease, visibility var(--tehco-transition) ease;
}

.tehco-post-slider__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tehco-post-slider__image,
.tehco-post-slider__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tehco-post-slider--zoom .tehco-post-slider__image {
    transform: scale(1.045);
    transition: transform calc(var(--tehco-transition) * 2) ease;
}

.tehco-post-slider--zoom .tehco-post-slider__slide.is-active .tehco-post-slider__image {
    transform: scale(1);
}

.tehco-post-slider__placeholder,
.tehco-post-slider__thumb-placeholder {
    background:
        linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10), transparent 38%),
        #30343a;
}

.tehco-post-slider__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.04) 35%, rgba(0,0,0,.18) 68%, rgba(0,0,0,.58) 100%),
        linear-gradient(180deg, rgba(0,0,0,.03) 35%, rgba(0,0,0,.58) 100%);
    pointer-events: none;
}

.tehco-post-slider__cover-link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/*
 * Content is deliberately separated from the thumbnail bar.
 * This prevents title/date/excerpt from overlapping the thumbnails.
 */
.tehco-post-slider__content {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 0;
    width: min(880px, 78%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 24px 28px;
    text-align: right;
    pointer-events: none;
    transition: bottom var(--tehco-transition) ease;
}

.tehco-post-slider--has-thumbs .tehco-post-slider__content {
    bottom: var(--tehco-thumbbar-space);
}

.tehco-post-slider__content a,
.tehco-post-slider__category {
    pointer-events: auto;
}

/* First row: date + category. Date is first in the RTL reading order. */
.tehco-post-slider__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.tehco-post-slider__categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.tehco-post-slider__category,
.tehco-post-slider__date,
.tehco-post-slider__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    line-height: 1.45;
    white-space: nowrap;
}

.tehco-post-slider__date {
    position: static;
    padding: 7px 12px;
    background: rgba(0,0,0,.48);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.tehco-post-slider__category {
    padding: 7px 13px;
    background: #28b8a7;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: filter .2s ease, transform .2s ease;
}

.tehco-post-slider__category:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.tehco-post-slider__title {
    width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.35vw, 36px);
    font-weight: 700;
    line-height: 1.55;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

.tehco-post-slider__title a {
    color: inherit;
    text-decoration: none;
}

.tehco-post-slider__title a:hover {
    color: inherit;
    text-decoration: none;
}

.tehco-post-slider__summary-row {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
}

.tehco-post-slider__summary-row--inline {
    flex-direction: row;
}

.tehco-post-slider__summary-row--below {
    flex-direction: column;
    align-items: flex-start;
}

.tehco-post-slider__excerpt {
    min-width: 0;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,.34);
    color: #fff;
    font-size: 15px;
    line-height: 1.9;
    text-shadow: 0 1px 10px rgba(0,0,0,.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tehco-post-slider__summary-row--inline .tehco-post-slider__excerpt {
    flex: 1 1 auto;
}

.tehco-post-slider__more {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: #28b8a7;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: transform .2s ease, filter .2s ease;
}

.tehco-post-slider__more:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* Navigation arrows */
.tehco-post-slider__arrow {
    position: absolute;
    z-index: 14;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border: 2px solid #fff;
    border-radius: 16px;
    background: rgba(0,0,0,.30);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    transition: background .2s ease, filter .2s ease, opacity .2s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tehco-post-slider__arrow:hover {
    background: rgba(0,0,0,.50);
    filter: brightness(1.08);
}

.tehco-post-slider__arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.tehco-post-slider__arrow--prev {
    left: var(--tehco-arrow-x);
}

.tehco-post-slider__arrow--next {
    right: var(--tehco-arrow-x);
}

.tehco-post-slider--arrows-top .tehco-post-slider__arrow {
    top: var(--tehco-arrow-y);
    bottom: auto;
    transform: none;
}

.tehco-post-slider--arrows-center .tehco-post-slider__arrow {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.tehco-post-slider--arrows-bottom .tehco-post-slider__arrow {
    top: auto;
    bottom: var(--tehco-arrow-y);
    transform: none;
}

.tehco-post-slider--has-thumbs.tehco-post-slider--arrows-bottom .tehco-post-slider__arrow {
    bottom: calc(var(--tehco-thumbbar-space) + var(--tehco-arrow-y));
}

/* Thumbnail navigation */
.tehco-post-slider__thumbbar {
    position: absolute;
    z-index: 12;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 14px 38px 16px;
    background: rgba(0,0,0,.50);
    box-shadow: 0 -12px 34px rgba(0,0,0,.16);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.tehco-post-slider__thumbs {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: var(--tehco-thumb-align, center);
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 1px 3px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: auto;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x;
    direction: ltr;
}

/* When the strip is wider than its viewport, centered flex content can make
 * the first/last thumbnail unreachable. Force start alignment only while
 * overflowing; the Elementor right/center/left control still applies when
 * everything fits. */
.tehco-post-slider__thumbs.is-overflowing,
.tehco-post-slider__thumbs.is-infinite {
    justify-content: flex-start !important;
}

.tehco-post-slider__thumbs::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.tehco-post-slider__thumbs.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}


/* Thumbnail buttons are fully reset because many WordPress themes add their
 * own :focus/:active button border for a fraction of a second. The border is
 * intentionally visible only for hover or the selected thumbnail. */
.tehco-post-slider .tehco-post-slider__thumb,
.tehco-post-slider .tehco-post-slider__thumb:focus,
.tehco-post-slider .tehco-post-slider__thumb:focus-visible,
.tehco-post-slider .tehco-post-slider__thumb:active {
    position: relative;
    flex: 0 0 118px;
    width: 118px;
    height: var(--tehco-thumb-height);
    overflow: hidden;
    padding: 0;
    border-width: 2px !important;
    border-style: solid !important;
    border-color: transparent !important;
    border-radius: 14px;
    outline: 0 !important;
    outline-color: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: rgba(255,255,255,.10);
    opacity: .74;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

.tehco-post-slider .tehco-post-slider__thumb:hover,
.tehco-post-slider .tehco-post-slider__thumb.is-active {
    opacity: 1;
    transform: translateY(-2px);
}

.tehco-post-slider .tehco-post-slider__thumb:hover:not(.is-active) {
    border-color: var(--tehco-thumb-hover-border, #28B8A7) !important;
}

.tehco-post-slider .tehco-post-slider__thumb.is-active,
.tehco-post-slider .tehco-post-slider__thumb.is-active:focus,
.tehco-post-slider .tehco-post-slider__thumb.is-active:focus-visible,
.tehco-post-slider .tehco-post-slider__thumb.is-active:active {
    border-color: var(--tehco-thumb-active-border, #FFFFFF) !important;
    filter: brightness(1.05);
}

.tehco-post-slider__thumb img,
.tehco-post-slider__thumb-placeholder {
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tehco-post-slider__empty {
    padding: 24px;
    border: 1px dashed #bbb;
    border-radius: 10px;
    text-align: center;
}

@media (max-width: 1024px) {
    .tehco-post-slider__content {
        width: min(760px, 86%);
    }
}

@media (max-width: 767px) {
    .tehco-post-slider {
        --tehco-thumb-height: 60px;
        --tehco-thumbbar-space: calc(var(--tehco-thumb-height) + 38px);
    }

    .tehco-post-slider__content {
        width: 100%;
        gap: 7px;
        padding: 16px 16px;
    }

    .tehco-post-slider__title {
        width: 100%;
        font-size: 19px;
        line-height: 1.6;
    }

    .tehco-post-slider__meta {
        gap: 6px;
    }

    .tehco-post-slider__category,
    .tehco-post-slider__date,
    .tehco-post-slider__more {
        min-height: 30px;
        font-size: 12px;
    }

    .tehco-post-slider__summary-row,
    .tehco-post-slider__summary-row--inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .tehco-post-slider__excerpt {
        width: 100%;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        padding: 6px 9px;
        font-size: 13px;
        line-height: 1.8;
    }

    .tehco-post-slider__arrow {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 18px;
    }

    .tehco-post-slider--has-thumbs.tehco-post-slider--arrows-bottom .tehco-post-slider__arrow {
        bottom: calc(var(--tehco-thumbbar-space) + var(--tehco-arrow-y));
    }

    .tehco-post-slider__thumbbar {
        padding: 10px 14px 12px;
    }

    .tehco-post-slider__thumb {
        flex-basis: 86px;
        width: 86px;
        height: var(--tehco-thumb-height);
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tehco-post-slider *,
    .tehco-post-slider *::before,
    .tehco-post-slider *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
