.problem-card02 {
    display: flex;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    width: 80%;
    justify-self: center;
    height: 300px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-evenly;
    cursor: pointer;
}

.problem-card02:hover{
    transform: scale(1.03);
}

.description-card02 {
    display: flex;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    width: 80%;
    justify-self: center;
    height: 300px;
    flex-direction: column;
    align-items: flex-start;
}

.problem-title02 {
    font-weight: bold;
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
}

.problem-title02 p {
    line-height: 3.5vh;
    font-weight: 500;
    font-size: 2vh;
}

.etap-grid-02 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 4vh;
    padding-bottom: 10vh;
    margin-right: 20vh;
    margin-left: 20vh;
    justify-items: center;
    justify-content: center;
}

.etap-grid-card-02 {
    display: flex;
    cursor: pointer;
    background: #fff;
    padding: 20px;
    box-shadow: 0px 20px 20px 2px rgb(0 0 0 / 13%);
    width: 100%;
    height: 350px;
    transition: all 0.3s ease-in-out;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    font-size: 2.2vh;
}

.etap-grid-card-02 p{
  font-size: 20px;
}

.etap-grid-card-02:hover {
    transform: scale(1.03);
}

.etap-grid-card-02:hover::before {
    width: 100%;
}

/* Чтобы текст оставался поверх заполнения */
.etap-grid-card-02 > * {
    position: relative;
    z-index: 2;
}

.etap-grid-card-02::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #FFD700;
    transition: width 0.5s ease-in-out;
    z-index: 1;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 4vh;
    padding-bottom: 10vh;
    margin-right: 20vh;
    margin-left: 20vh;
    justify-items: center;
    justify-content: center;
}

.type-grid-card{
    display: flex;
    cursor: pointer;
    background: #fff;
    padding: 20px;
    padding: 2vh;
    box-shadow: 0px -5px 10px 7px rgb(0 0 0 / 13%);
    width: 90%;
    height: 300px;
    transition: all 0.3s ease-in-out;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center; 
}

.type-grid-card:hover{
    transform: scale(1.03);
}

.type-grid-card {
    display: flex;
    cursor: pointer;
    background: #fff;
    padding: 20px;
    box-shadow: 0px -5px 10px 7px rgb(0 0 0 / 13%);
    width: 90%;
    height: 350px;
    transition: all 0.3s ease-in-out;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.problem-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

.problem-text-fix {
    color: gray;
    width: 80%;
    padding-top: 2vh;
}

.problem-grid-card {
    display: flex;
    cursor: pointer;
    background: #fff;
    padding: 20px;
    box-shadow: 0px -5px 10px 7px rgb(0 0 0 / 13%);
    width: 90%;
    padding: 5vh;
    height: 350px;
    transition: all 0.3s ease-in-out;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.problem-grid-card:hover{
    transform: scale(1.03);
}

.posttext {
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 30vh;
}

.posttext-container{
    max-width: 60%;
    margin-top: 10vh;
    margin-bottom: 3vh;
}

.posttext-container p{
    font-size: 20px;
    line-height: 2;
}
@media screen and (max-width: 1650px) {
.etap-grid-02 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 4vh;
    padding-bottom: 10vh;
    margin-right: 20vh;
    margin-left: 20vh;
    justify-items: center;
    justify-content: center;
}
}

@media screen and (max-width: 1400px) {
.etap-grid-02 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 4vh;
    padding-bottom: 10vh;
    margin-right: 20vh;
    margin-left: 20vh;
    justify-items: center;
    justify-content: center;
}

.type-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 5vw;
        gap: 16px;
    }
}
@media screen and (max-width: 1300px) {
    .etap-grid-02 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 4vh;
        padding-bottom: 10vh;
        margin-right: 20vh;
        margin-left: 20vh;
        justify-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 1024px) {
    .etap-grid-02 {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 5vw;
        gap: 16px;
    }

    .etap-grid-card-02,
    .type-grid-card,
    .problem-grid-card {
        width: 100%;
        height: auto;
        padding: 4vh 2vw;
    }

    .problem-card02,
    .description-card02 {
        width: 90%;
        padding: 4vh 2vw;
        height: auto;
    }

    .posttext-container {
        max-width: 90%;
    }

    .etap-grid-card-02 p,
    .posttext-container p {
        font-size: 18px;
    } 
}

/* ===== Смартфоны: от 768px и ниже ===== */
@media screen and (max-width: 768px) {
    .etap-grid-02,
    .type-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        margin: 0 4vw;
        gap: 12px;
        margin-top: 4vh;
    }

    .etap-grid-card-02,
    .type-grid-card,
    .problem-grid-card {
        width: 100%;
        align-items: center;
        padding: 4vh 4vw;
    }

    .problem-card02,
    .description-card02 {
        width: 100%;
        padding: 4vh 4vw;
    }

    .problem-title02 {
        font-size: 20px;
        flex-direction: row;
        gap: 8px;
    }

    .problem-title02 p {
        font-size: 16px;
    }

    .etap-grid-card-02 p,
    .posttext-container p {
        font-size: 16px;
    }

    .problem-text-fix {
        width: 100%;
        padding-top: 2vh;
    }

    .posttext-container {
        margin-top: 6vh;
    }
}

/* Телефоны (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .posttext {
        padding-bottom: 25vh;
    }
}

/* Планшеты (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .posttext {
        padding-bottom: 28vh;
        text-align: center;
    }
}

/* ===== Маленькие устройства (телефоны в портретной ориентации): 480px и ниже ===== */
@media screen and (max-width: 480px) {
    .problem-title02 {
        font-size: 18px;
    }

    .problem-title02 p,
    .etap-grid-card-02 p,
    .posttext-container p {
        font-size: 14px;
        text-align: center;
    }

    .posttext {
        padding-bottom: 20vh;
    }

    .etap-grid-card-02,
    .type-grid-card,
    .problem-grid-card,
    .problem-card02,
    .description-card02 {
        padding: 3vh 5vw;
    }

    .posttext-container {
        margin-top: 4vh;
        margin-bottom: 2vh;
    }
}
