/* Ð¡ÐµÐºÑ†Ð¸Ñ "Ð­Ñ‚Ð°Ð¿Ñ‹ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹" */
.stages {
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    color: var(--white);
    overflow: hidden;
}

    .stages.lazy-bg-loaded {
        background-image: url('assets/bg-stages.webp');
    }

    .stages .container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh; /* важно: растянуть на всю высоту экрана */
        align-items: center;
        /* УДАЛЯЕМ или уменьшаем padding, чтобы не ломать распределение */
        /* ГЛАВНОЕ: равномерное распределение */
        justify-content: space-evenly;
    }



@media (max-width: 768px) {
    .stages .container {
        padding: 30px 10px 30px !important;
    }

    .stages .container {
        gap: 30px 10px !important;
    }

    .stages .container {
        height: auto; /* убираем 100vh */
    }

     .stage-item p {
        display: none;
    }


    .stage-item h3 {
        font-size: 16px !important;
    }

    .stage-item p {
        font-size: 14px !important;
    }

    .stages-grid {
        padding: 15px !important;
    }
}


.stages .container h2 {
    font-weight: 500;
    font-size: clamp(26px, 2.6vw, 45px);
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 1s ease forwards;
    text-shadow: var(--universal-text-shadow);
}

.stages-telegram {
    display: flex;
    align-items: center;
    z-index: 10;
    gap: 15px;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.5s;
}


@keyframes pulse-telegram {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.tg-icon {
    animation: pulse-telegram 2.2s ease-in-out infinite;
    width: 55px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.25));
}

.tg-dots {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 6px; /* слегка поднять */
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    animation: wave-motion 3s infinite ease-in-out;
}

@keyframes wave-motion {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    25% {
        transform: translateY(-3px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(3px);
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

.dot2 {
    animation-delay: .5s;
}

.dot3 {
    animation-delay: 1s;
}

.stages-grid {
    max-width: 856px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-backdrop-filter: var(--blur8);
    backdrop-filter: var(--blur8);
    background-color: var(--glass-bg);
    padding: 25px;
    border-radius: var(--radius);
    border: var(--glass-border);
    box-shadow: var(--universal-shadow);
    opacity: 0;
    transform: scale(0.96);
    animation: glassIn 0.44s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
}

    .stages-grid::after {
        content: "";
        position: absolute;
        inset: 0;
        background: var(--befor_01);
        border-radius: var(--radius);
        z-index: -1; /* ← Сзади */
    }

@keyframes glassIn {
    0% {
        opacity: 0;
        transform: scale(0.96);
        filter: blur(10px);
    }

    70% {
        filter: blur(3px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}


.stage-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: var( --grey_gradient);
}


.stage-item {
    opacity: 0;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, /* мягкая псевдо-рамка */
    0 4px 14px rgba(0,0,0,0.28); /* твоя тень */
    transform: translateY(20px);
    animation: fadeInUp 0.9s ease forwards;
}

    /* Плавная последовательность появления */
    .stage-item:nth-child(1) {
        animation-delay: 0.7s;
    }

    .stage-item:nth-child(2) {
        animation-delay: 0.9s;
    }

    .stage-item:nth-child(3) {
        animation-delay: 1.1s;
    }

    .stage-item:nth-child(4) {
        animation-delay: 1.3s;
    }

    .stage-item:nth-child(5) {
        animation-delay: 1.5s;
    }

    /* базовый фон строки */
    .stage-item::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: var(--radius);
        backdrop-filter: blur(3px);
        transition: background 0.25s ease;
        z-index: -1;
    }



    /* при наведении на строку / текст фон становится чуть серее/темнее */
    .stage-item:hover::after {
        background: rgba(153, 128, 114, 0.88);
    }

    /* элементы должны быть выше подложки */
    .stage-item h3,
    .stage-item p {
        position: relative;
        z-index: 1;
    }
        /* маленький круг с номером этапа */
        .stage-item h3::before {
            content: "1";
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            width: 26px;
            height: 26px;
            border-radius: 50%;
            border: var(--white-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 600;
            background-color: var(--orange);
        }

    .stage-item h3 {
        margin: 0;
        padding: 14px 18px 14px 60px; /* место под цифру слева */
        font-weight: 600;
        letter-spacing: 0.3px;
        font-size: 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .stage-item p {
        margin: 0;
        opacity: 1;
        line-height: 1.5;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
        padding: 10px 18px 16px 18px;
    }
    /* нумерация этапов через nth-child */
    .stage-item:nth-child(2) h3::before {
        content: "2";
    }

    .stage-item:nth-child(3) h3::before {
        content: "3";
    }

    .stage-item:nth-child(4) h3::before {
        content: "4";
    }

    .stage-item:nth-child(5) h3::before {
        content: "5";
    }
