.Features {
    display: flex;
    justify-content: center;
    align-items: center;
}

/*.wrapper_Features {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(3, 372px); !* 3 колонки фиксированной ширины *!*/
/*    grid-template-rows: repeat(2, 320px);   !* 2 ряда фиксированной высоты *!*/
/*    gap: 20px;*/
/*}*/

/* Общие стили */
.wrapper_Features > div {
    width: 372px;
    height: 320px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
}

/* Первый блок — контейнер */
.Bento_1 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Внутренние половинки */
.Bento_1a,
.Bento_1b {
    flex: 1; /* пополам */
    border-radius: 16px;
}
.Bento_1a {
  background-color: rgba(255, 255, 255, 0.4);
    flex: 1;
    background-image: url('/assets/image/home_desktop/Features/Dots.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
.Ask_AI {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 40px;
    width: 280px;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12px;
}

.Ask_AI_text_container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Searching... */
.Ask_AI_text1 {
    color: #7584D6;
    position: absolute;
    font-size: 16px;
    left: 0;
    opacity: 0;
    animation: text1Fade 8s ease-in-out infinite;
}

@keyframes text1Fade {
    0%, 10% { opacity: 0; }
    10%, 45% { opacity: 1; }  /* появляется и держится */
    45%, 100% { opacity: 0; } /* исчезает */
}


/* Иконка пульсирует */
.Ask_AI_img {
    width: 16px;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: iconPulse 8s infinite;
}

@keyframes iconPulse {
    0%, 45% { opacity: 0; transform: translateY(-50%) scale(1); }
    50%, 55% { opacity: 1; transform: translateY(-50%) scale(1.2); }
    60%, 65% { transform: translateY(-50%) scale(0.98); }
    70%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Ask AI anything... появляется на месте Searching... */
.Ask_AI_text {
    color: #7584D6;
    position: absolute;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    filter: blur(4px);
    animation: textTyping 8s ease-in-out infinite;
}

@keyframes textTyping {
    0%, 45% { width: 0ch; filter: blur(4px); opacity: 0; } /* до появления */
    50%, 70% { width: 30ch; filter: blur(0); opacity: 1; } /* появляется плавно */
    100% { width: 0ch; filter: blur(4px); opacity: 0; } /* исчезает */
}



.Ask_AI_img_fon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 802px;
    height: 426px;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: spin 3s linear infinite; /* вращение */
    pointer-events: none; /* не мешает клику */
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.Bento_1b {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_1b.png');
}


/* Bento_2 */

.Bento_2 {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_2/Dots.png');
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.Bento_2_chart {
    /* Removed the red background to match a typical light theme; adjust as needed */
    background-color: transparent;
    width: 166px;
    height: 166px;
    margin-top: 60px;
    margin-bottom: 15px;
}
.Bento_2_percent {
    background-color: rgba(255, 255, 255, 0.35);
    display: flex;
    justify-content: space-around;
    width: 276px;
    height: 65px;
    border-radius: 40px;
}
.Bento_2_percent_all {
    display: flex;
    justify-content: center;
    align-items: baseline;
}
.Bento_2_percent1 {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 60px;
    /*height: 49px;*/
}
.Bento_percent_num {
    color: #5864A8;
    font-size: 32px;
}
.Bento_percent_text {
    text-align: center;
    color: #5864A8;
    font-size: 12px;
}
/* Bento_2 */



/* Bento_3 */
.Bento_3 {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_2/Dots.png');
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;

}

.Bento_3_Folder {
    position: relative;
    width: 143px;
    height: 152px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 40px;
}

.Bento_3_Folder_body {
    position: relative;
    width: 100%;
    height: 100%;
}

.Bento_3_Files {
    color: white;
    font-size: 15px;
    top: 130px;
    left: 20px;
    position: relative;
    z-index: 6;
}

.Bento_3_Front {
    margin-top: 52px;
    margin-left: -10px;
    width: 162px;
    height: 140px;
    position: relative;
    z-index: 5;
}

.Bento_3_Sheet,
.Bento_3_Sheet2,
.Bento_3_Sheet3,
.Bento_3_Sheet4 {
    position: absolute;
    left: 0;
}

.Bento_3_Sheet { bottom: 0; z-index: 3; }
.Bento_3_Sheet2 { bottom: 55px; left: -1px; z-index: 2; }
.Bento_3_Sheet3 { bottom: 50px; left: -1px; z-index: 1; }
.Bento_3_Sheet4 { bottom: 50px; top: 65px; left: 3px; z-index: 1; }

/* --- Анимация появления по очереди --- */
.wrapper_line {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translate(-50%, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 4;
    opacity: 0;

    animation: slideUpDown 9s ease-in-out infinite;
}

.wrapper_line1 {
    animation-delay: 3s;
}

.wrapper_line2 {
    animation-delay: 6s;
}

@keyframes slideUpDown {
    0%, 10% {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    20%, 40% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    50%, 100% {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
}

.Bento_3_Folder_body_text {
    color: #465478;
    font-size: 12px;
    margin-bottom: 5px;
}

.wrapper_line_inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.wrapper_body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.line1, .line2, .line3 {
    background-color: #CDD1EE;
    border-radius: 20px;
    height: 5px;
}

.line1 { width: 70px; }
.line2 { width: 50px; }
.line3 { width: 30px; }

.ico {
    background-color: #CDD1EE;
    border-radius: 5px;
    width: 18px;
    height: 17px;
    display: inline-block;
}

.Bento_3_text {
    text-align: center;
    color: #5864A8;
    font-size: 24px;
}

/* Bento_3 */

/* Bento_4 */


.Bento_4 {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_2/Dots.png');
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.integration_wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* иконки на орбите */
.orbit_icon {
    position: absolute;
    width: 40px;
    height: 40px;
    padding: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    object-fit: contain;

    /* начальное положение */
    transform: rotate(calc(60deg * var(--i))) translate(120px) rotate(calc(-60deg * var(--i)));

    /* вращение вокруг центра + компенсация */
    animation: orbit 25s linear infinite;
}

.circle_text {
    position: absolute;
    /*top: 50px;*/
    /*left: 57px;*/
    font-size: 32px;
    transform: rotate(-90deg);
    animation: rotateText 20s linear infinite; /* текст по часовой */
}

.circle_text_style {
    font-size: 13px;
    letter-spacing: 3px;
    fill: #5864A8;
}

.integration_circle {
    border: 7px solid #FFFFFF;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.integration_circle_text {
    position: relative;
    width: auto;
    height: auto;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Анимации */
@keyframes rotateText {
    from { transform: rotate(-90deg); }
    to   { transform: rotate(270deg); }
}

/* орбита: влево вокруг центра, вправо вокруг себя */
@keyframes orbit {
    from {
        transform: rotate(calc(60deg * var(--i))) translate(120px) rotate(calc(-60deg * var(--i)));
    }
    to {
        transform: rotate(calc(60deg * var(--i) - 360deg)) translate(120px) rotate(calc(-60deg * var(--i) + 360deg));
    }
}


/* Bento_4 */

/* Bento_5 */
.Bento_5 {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_2/Dots.png');
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.Bento_5_text {
    text-align: center;
    color: #5864A8;
    font-size: 24px;
    margin-top: 40px;
}
.Bento_5_Game {
    background-color: #FFFFFF;
    border-radius: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    overflow: hidden; /* чтобы углы ячеек не вылезали за border-radius */
    box-shadow:
            0 0 12px rgba(128, 135, 174, 0.76),
            -6px -6px 12px rgba(255, 255, 255, 0.25);

}

.Bento_5_Cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px; /* для X и O */
    color: #5864A8;
    border: 1px solid #F1F2F9;
}

.Bento_5_Cell img {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
}

/* Плавное появление */
.Bento_5_Cell img.show {
    opacity: 1;
    transform: scale(0);
}

/* Победа крестика: вращение 2 оборота */
@keyframes winRotate {
    0% {
        transform: rotate(0deg) scale(0.5);
    }
    100% {
        transform: rotate(720deg) scale(0.5);
    }
}

.Bento_5_Cell.win-cross img {
    animation: winRotate 1s ease-in-out forwards;
}


/* Убираем лишние границы по краям */
.Bento_5_Cell:nth-child(-n+3) { border-top: none; } /* верхний ряд */
.Bento_5_Cell:nth-child(3n+1) { border-left: none; } /* левый ряд */
.Bento_5_Cell:nth-child(3n)   { border-right: none; } /* правый ряд */
.Bento_5_Cell:nth-last-child(-n+3) { border-bottom: none; } /* нижний ряд */

/* Bento_5 */

/* Bento_6 */

.Bento_6 {
    background-color: rgba(255, 255, 255, 0.45);
    background-image: url('/assets/image/home_desktop/Features/Bento_2/Dots.png');
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.Bento_6_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


.Bento_6_text {
    text-align: center;
    color: #5864A8;
    font-size: 24px;
    margin-top: 40px;
}
.Bento_6_Process {
    display: flex;
    align-items: center;
    width: 300px;
    height: 150px;
    padding: 10px;
    border-radius: 8px;
    justify-content: center;
}

.track {
    margin: 8px;
    width: 16px;
    border: 1px solid #7584D6;
    background-color: #FFFFFF;
    border-radius: 20px;
    height: 86px; /* фиксированная высота */
    position: relative;
    overflow: hidden;
}

.ball {
    width: 15px;
    height: 15px;
    background-color: #80E5FF;
    border-radius: 50%;
    position: absolute;
    bottom: 0; /* стартовая позиция */
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.2s ease;
}

/* --- Десктоп по умолчанию --- */
.wrapper_Features {
    display: grid;
    grid-template-columns: repeat(3, 372px); /* 3 колонки */
    grid-template-rows: repeat(2, 320px);   /* 2 ряда */
    gap: 20px;
    justify-content: center;
}

/* --- Планшет (до 1024px) --- */
@media (max-width: 1024px) {
    .wrapper_Features {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки */
        grid-template-rows: auto;
        gap: 16px;
        width: 100%;
        padding: 10px;
    }

    .wrapper_Features > div {
        width: 100%;
        height: auto; /* убираем фиксированную высоту */
        min-height: 260px;
    }
}

/* --- Мобильные (до 768px) --- */
@media (max-width: 768px) {
    .wrapper_Features {
        grid-template-columns: 1fr; /* одна колонка */
        gap: 16px;
        width: 100%;
        padding: 1px;
    }

    .wrapper_Features > div {
        width: 100%;
        height: auto;
        min-height: 310px;
    }

    /* уменьшаем шрифты */
    .Bento_percent_num {
        font-size: 24px;
    }
    .Bento_3_text,
    .Bento_5_text,
    .Bento_6_text {
        font-size: 18px;
    }

    .Ask_AI {
        width: 280px;
        height: 44px;
    }
    .Ask_AI_text,
    .Ask_AI_text1 {
        font-size: 14px;
    }
    .Ask_AI_img {
        width: 14px;
        right: 12px;
    }

    .integration_wrapper {
        width: 269px;
        height: 220px;
    }
    .orbit_icon {
        width: 32px;
        height: 32px;
        padding: 6px;
        transform: rotate(calc(60deg * var(--i))) translate(90px) rotate(calc(-60deg * var(--i)));
    }
}
