/* Стили страницы "Сертификаты" */

.documentation {
    padding: 130px 0;
    background-color: #fff;
}

.documentation__title {
    font-size: 2.2rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 15px;
    margin-top: 80px;
}

.documentation__subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

/* Сетка карточек: flex вместо grid ради центрирования неполной строки */
.documents-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.document-card {
    /* 3 в ряд: вычитаем 2 промежутка по 30px */
    flex: 0 1 calc((100% - 60px) / 3);
    box-sizing: border-box;
    background: #fff;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(171, 203, 90, 0.2);
    display: flex;
    flex-direction: column;
}

/* Контейнер для контента карточки */
.document-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.document-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    flex-shrink: 0;
}

.document-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.document-card p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Кнопка */
.document-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--secondary);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto; /* Прижимает кнопку к низу */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.document-card .btn:hover {
    background-color: var(--dark);
    transform: translateY(-2px);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(171, 203, 90, 0.15);
}

/* Адаптация */
@media (max-width: 992px) {
    .documentation {
        padding: 60px 0;
    }

    /* 2 в ряд: вычитаем 1 промежуток 30px */
    .document-card {
        flex-basis: calc((100% - 30px) / 2);
    }
}

@media (max-width: 768px) {
    .documentation {
        padding: 40px 0;
    }

    .documentation__title {
        font-size: 1.8rem;
    }

    .documentation__subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    /* Карточка становится горизонтальной — по одной в ряд */
    .document-card {
        flex-basis: 100%;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 20px;
    }

    .document-icon {
        margin: 0 20px 0 0;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .document-content {
        flex: 1;
    }

    .document-card p {
        margin-bottom: 0;
    }

    .document-card .btn {
        margin-top: 0;
        margin-left: 20px;
        margin-right: 0;
        align-self: center;
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .document-card {
        flex-direction: column;
        text-align: center;
    }

    .document-icon {
        margin: 0 auto 15px;
    }

    .document-content {
        width: 100%;
    }

    .document-card p {
        margin-bottom: 20px;
    }

    .document-card .btn {
        margin-left: auto;
        margin-right: auto;
    }
}