/* ===== Wrapper ===== */
.features-slider-wrapper {
    position: relative;
    padding: 120px 0 0;
    /* height: 250vh;  */
}

.features-slider-wrapper .main-title {
    margin-bottom: 40px;
}

/* ===== Layout ===== */
.features-slider {
    position: sticky;
    top: 0; 
    display: flex;
    align-items: center;
    gap: 21px;
    /* height: 100vh;  */
}

/* ===== Left List ===== */
.features-list {
    width: 300px;
    position: relative;
}

.features-list ul {
    list-style: none;
    padding-left: 25px;
 
}

.features-list li {
    cursor: pointer;
    position: relative;
    margin-bottom: 26px;
    color: #1A1A1A;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    display: flex;
}

/* .feature-list-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} */

/* Active Item */
.features-list li.active {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}
.analytics .features-list li.active { color: #0021AA; }
.security .features-list li.active { color: #024B3B; }
.operations .features-list li.active { color: #BE3144; }
.experience .features-list li.active { color: #ED3D89; }

.features-list li.active span{
    font-style: normal;
    font-weight: 400;
}
.analytics .features-list li.active span { color: #0021AA; }
.security .features-list li.active span { color: #024B3B; }
.operations .features-list li.active span { color: #BE3144; }
.experience .features-list li.active span { color: #ED3D89; }


/* Active Dot */
.features-list li.active::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 45%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translateY(-50%);
}
.analytics .features-list li.active::before { background: #0021AA; }
.security .features-list li.active::before { background: #024B3B; }
.operations .features-list li.active::before { background: #BE3144; }
.experience .features-list li.active::before { background: #ED3D89; }

.features-list li span {
    margin-right: 5px;
    color: #808080;
   font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal; 
}


/* ===== Scrollbar ===== */
.scrollbar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    height: 95%;
}

.scrollbar-track {
    background-color: #F2F2F2;
    width: 100%;
    height: 100%;
}

.scrollbar-thumb {
    width: 100%;
    position: absolute;
    top:0px;
    transition: height 0.4s ease, width 0.4s ease;
}
.analytics .scrollbar-thumb { background-color: #0021AA; }
.security .scrollbar-thumb { background-color: #024B3B; }
.operations .scrollbar-thumb { background-color: #BE3144; }
.experience .scrollbar-thumb { background-color: #ED3D89; }

/* ===== Right Content ===== */
.features-content {
    width:  898px;
    min-height: 430px;
    padding: 28px;
    position: relative;
    border-radius: 12px;
    background: linear-gradient(121deg, #FCF5F4 0%, #F5DCDF 104.12%); /* Default */
    display: flex;
}
.features-content .slider-content-wrap
{
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.features-content .content-part
{
    width: 460px;
}

/* Category Colors */
.features-content.experience {
    background: linear-gradient(117deg, #F5E1E4 32.28%, #FCF5F4 104.05%);
}
.features-content.analytics {
    background: linear-gradient(279deg, #F3FCFF -2.1%, #DDF5FE  59.66%)
}
.features-content.security {
    background: linear-gradient(283deg, #F2FFF6 -1.99%, #DDFFE9 56.14%);
}
.features-content.operations {
    background: linear-gradient(280deg, #FFF7F2 -2.55%, #FEE1D1  48.66%);
}

.feature-panel {
    display: none;
}

.feature-panel.active {
    display: block;
}
.feature-panel .row{
    justify-content: space-between;align-items: center;
}

.feature-panel .feature-count {
   color: #1A1A1A;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; 
    margin-bottom: 10px;
    display: block;
}

.feature-panel h3 {
    margin-bottom: 20px;
    color: #1A1A1A;
    font-size: 23px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.feature-panel p {
    color: #1A1A1A;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; /* 150% */
}
.feature-panel .content-img {
    width: 314px;
}

.feature-panel img {
    max-width: 100%;
}

/* ===== Desktop: smooth dot via scrollbar-thumb::after ===== */
@media (min-width: 1200px) {
    /* Hide the jumping ::before dot on the li — use thumb::after instead */
    .features-list li.active::before {
        display: none;
    }

    /* Dot rides at the bottom of the growing thumb */
    .features-list .scrollbar-thumb::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: inherit;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1199.98px) {
    .features-slider-wrapper {
    padding: 80px 0 0;
}
    /* Stack layout vertically */
    .features-slider {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    /* Full-width list becomes horizontal tab bar */
    .features-list {
        width: 100%;
        position: relative;
        padding-left: 0;
    }

    /* Horizontal scrollbar at top */
    .features-list .scrollbar {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        height: 2px;
        margin-bottom: 16px;
    }

    .features-list .scrollbar-track {
        width: 100%;
        height: 100%;
    }

    .features-list .scrollbar-thumb {
        height: 100%;
        width: 0%;
        top: 0;
        left: 0;
        border-radius: 0;
    }

    /* Dot at the right end of the horizontal thumb bar */
    .features-list .scrollbar-thumb::after {
        content: '';
        position: absolute;
        right: -5px;
        top: 50%;
        transform: translateY(-50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: inherit;
    }

    /* Horizontal tab list — single row, no wrapping */
    .features-list ul {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px 24px;
        padding-left: 0;
        margin-bottom: 16px;
        overflow-x: auto;
        -ms-overflow-style: none;  /* IE/Edge */
        scrollbar-width: none;     /* Firefox */
    }

    .features-list ul::-webkit-scrollbar {
        display: none;  /* Chrome/Safari/Opera */
    }

    .features-list li {
        margin-bottom: 0;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Hide the left dot indicator in horizontal mode */
    .features-list li.active::before {
        display: none;
    }

    /* Full-width content panel */
    .features-content {
        width: 100%;
        min-height: 430px;
    }

    .features-content .content-part {
        flex: 1;
        width: auto;
    }

    .features-content .slider-content-wrap {
        gap: 24px;
    }

    .feature-panel .content-img {
        width: 280px;
        flex-shrink: 0;
    }

    .feature-panel h3 {
        font-size: 20px;
    }
}
@media (max-width: 767.98px) {
    .features-slider-wrapper {
    padding: 60px 0 0;
}
    .features-slider-wrapper .main-title {
        margin-bottom: 16px;
    }

    .content-img {
        display: none;
    }

    .features-content {
        min-height: auto;
    }

    /* Restore vertical layout — override the horizontal styles from 1199.98px */
    .features-list {
        padding-left: 0;
    }

    /* Restore vertical custom scrollbar on the left.
       left:5px centres the track on the active dot
       (dot centre = padding-left 30 - left 29 + half-width 5 = 6px;
        track centre = 5 + 1 = 6px). */
    .features-list .scrollbar {
        position: absolute;
        left: 5px;
        top: 0;
        bottom: 0;
        width: 2px;
        height: 95%;
        margin-bottom: 0;
    }

    .features-list .scrollbar-thumb {
        width: 100%;
        top: 0;
        left: 0;
    }

    /* Replace horizontal dot with vertical bottom dot for smooth animation */
    .features-list .scrollbar-thumb::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        right: auto;
        top: auto;
        transform: translateX(-50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: inherit;
        display: block;
    }

    /* Override horizontal list → vertical, scrollable.
       padding-left: 30px keeps the ::before dot (left:-29px) inside the
       ul's padding box so overflow-y:auto does not clip it.
       scrollbar-width: auto overrides the "none" set in the 1199.98px block
       so the scrollbar is visible on mobile. */
    .features-list ul {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-y: scroll;
        max-height: 207px;
        margin-bottom: 16px;
        padding-left: 30px;
        gap: 0;
        scrollbar-width: auto;
    }

    /* Standard scrollbar color API (Firefox, Chrome 121+) */
    .analytics  .features-list ul { scrollbar-color: #0021AA #ffffff; }
    .security   .features-list ul { scrollbar-color: #024B3B #ffffff; }
    .operations .features-list ul { scrollbar-color: #BE3144 #ffffff; }
    .experience .features-list ul { scrollbar-color: #ED3D89 #ffffff; }

    /* Show & style native scrollbar — webkit browsers (Chrome < 121, Safari) */
    .features-list ul::-webkit-scrollbar {
        display: block !important;
        width: 20px;
    }

    .features-list ul::-webkit-scrollbar-track {
        background: #ffffff;
        border-radius: 10px;
    }

    .features-list ul::-webkit-scrollbar-thumb {
        border-radius: 10px;
        border: 6px solid #ffffff;
        background-clip: padding-box;
    }

    .analytics  .features-list ul::-webkit-scrollbar-thumb { background-color: #0021AA; }
    .security   .features-list ul::-webkit-scrollbar-thumb { background-color: #024B3B; }
    .operations .features-list ul::-webkit-scrollbar-thumb { background-color: #BE3144; }
    .experience .features-list ul::-webkit-scrollbar-thumb { background-color: #ED3D89; }

    /* Scrollbar arrow buttons */
    .features-list ul::-webkit-scrollbar-button {
        display: block;
        height: 20px;
        background-color: #ffffff;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 8px 8px;
    }

    /* Up arrow */
    .features-list ul::-webkit-scrollbar-button:single-button:vertical:decrement {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M4 1L7 6H1L4 1Z' fill='%23AAAAAA'/%3E%3C/svg%3E");
    }

    /* Down arrow */
    .features-list ul::-webkit-scrollbar-button:single-button:vertical:increment {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M4 7L1 2H7L4 7Z' fill='%23AAAAAA'/%3E%3C/svg%3E");
    }

    /* Allow text wrapping; make inactive items light gray */
    .features-list li {
        white-space: normal;
        margin-bottom: 26px;
        color: #C8C8C8;
        flex-shrink: 1;
    }

    .features-list li span {
        color: #808080;
    }

    /* Hide the jumping ::before dot — thumb::after handles it smoothly */
    .features-list li.active::before {
        display: none;
    }

    /* Active item: dark text, larger size */
    .features-list li.active {
        color: #1A1A1A;
        font-size: 20px;
    }

    /* Active title text stays dark (number span keeps brand colour via global rules) */
    .features-list li.active .feature-list-title {
        color: #1A1A1A;
    }
}
