/* Раздел «Новости» — адаптация без горизонтального скролла, рамочки */

.news-modal {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    overflow-x: hidden;
    padding: 0 !important;
}

.news-modal__dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.news-modal__content,
.news-modal__body,
.news-modal .panel.news,
.news-modal .panel-body,
.news-modal .newscontent {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.news-modal__content {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    overflow-x: hidden;
}

.news-modal__header {
    padding: 0.75rem 1rem;
    align-items: center;
}

.news-modal__header .modal-title {
    font-size: 1.05rem;
    padding-right: 1.5rem;
}

.news-modal__body {
    padding: 0.75rem 1rem 0.5rem;
    overflow-x: hidden;
}

.news-modal__footer {
    padding: 0.75rem 1rem 1rem;
}

.news-mobile {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.news-mobile-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-mobile-search {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
}

.news-mobile-counter {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.news-mobile-list {
    display: block;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.news-mobile-item {
    display: block;
    background: transparent;
    border: 1px solid rgba(15, 62, 86, 0.18);
    border-radius: 8px;
    padding: 0.85rem 0.9rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    overflow-x: hidden;
    overflow-y: visible;
    height: auto;
    min-height: 0;
}

.news-mobile-item.is-hidden {
    display: none !important;
}

.news-mobile-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #f0f0f0;
}

.news-mobile-item__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #212529;
    word-break: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

.news-mobile-item__date {
    flex-shrink: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    background: #f3f3f3;
    color: #444;
    white-space: nowrap;
}

.news-mobile-item__body {
    display: block;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    height: auto;
    overflow: visible;
    visibility: visible;
}

.news-mobile-item__body img,
.news-mobile-item__body table,
.news-mobile-item__body iframe,
.news-mobile-item__body video {
    max-width: 100% !important;
    height: auto !important;
}

.news-mobile-item__body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-mobile-item__body a {
    color: #FF5900;
    word-break: break-all;
}

.news-mobile-item__empty {
    color: #888;
    font-style: italic;
}

.news-mobile-empty,
.news-mobile-no-result {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: #666;
}

/* Обязательные новости (ознакомление) — те же рамочки */
.free-news-modal {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    overflow-x: hidden;
    padding: 0 !important;
}

.free-news-modal .modal-dialog11,
.free-news-modal .news-modal__dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.free-news-modal .modal-content {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    overflow-x: hidden;
}

.free_news .news-mobile-item {
    margin-bottom: 0.75rem;
}

.free_news .news-mobile-item__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding-top: 0.55rem;
    border-top: 1px solid #f0f0f0;
}

@media (min-width: 768px) {
    .news-mobile-item {
        padding: 1rem 1.25rem;
    }

    .news-mobile-item__title {
        font-size: 1.1rem;
    }
}
