.dc-evson-ecosystem {
    --dc-ecosystem-bg-x: 50%;
    --dc-ecosystem-bg-y: 50%;
    --dc-ecosystem-dark-overlay: rgba(0, 0, 0, 0.6);
    --dc-ecosystem-left-overlay: rgba(0, 0, 0, 0.6);
    --dc-ecosystem-bottom-end: rgba(0, 0, 0, 0.4);
    --dc-ecosystem-line: #f9f9f9;
    --dc-ecosystem-line-active: #feca01;
    --dc-ecosystem-section-height: 1080px;
    --dc-ecosystem-content-width: 1280px;
    --dc-ecosystem-side-padding: 0px;
    --dc-ecosystem-header-top: 82px;
    --dc-ecosystem-tabs-bottom: 78px;
    --dc-ecosystem-copy-width: 560px;
    --dc-ecosystem-bottom-height: 285px;
    --dc-ecosystem-bottom-blur: 6px;
    --dc-ecosystem-tab-gap: 32px;
    --dc-ecosystem-tab-height: 70px;
    --dc-ecosystem-tab-active-height: 158px;
    --dc-ecosystem-line-height: 2px;
    --dc-ecosystem-tab-label-gap: 12px;
    --dc-ecosystem-panel-gap: 16px;
    --dc-ecosystem-icon-size: 18px;
    --dc-ecosystem-slide-duration: 520ms;
    --dc-ecosystem-reveal-offset: 24px;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: var(--dc-ecosystem-section-height);
    overflow: clip;
    isolation: isolate;
    background: #111;
    color: #fff;
}

.dc-evson-ecosystem,
.dc-evson-ecosystem * {
    box-sizing: border-box;
}

.dc-evson-ecosystem img,
.dc-evson-ecosystem video,
.dc-evson-ecosystem iframe,
.dc-evson-ecosystem svg {
    max-width: 100%;
}

.dc-evson-ecosystem__backgrounds,
.dc-evson-ecosystem__background,
.dc-evson-ecosystem__dark-overlay,
.dc-evson-ecosystem__left-overlay,
.dc-evson-ecosystem__bottom-glass {
    position: absolute;
    inset: 0;
}

.dc-evson-ecosystem__backgrounds {
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/*
 * Background media must cover the component itself.
 * Elementor frontend ships rules such as `.elementor img { height:auto; max-width:100%; }`
 * with higher specificity than a single class selector. Use a component-scoped selector
 * strong enough to prevent Global Styles/theme image rules from collapsing the media height.
 */
.dc-evson-ecosystem img.dc-evson-ecosystem__background {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px) !important;
    height: calc(100% + 2px) !important;
    min-width: calc(100% + 2px);
    min-height: calc(100% + 2px);
    max-width: none !important;
    max-height: none !important;
    display: block;
    object-fit: cover !important;
    object-position: var(--dc-ecosystem-bg-x) var(--dc-ecosystem-bg-y);
    opacity: 0;
    transform: scale(1.015);
    transform-origin: center center;
    backface-visibility: hidden;
    transition:
        opacity var(--dc-ecosystem-slide-duration) cubic-bezier(0.22, 1, 0.36, 1),
        transform calc(var(--dc-ecosystem-slide-duration) + 200ms) cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.dc-evson-ecosystem img.dc-evson-ecosystem__background.is-active {
    opacity: 1;
    transform: scale(1);
}

.dc-evson-ecosystem__dark-overlay {
    z-index: 1;
    background: var(--dc-ecosystem-dark-overlay);
    pointer-events: none;
}

.dc-evson-ecosystem__left-overlay {
    z-index: 2;
    background: linear-gradient(90deg, var(--dc-ecosystem-left-overlay) 0%, rgba(0, 0, 0, 0) 56%);
    pointer-events: none;
}

.dc-evson-ecosystem__bottom-glass {
    z-index: 3;
    top: auto;
    height: var(--dc-ecosystem-bottom-height);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--dc-ecosystem-bottom-end) 100%);
    -webkit-backdrop-filter: blur(var(--dc-ecosystem-bottom-blur));
    backdrop-filter: blur(var(--dc-ecosystem-bottom-blur));
    pointer-events: none;
}

