.core-features {
    background: radial-gradient(94.96% 94.96% at 50% 5.04%, #05276A 0%, #010C25 70%);
    padding: 140px 0;
    border-width: 2px 0px 2px 0px;

border-style: solid;

border-image-source: linear-gradient(90deg, rgba(43, 135, 255, 0) 0%, #4797FF 50%, rgba(43, 135, 255, 0) 100%);
border-image-slice: 1;

}

.core-features .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    border-bottom: 1px solid rgba(18, 53, 105, 1);
    padding-bottom: 100px;
    margin-bottom: 100px;
}

.core-features .top .content {
}

.core-features .top .content .main-h2 {
    color: var(--n-white);
    margin-bottom: 40px;
}

.core-features .top .content .subtitle-semibold {
    color: var(--d-white);
    max-width: 680px;
}

.core-features .top .link {
    display: flex;
    background: rgba(12, 64, 142, 0.5);
    border: 1px solid #0C408E;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 840px;
    align-items: stretch;
}


.core-features .top .link img {
    width: auto;
    height: 100%;
    align-self: stretch;
    max-height: 100%;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.core-features .top .link div{
    padding: 26px 24px;
}

.core-features .top .link div .main-h4-semibold {
    color: var(--d-white);
    margin-bottom: 6px;
}

.core-features .top .link div .main-text-semibold {
    color: var(--light-blue);
}

.core-features .top .link:hover {
    background: rgba(12, 64, 142, 0.8);
    border: 1px solid rgba(12, 64, 142, 1);
}

.core-features .middle .h3 {
    color: var(--d-white);
    margin-bottom: 60px;
    text-align: center;
}

.core-features .bottom{
    margin-top: 140px
}

.core-features .bottom .tab-medium {
    color: var(--d-accent);
    margin-bottom: 12px;
    text-align: center;
}

.core-features .bottom .h3 {
    color: var(--d-white);
    margin-bottom: 60px;
    text-align: center;
}

.core-features .bottom .items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.core-features .bottom .items .item {
    display: flex;
    gap: 16px;
    height: 320px;
    background: linear-gradient(180deg, rgba(0, 35, 105, 0.4) 0%, rgba(0, 82, 245, 0.4) 100%);
    border-radius: 20px;
    width: 100%;
    justify-content: space-between;
    flex-direction: column;
    padding: 32px;
}

.core-features .bottom .items .item img {
    width: fit-content;
    display: block;
    height: 72px;

}

.core-features .bottom .items .item .main-h4-semibold {
    color: var(--d-white);
}

/* ===== Middle: two-column feature switcher ===== */

.core-features-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* Items list */
.core-features-items {
    position: relative;
}

.core-feature-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(4, 52, 170, 0.5) 0%, rgba(6, 35, 107, 0.5) 17.53%, rgba(6, 34, 103, 0.5) 86.62%, rgba(6, 29, 85, 0.25) 100%);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
}

.core-feature-item:last-child {
    margin-bottom: 0;
}

