/* ==========================================================
   Image Text Slider — Tekcom
   ========================================================== */

/*
 * Overflow strategy:
 * - .tekcom-its (root) → overflow: hidden  → clips slides at widget edge
 * - .tekcom-its__slider-col               → overflow: visible → partial slides show on right
 * - .tekcom-its__swiper                   → overflow: visible → Swiper renders beyond its width
 */

/* ── Root layout ─────────────────────────────────────────── */
.tekcom-its {
    display: flex;
    align-items: flex-start;
    width: 100%;
    /* overflow: hidden removed — right bleed is handled by margin-right on slider col.
       Left edge is protected by clip-path: inset(0 -9999px 0 0) on .tekcom-its__slider-col */
    overflow: visible;
}

/* ── Info Panel (LEFT) ───────────────────────────────────── */
.tekcom-its__info {
    flex: 0 0 28%;
    max-width: 28%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: flex-start;
    padding-right: 40px;
    box-sizing: border-box;
    /* Prevent info panel from being overlapped by slides */
    position: relative;
    z-index: 2;
}

.tekcom-its__title {
    position: relative;
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1e293b;
}

.tekcom-its__title::before {
    top: -30px;
    left: -50px;
    position: absolute;
    content: '';
    display: block;
    width: 87px;
    height: 90px;
    background: #3C95FF;
    margin-bottom: 0.5rem;
    opacity: 0.15;
    z-index: 1;
}

.tekcom-its__desc {
    margin: 0 0 32px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #64748b;
}

.tekcom-its__desc p {
    margin: 0;
}

/* ── Navigation buttons ──────────────────────────────────── */
.tekcom-its__nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tekcom-its__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.tekcom-its__nav-btn:hover {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
}

.tekcom-its__nav-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.tekcom-its__nav-btn.swiper-button-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ── Slider column (RIGHT) ───────────────────────────────── */
.tekcom-its__slider-col {
    flex: 1 1 0;
    min-width: 0;
    /*
     * clip-path: inset(top right bottom left)
     * - left: 0        → clip tại mép trái → slides KHÔNG tràn sang info panel
     * - right: -9999px → không clip phía phải → cho phép swiper tràn ra viewport
     */
    clip-path: inset(0 -9999px 0 0);
}

/* Swiper extends beyond its parent (slider-col) to reach viewport right edge.
 * Container = 1680px căn giữa → khoảng hở mỗi bên = (100vw - 1680px) / 2
 * max(0px, ...) = 0 khi viewport ≤ 1680px, không ảnh hưởng mobile.
 */
.tekcom-its__swiper {
    overflow: visible !important;
    width: calc(100% + max(0px, (100vw - 1680px) / 2));
}

/* Đảm bảo Elementor widget wrappers không clip overflow */
.elementor-widget-image_text_slider,
.elementor-widget-image_text_slider>.elementor-widget-container {
    overflow: visible !important;
}

/* ── Slide card ──────────────────────────────────────────── */
.tekcom-its__card {
    display: flex;
    flex-direction: column;
}

/* Image container */
.tekcom-its__img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f1f5f9;
}

.tekcom-its__img-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

/* Slide title */
.tekcom-its__slide-title {
    margin: 16px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #254B78;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
    word-break: break-word;
}

/* ── Progress bar ────────────────────────────────────────── */
.tekcom-its__progress-wrap {
    margin-top: 24px;
    /* Don't extend to the slide titles of off-screen slides */
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.tekcom-its__progress {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 260px !important;
    height: 3px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.tekcom-its__progress .swiper-pagination-progressbar-fill {
    background-color: #c9a84c !important;
    border-radius: 4px;
}

/* ── Tablet ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tekcom-its__info {
        flex: 0 0 35%;
        max-width: 35%;
        padding-right: 28px;
    }

    .tekcom-its__title {
        font-size: 1.6rem;
    }
}

/* ── Mobile: stack vertically ────────────────────────────── */
@media (max-width: 768px) {
    .tekcom-its {
        flex-direction: column;
        gap: 32px;
    }

    .tekcom-its__info {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding-right: 0;
    }

    .tekcom-its__title {
        font-size: 1.5rem;
        text-align: center !important;
    }

    .tekcom-its__desc {
        text-align: center !important;
    }

    .tekcom-its__nav {
        justify-content: center !important;
        margin-top: 8px;
    }

    .tekcom-its__slider-col {
        width: 100%;
    }

    .tekcom-its__swiper {
        width: 100%;
    }
}