/* =========================
   ARTICLES (твоё — без изменений)
   ========================= */
.articles-container {
    .top-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .row-mobile {
        @media screen and (max-width: 500px) {
            width: 100%;
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;

            button { width: 100%; }
        }
    }

    .articles-list {
        display: flex;
        flex-direction: column;
        gap: 10px;

        .article-item {
            display: flex;
            gap: 50px;
            align-items: center;

            @media screen and (max-width: 500px) {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .article-description {
                display: flex;
                flex-direction: column;
                gap: 5px;

                span:nth-child(1) {
                    font-weight: 400;
                    font-size: 14px;
                    color: var(--secondary-text-color);
                }
                span:nth-child(2) {
                    font-weight: 600;
                    font-size: 16px;
                    color: var(--primary-text-color);
                }
                span:nth-child(3) {
                    font-weight: 400;
                    font-size: 14px;
                    color: var(--secondary-text-color);
                }
            }
        }
    }
}

#link-modal {
    width: 920px;
    @media screen and (max-width: 500px) { width: 100%; }
}

#term-modal {
    width: 920px;
    @media screen and (max-width: 500px) { width: 100%; }
}

.link-article-modal-content {
    ul {
        li {
            span { color: var(--primary-color); }
        }
    }
    li::marker { color: var(--primary-color); }
}

.term-article-modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;

    .term-article-text-content {
        font-weight: 400;
        font-size: 16px;
        color: var(--primary-text-color);
    }

    .section-block-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;

        span {
            font-weight: 700;
            font-size: 16px;
            color: var(--primary-text-color);
        }

        .outline-button { white-space: nowrap; }
    }
}

/* Кнопки/пагинация в статьях */
.articles-container a.button-wrapper,
.articles-container a.button-wrapper-outline,
.articles-container a.outline-button { text-decoration: none; }

.articles-container .button-wrapper.is-active,
.articles-container .button-wrapper-outline.is-active {
    background: #00ABC2;
    color: #fff;
    border-color: #00ABC2;
}
.articles-container .button-wrapper-outline.is-active { box-shadow: none; }

.articles-pagination {
    margin: 24px 0 8px;
    display: flex;
    justify-content: center;
}
.articles-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.articles-pagination .page-numbers li a,
.articles-pagination .page-numbers li span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    text-decoration: none;
}
.articles-pagination .page-numbers li .current {
    background: #00ABC2;
    border-color: #00ABC2;
    color: #fff;
}
.articles-pagination .page-numbers li a:hover { border-color: #00ABC2; }

.articles-container .modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
    background: transparent;
}
.articles-container .modal[aria-hidden="false"] { display: flex; }

.articles-container .modal-header,
.articles-container .modal-content,
.articles-container .modal-footer {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* =========================
   STATIONS (новое — только эта зона)
   ========================= */
.stations-container {

    /* Общий блок карты: БЕЗ скругления и фона — чтобы карта была прямоугольной,
       а скругление визуально давали только верх/низ-плашки */
    .seismic-map-container {
        background: transparent;
        border-radius: 0;
        overflow: visible;
        margin-top: 12px;
    }

    /* Верхняя плашка (скругление сверху) */
    .map-details-block-top {
        border-radius: 16px 16px 0 0;
        background: var(--card-background-color, #f5f7f7);
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
        font-weight: 700;
        font-size: 16px;
        color: var(--primary-text-color, #0a0a0a);
        margin: 0; border: 0;
    }

    /* Контейнер карты — на всю ширину, прямоугольный */
    #map-container {
        display: block;
        width: 100%;
        height: 480px;  // если задаётся инлайном — можно не дублировать
    border-radius: 0;
        background: #eaeaea; // запасной фон до загрузки тайлов
    }

    /* Нижняя плашка (скругление снизу) */
    .map-details-block-bottom {
        border-radius: 0 0 16px 16px;
        background: var(--card-background-color, #f5f7f7);
        padding: 10px 16px;
        margin: 0; border: 0;

        .flex-block {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 28px;
            flex-wrap: wrap;
        }

        .row {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            line-height: 1.2;
            white-space: nowrap;
            font-size: 14px;
            color: var(--secondary-text-color, rgba(0,0,0,.65));

            img {
                width: 18px;
                height: 18px;
                display: inline-block;
                object-fit: contain;
            }
        }
    }

    /* Чуть отступим контролы Leaflet от краёв блока */
    .leaflet-top.leaflet-left    { margin-top: 10px; margin-left: 10px; }
    .leaflet-bottom.leaflet-right{ margin-bottom: 10px; margin-right: 10px; }

    @media (max-width: 640px) {
        .map-details-block-top { font-size: 14px; }
        .map-details-block-bottom .flex-block { gap: 16px; }
        .map-details-block-bottom .row { font-size: 13px; }
    }
}