.core-feature-item:hover {
    background: linear-gradient(90deg, #0434AA 0%, #06236B 17.53%, #062267 86.62%, rgba(6, 29, 85, 0.5) 100%);
}

.core-feature-item.active {
    background: linear-gradient(90deg, #0434AA 0%, #06236B 17.53%, #062267 86.62%, rgba(6, 29, 85, 0.5) 100%);
    box-shadow: 0px 0px 8px 0px rgba(0, 15, 34, 0.4);
    padding: 45px 32px;
    align-items: flex-start;
}

.core-feature-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.core-feature-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.core-feature-item-content {
    flex: 1;
}

.core-feature-item-title {
    color: var(--d-white);
}

.core-feature-item.active .core-feature-item-title {
    color: var(--light-blue);
}

.core-feature-item-description {
    margin-top: 8px;
    color: var(--d-white);
}

.core-feature-item:not(.active) .core-feature-item-description {
    display: none;
}

/* Video panel */
.core-features-video {
    position: relative;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.core-features-video-wrapper,
.core-features-img-wrapper {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.core-features-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.core-features-video-element.loaded {
    opacity: 1;
}

.core-features-image-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.core-features-image-element.loaded {
    opacity: 1;
}

/* Preloader */
.core-features-video:has(.core-features-preloader) {
    background: rgba(12, 64, 142, 0.2);
}

.core-features-preloader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.core-features-preloader svg {
    display: block;
    animation: core-features-spin 1s linear infinite;
}

@keyframes core-features-spin {
    to { transform: rotate(360deg); }
}

/* Mobile content (hidden on desktop) */
.core-features-mobile-content {
    display: none;
}

@media (max-width: 1919px) {
    .core-features {
        padding: 100px 0;
    }

    .core-features .top .content .main-h2{
        margin-bottom: 32px;
    }

    .core-features .top .link{
        max-width: 620px;
    }

    .core-features .top .link div {
        padding: 19px 24px;
    }

    .core-features .top{
        padding-bottom: 80px;
        margin-bottom: 100px;
    }

    .core-features .top .link img {
        height: 100px;
    }

    .core-feature-item{
        padding: 32px 24px;
        gap: 20px;
    }

    .core-feature-item.active{
        padding: 34px 24px;
    }

    .core-features-content{
        gap: 24px;
    }

    .core-features .bottom {
        margin-top: 120px;
    }

    .core-features .bottom .tab-medium{
        margin-bottom: 10px;
    }

    .core-features .bottom .items .item{
        height: 236px;
    }

    .core-features .bottom .items .item img{
        height: 52px;
    }
}

@media (max-width: 1439px) {
    .core-features {
        padding: 80px 0;
    }

    .core-features .top .content .main-h2 {
        margin-bottom: 24px;
    }

    .core-features .top .link {
        max-width: 560px;
        border-radius: 16px;
    }

    .core-features .top{
        padding-bottom: 60px;
        margin-bottom: 60px;
    }

    .core-features .middle .h3{
        margin-bottom: 48px;
    }

    .core-features .bottom {
        margin-top: 100px;
    }

    .core-features .bottom .h3{
        margin-bottom: 48px;
    }

    .core-features .bottom .items .item {
        height: 213px;
    }
}

@media (max-width: 1279px) {
    .core-features-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .core-features-video {
        display: flex;
        flex-direction: column-reverse;
        box-shadow: 0px 0px 8px 0px rgba(75, 151, 255, 0.2);
        background: rgba(12, 64, 142, 0.2);
        border-radius: 16px;
    }

    .core-features-items {
        display: flex;
        justify-content: space-around;
        background: linear-gradient(90deg, #06236B 17.53%, rgba(6, 29, 85, 0.5) 100%);
        box-shadow: 0px 0px 8px 0px rgba(0, 15, 34, 0.4);

        border-radius: 16px;
    }

    .core-feature-item {
        background: none;
        padding: 16px;
        margin-bottom: 0;
    }

    .core-feature-item.active,
    .core-feature-item:hover {
        background: none;
        box-shadow: none;
        padding: 16px;
    }

    .core-feature-item-icon svg path,
    .core-feature-item-icon svg rect,
    .core-feature-item-icon svg circle {
        fill: var(--n-very-dark-accent);
    }

    .core-feature-item.active .core-feature-item-icon svg path,
    .core-feature-item.active .core-feature-item-icon svg rect,
    .core-feature-item.active .core-feature-item-icon svg circle {
        fill: var(--light-blue);
    }

    .core-feature-item-content {
        display: none;
    }

    .core-features-mobile-content {
        display: block;
        padding: 24px;
        background: linear-gradient(90deg, #06236B 17.53%, rgba(6, 29, 85, 0.5) 100%);
    }

    .core-features-mobile-content h3 {
        margin: 0 0 10px 0;
        color: var(--d-white);
    }

    .core-features-mobile-content p {
        margin: 0;
        color: var(--d-white);
    }

    .core-features-video-wrapper,
    .core-features-img-wrapper {
        width: 100%;
        border-radius: 20px;
        overflow: hidden;
        aspect-ratio: 688 / 437;
        position: relative;
        border-radius: 0;
    }

    .core-features .top .link{
        display: none;
    }

    .core-features .top .content .main-h2 {
       text-align: center;
    }

    .core-features .top .content .subtitle-semibold{
        text-align: center;
    }
    .core-features .middle .h3 {
        margin-bottom: 40px;
    }

    .core-features .bottom {
        margin-top: 60px;
    }

    .core-features .bottom .h3 {
        margin-bottom: 40px;
    }

    .core-features .bottom .items{
        grid-template-columns: 1fr;
    }

    .core-features .bottom .items .item {
        height: fit-content;
        flex-direction: row-reverse;
        align-items: center;
        padding: 20px;
        background: linear-gradient(270deg, rgba(0, 35, 105, 0.4) 0%, rgba(0, 82, 245, 0.4) 100%);
    }

    .core-features .top{
        justify-content: center;
    }

    .core-features-video-element {
        position: static;
        display: block;
        aspect-ratio: 688 / 437;
        transition: none;
    }
}

@media (max-width: 576px) {
    .core-features-content {
        gap: 8px;
    }

    .core-features-video-element.loaded {
        opacity: 1;
    }
    .core-features-mobile-content {
        padding: 20px;
    }

    .core-features {
        padding: 60px 0;
    }

    .core-features .top {
        padding-bottom: 48px;
        margin-bottom: 48px;
    }

    .core-features .bottom .items .item{
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }


    .core-features .bottom .items .item img {
        height: 40px;
        width: auto;
    }
}

