/* Стили страницы материала (статьи). Подключить после style.css / style.add.css */

.material-article {
    padding-bottom: 64px;
}

.material-article__content {
    position: relative;
}

.material-article__layout {
    max-width: 820px;
    margin: 0 auto;
}

.material-article__meta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.material-article__views {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1;
    color: #7b7b7b;
    background: #f7f7f7;
    border-radius: 999px;
}

.material-article__views svg {
    flex-shrink: 0;
    fill: currentColor;
}

.material-article__header {
    margin-bottom: 32px;
    text-align: center;
}

.material-article__date {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 150%;
    color: #7b7b7b;
}

.material-article__title-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.material-article__title {
    margin: 0;
    font-weight: 500;
    font-size: 36px;
    line-height: 130%;
    color: #222;
}

.material-article__edit {
    flex-shrink: 0;
    white-space: nowrap;
}

.material-article__gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-bottom: 40px;
}

.material-article__figure {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #f0f0f0;
}

.material-article__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.material-article__body {
    max-width: none;
    margin-top: 0;
}

.material-article__body time,
.material-article__body h1 {
    display: none;
}

.material-article__body > :first-child {
    margin-top: 0;
}

.material-article__body > :last-child {
    margin-bottom: 0;
}

.material-article__body img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.material-article__body .frame {
    border: 1px solid #eaeaea;
    box-shadow: 0 8px 24px rgba(34, 34, 34, 0.04);
}

.material-article__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 16px;
}

.material-article__body table th,
.material-article__body table td {
    padding: 12px 16px;
    border: 1px solid #eaeaea;
    text-align: left;
    vertical-align: top;
}

.material-article__body table th {
    background: #f7f7f7;
    font-weight: 500;
}

.material-article__reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eaeaea;
}

.material-article__reactions-label {
    font-size: 16px;
    line-height: 150%;
    color: #7b7b7b;
}

.material-article__reactions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.material-article__reaction {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #eaeaea;
    border-radius: 999px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.material-article__reaction:hover {
    border-color: #455999;
    color: #455999;
    box-shadow: 0 8px 20px rgba(69, 89, 153, 0.08);
}

.material-article__reaction.is-active {
    border-color: #455999;
    background: rgba(69, 89, 153, 0.08);
    color: #455999;
}

.material-article__reaction--dislike.is-active {
    border-color: #52006c;
    background: rgba(82, 0, 108, 0.08);
    color: #52006c;
}

.material-article__reaction:disabled {
    cursor: wait;
    opacity: 0.7;
}

.material-article__reaction-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.material-article__reaction-count {
    min-width: 1.5em;
    font-weight: 500;
}

.material-article__reactions.is-loading {
    opacity: 0.85;
}

.material-article__reactions-notice {
    width: 100%;
    font-size: 14px;
    line-height: 150%;
    color: #455999;
}

.material-article__reactions-notice.is-error {
    color: #ff2f2f;
}

.material-article__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding-top: 0;
    border-top: 0;
}

.material-article__author {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
    line-height: 150%;
}

.material-article__author-label {
    color: #7b7b7b;
}

.material-article__author-name {
    font-weight: 500;
    color: #222;
}

.material-article__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.material-article__share-label {
    font-size: 16px;
    line-height: 150%;
    color: #7b7b7b;
}

.material-article__share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.material-article__share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #eaeaea;
    border-radius: 999px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.material-article__share-btn:hover {
    border-color: #455999;
    color: #455999;
    box-shadow: 0 8px 20px rgba(69, 89, 153, 0.08);
}

.material-article__share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #455999;
    color: #fff;
    flex-shrink: 0;
}

.material-article__share-icon img {
    width: 16px;
    height: 16px;
}

.material-article__share-btn--telegram .material-article__share-icon {
    background: #64a9dc;
}

.material-article__share-btn--whatsapp .material-article__share-icon {
    background: #65bc54;
}

.material-article__share-notice {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    padding: 4px 8px;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

.material-article__share-btn--copy {
    position: relative;
}

.material-article__related {
    margin-top: 64px;
    padding-top: 0;
}

.material-article__related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.material-article__related-title {
    margin: 0;
    font-size: 28px;
    line-height: 130%;
}

.material-article__related-all.more-link {
    justify-content: flex-start;
    padding: 0;
    font-size: 16px;
}

.material-article__related-all.more-link svg {
    width: 22px;
    height: 22px;
    margin-left: 8px;
}

.material-article__carousel .swiper-slide {
    height: auto;
}

.material-related-card {
    height: 100%;
}

.material-related-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.material-related-card__link:hover {
    border-color: #455999;
    box-shadow: 0 12px 32px rgba(69, 89, 153, 0.12);
    transform: translateY(-2px);
}

.material-related-card__media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f0f0f0;
}

.material-related-card__img,
.material-related-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.material-related-card__img {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.material-related-card__link:hover .material-related-card__img {
    transform: scale(1.04);
}

.material-related-card__placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 100%);
}

.material-related-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 20px;
}

.material-related-card__date {
    font-size: 13px;
    line-height: 150%;
    color: #7b7b7b;
}

.material-related-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 130%;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.material-related-card__link:hover .material-related-card__title {
    color: #455999;
}

.material-article__slider .slider__footer {
    margin-top: 24px;
}

@media only screen and (max-width: 991px) {
    .material-article__title {
        font-size: 30px;
    }

    .material-article__gallery {
        margin-bottom: 32px;
    }

    .material-article__related-title {
        font-size: 24px;
    }
}

@media only screen and (max-width: 767px) {
    .material-article {
        padding-bottom: 40px;
    }

    .material-article__header {
        margin-bottom: 24px;
        text-align: left;
    }

    .material-article__title-row {
        align-items: flex-start;
    }

    .material-article__title {
        font-size: 24px;
    }

    .material-article__gallery {
        gap: 12px;
        margin-bottom: 24px;
    }

    .material-article__figure,
    .material-article__img {
        border-radius: 0;
    }

    .material-article__gallery,
    .material-article__body .frame,
    .material-article__body img {
        width: calc(100% + 32px);
        max-width: calc(100% + 32px);
        margin-left: -16px;
    }

    .material-article__body {
        font-size: 16px;
    }

    .material-article__body .frame {
        padding: 24px 16px;
    }

    .material-article__body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 14px;
    }

    .material-article__footer {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 32px;
    }

    .material-article__reactions {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 32px;
    }

    .material-article__reactions-actions,
    .material-article__share,
    .material-article__share-actions {
        width: 100%;
    }

    .material-article__reaction {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

    .material-article__share-btn {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

    .material-article__share-btn--copy {
        flex-basis: 100%;
    }

    .material-article__related {
        margin-top: 40px;
    }

    .material-article__related-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