.dc-evson-ecosystem__container {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: var(--dc-ecosystem-content-width);
    height: 100%;
    margin: 0 auto;
    padding:
        var(--dc-ecosystem-header-top)
        var(--dc-ecosystem-side-padding)
        0;
}

.dc-evson-ecosystem__copy {
    min-width: 0;
    max-width: var(--dc-ecosystem-copy-width);
}

.dc-evson-ecosystem__eyebrow,
.dc-evson-ecosystem__title,
.dc-evson-ecosystem__description,
.dc-evson-ecosystem__tab-title,
.dc-evson-ecosystem__tab-panel {
    overflow-wrap: anywhere;
    word-break: normal;
}

.dc-evson-ecosystem__eyebrow {
    margin: 0 0 15px;
    color: #feca01;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.dc-evson-ecosystem__title {
    margin: 0;
    color: #fff;
    font-size: clamp(36px, 2.1vw, 40px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.8px;
}

.dc-evson-ecosystem__description {
    max-width: min(540px, 100%);
    margin-top: 12px;
    color: #f9f9f9;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.dc-evson-ecosystem__description > :first-child,
.dc-evson-ecosystem__tab-panel > :first-child {
    margin-top: 0;
}

.dc-evson-ecosystem__description > :last-child,
.dc-evson-ecosystem__tab-panel > :last-child {
    margin-bottom: 0;
}

.dc-evson-ecosystem__description :where(img, video, iframe, table),
.dc-evson-ecosystem__tab-panel :where(img, video, iframe, table) {
    max-width: 100%;
}

.dc-evson-ecosystem__tabs-wrap {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: var(--dc-ecosystem-tabs-bottom);
    left: 0;
    width: 100%;
    padding-right: var(--dc-ecosystem-side-padding);
    padding-left: var(--dc-ecosystem-side-padding);
}

.dc-evson-ecosystem__tabs {
    width: 100%;
    max-width: var(--dc-ecosystem-content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--dc-ecosystem-tab-gap);
    align-items: end;
}

.dc-evson-ecosystem__tab {
    position: relative;
    min-width: 0;
    height: var(--dc-ecosystem-tab-height);
    border: 0 solid var(--dc-ecosystem-line);
    border-bottom-style: solid;
    border-bottom-width: var(--dc-ecosystem-line-height);
    transition:
        height var(--dc-ecosystem-slide-duration) cubic-bezier(0.22, 1, 0.36, 1),
        min-height var(--dc-ecosystem-slide-duration) cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms ease,
        background-color 220ms ease;
}

.dc-evson-ecosystem__tab.is-active {
    height: var(--dc-ecosystem-tab-active-height);
    border-bottom-color: var(--dc-ecosystem-line-active);
}

/* Scoped reset: không để Elementor Global Button Styles / theme phá tab. */
.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 68px;
    margin: 0;
    padding: 0;
    border: 0;
    border-width: 0;
    border-style: none;
    border-color: transparent;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    background: transparent;
    background-color: transparent;
    background-image: none;
    color: #f9f9f9;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-decoration: none;
    text-transform: none;
    text-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:hover,
.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:focus,
.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:active,
.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger[aria-selected="true"] {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    background-color: transparent;
    background-image: none;
    color: #f9f9f9;
    text-decoration: none;
}

.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:focus-visible {
    outline: 2px solid var(--dc-ecosystem-line-active);
    outline-offset: 4px;
}

.dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:disabled {
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: default;
}

.dc-evson-ecosystem .dc-evson-ecosystem__tab.is-active button.dc-evson-ecosystem__tab-trigger {
    min-height: 34px;
    align-items: flex-start;
}

.dc-evson-ecosystem__tab-label {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: var(--dc-ecosystem-tab-label-gap);
}

.dc-evson-ecosystem__tab-icon {
    flex: 0 0 auto;
    width: var(--dc-ecosystem-icon-size);
    height: var(--dc-ecosystem-icon-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    font-size: var(--dc-ecosystem-icon-size);
    line-height: 1;
}

.dc-evson-ecosystem__tab-icon i,
.dc-evson-ecosystem__tab-icon svg {
    width: var(--dc-ecosystem-icon-size);
    height: var(--dc-ecosystem-icon-size);
    display: block;
}

.dc-evson-ecosystem__tab-number {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
}

.dc-evson-ecosystem__tab-title {
    min-width: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-evson-ecosystem__tab-panel {
    max-width: 290px;
    margin-top: var(--dc-ecosystem-panel-gap);
    color: #f9f9f9;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
}

.dc-evson-ecosystem__tab-panel[hidden] {
    display: none;
}

/*
 * First-paint-safe reveal.
 * Start state tồn tại ngay khi CSS được parse, nên frontend không render final state
 * rồi mới giật ngược về frame đầu sau khi JS/IntersectionObserver khởi tạo.
 */
.dc-evson-ecosystem[data-dc-reveal="yes"] [data-dc-section-reveal]:not([data-dc-reveal-done="yes"]) {
    opacity: 0;
    transform: translate3d(0, var(--dc-ecosystem-reveal-offset), 0);
    will-change: opacity, transform;
}

.dc-evson-ecosystem[data-dc-reveal="yes"] [data-dc-section-reveal][data-dc-reveal-done="yes"] {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* 1280–1536/laptop: vẫn giữ composition desktop nhưng không ép canvas 1920. */
@media (min-width: 1200px) and (max-width: 1599px) {
    .dc-evson-ecosystem {
        min-height: min(var(--dc-ecosystem-section-height), clamp(820px, 68vw, 980px));
    }

    .dc-evson-ecosystem__container {
        padding-right: max(var(--dc-ecosystem-side-padding), clamp(24px, 2.5vw, 40px));
        padding-left: max(var(--dc-ecosystem-side-padding), clamp(24px, 2.5vw, 40px));
    }

    .dc-evson-ecosystem__tabs-wrap {
        bottom: min(var(--dc-ecosystem-tabs-bottom), clamp(52px, 4.5vw, 72px));
        padding-right: max(var(--dc-ecosystem-side-padding), clamp(24px, 2.5vw, 40px));
        padding-left: max(var(--dc-ecosystem-side-padding), clamp(24px, 2.5vw, 40px));
    }

    .dc-evson-ecosystem__tabs {
        gap: min(var(--dc-ecosystem-tab-gap), clamp(18px, 2vw, 28px));
    }

    .dc-evson-ecosystem__tab-number,
    .dc-evson-ecosystem__tab-title {
        font-size: clamp(16px, 1.25vw, 18px);
    }

    .dc-evson-ecosystem__tab-panel {
        font-size: clamp(14px, 1.05vw, 16px);
    }
}

@media (max-width: 1199px) {
    .dc-evson-ecosystem__container {
        padding-right: var(--dc-ecosystem-side-padding);
        padding-left: var(--dc-ecosystem-side-padding);
    }

    .dc-evson-ecosystem__copy {
        max-width: min(var(--dc-ecosystem-copy-width), 100%);
    }

    .dc-evson-ecosystem__title {
        font-size: clamp(32px, 4.2vw, 36px);
    }

    .dc-evson-ecosystem__tabs-wrap {
        padding-right: var(--dc-ecosystem-side-padding);
        padding-left: var(--dc-ecosystem-side-padding);
    }

    .dc-evson-ecosystem__tabs {
        gap: var(--dc-ecosystem-tab-gap);
    }

    .dc-evson-ecosystem__tab-number,
    .dc-evson-ecosystem__tab-title {
        font-size: 16px;
    }

    .dc-evson-ecosystem__tab-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dc-evson-ecosystem__tab-panel {
        max-width: 100%;
        font-size: 14px;
    }
}

/* Tablet portrait / mobile: tab interaction giữ nguyên nhưng thành touch rail/card tự nhiên. */
@media (max-width: 899px) {
    .dc-evson-ecosystem__left-overlay {
        background: linear-gradient(180deg, var(--dc-ecosystem-left-overlay) 0%, rgba(0, 0, 0, 0.12) 58%, rgba(0, 0, 0, 0) 100%);
    }

    .dc-evson-ecosystem__description {
        max-width: min(600px, 100%);
    }

    .dc-evson-ecosystem__tabs {
        display: flex;
        align-items: flex-end;
        gap: var(--dc-ecosystem-tab-gap);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        padding: 2px 0 4px;
    }

    .dc-evson-ecosystem__tabs::-webkit-scrollbar {
        display: none;
    }

    .dc-evson-ecosystem__tab {
        flex: 0 0 min(280px, calc(100vw - 72px));
        height: auto;
        min-height: var(--dc-ecosystem-tab-height);
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.32);
        border-bottom-width: max(2px, var(--dc-ecosystem-line-height));
        border-radius: 18px;
        background: rgba(17, 17, 17, 0.34);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        scroll-snap-align: start;
    }

    .dc-evson-ecosystem__tab.is-active {
        height: auto;
        min-height: var(--dc-ecosystem-tab-active-height);
        border-color: rgba(254, 202, 1, 0.62);
        border-bottom-color: var(--dc-ecosystem-line-active);
        background: rgba(17, 17, 17, 0.56);
    }

    .dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger,
    .dc-evson-ecosystem .dc-evson-ecosystem__tab.is-active button.dc-evson-ecosystem__tab-trigger {
        min-height: 44px;
        align-items: center;
    }

    .dc-evson-ecosystem__tab-label {
        align-items: center;
    }

    .dc-evson-ecosystem__tab-title {
        display: block;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .dc-evson-ecosystem__tab-panel {
        margin-top: var(--dc-ecosystem-panel-gap);
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 767px) {
    .dc-evson-ecosystem__eyebrow {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .dc-evson-ecosystem__title {
        font-size: clamp(29px, 8vw, 34px);
        line-height: 1.12;
        letter-spacing: -0.5px;
    }

    .dc-evson-ecosystem__description {
        margin-top: 14px;
        font-size: 15px;
        line-height: 1.5;
    }

    .dc-evson-ecosystem__tab {
        flex-basis: min(268px, calc(100vw - 56px));
        padding: 15px;
        border-radius: 16px;
    }

    .dc-evson-ecosystem__tab-number,
    .dc-evson-ecosystem__tab-title {
        font-size: 16px;
    }

    .dc-evson-ecosystem__tab-panel {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 359px) {
    .dc-evson-ecosystem__title {
        font-size: 28px;
    }

    .dc-evson-ecosystem__description {
        font-size: 14px;
    }

    .dc-evson-ecosystem__tab {
        flex-basis: calc(100vw - 48px);
        padding: 14px;
    }

    .dc-evson-ecosystem__tab-label {
        gap: 8px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .dc-evson-ecosystem button.dc-evson-ecosystem__tab-trigger:hover {
        color: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-evson-ecosystem__background,
    .dc-evson-ecosystem__tab {
        transition-duration: 0.01ms !important;
    }

    .dc-evson-ecosystem[data-dc-reveal="yes"] [data-dc-section-reveal] {
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
    }
}

/* Elementor Editor phải luôn nhìn thấy nội dung dù Reveal đang bật. */
.elementor-editor-active .dc-evson-ecosystem[data-dc-reveal="yes"] [data-dc-section-reveal],
.elementor-editor-preview .dc-evson-ecosystem[data-dc-reveal="yes"] [data-dc-section-reveal] {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
}
