/* Лента новостей blog.php */
.gdi-news-hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fc;
    border-radius: 16px;
    border: 1px solid #e8ecf4;
}

.gdi-news-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: #3d4459;
    background: #fff;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.gdi-news-hub-tab:hover {
    border-color: rgba(114, 10, 164, 0.35);
    color: #720aa4;
}

.gdi-news-hub-tab.is-active {
    background: linear-gradient(135deg, #720aa4, #050a24);
    color: #fff;
    box-shadow: 0 8px 20px rgba(114, 10, 164, 0.25);
}

.gdi-news-hub-tab__cnt {
    font-size: 0.75rem;
    opacity: 0.85;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
}

.gdi-news-hub-tab:not(.is-active) .gdi-news-hub-tab__cnt {
    background: rgba(114, 10, 164, 0.1);
    color: #720aa4;
}

.gdi-news-hub-search {
    flex: 1 1 220px;
    min-width: 200px;
    position: relative;
}

.gdi-news-hub-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.35rem;
    border-radius: 999px;
    border: 1px solid #dee2e6;
}

.gdi-news-hub-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b93a7;
}

.gdi-news-suggest {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(5, 10, 36, 0.12);
    border: 1px solid #e8ecf4;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.gdi-news-suggest.is-open {
    display: block;
    animation: gdiSuggestIn 0.2s ease;
}

@keyframes gdiSuggestIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.gdi-news-suggest button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.gdi-news-suggest button:hover {
    background: rgba(114, 10, 164, 0.08);
    color: #720aa4;
}

/* Лента blog / главная: masonry без пробелов между карточками разной высоты (js/gdi-news-masonry.js) */
.gdi-news-masonry {
    --gdi-news-masonry-gap: 24px;
    position: relative;
    width: 100%;
    min-height: 120px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gdi-news-masonry.is-masonry-ready {
    opacity: 1;
}

.gdi-news-masonry__item {
    min-width: 0;
    box-sizing: border-box;
}

/* «Читайте также» — ровная сетка 2 колонки */
.gdi-news-read-also__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.gdi-news-read-also__cell {
    min-width: 0;
    display: flex;
}

.gdi-news-read-also__cell .gdi-news-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gdi-news-read-also__cell .gdi-news-card__body {
    flex: 1;
}

@media (min-width: 576px) {
    .gdi-news-read-also__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gdi-news-card--compact .gdi-news-card__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.gdi-news-card--compact .h5 {
    font-size: 1.05rem;
    line-height: 1.35;
}

.gdi-news-card--compact .gdi-news-card__body {
    padding: 1rem 1.15rem 1.15rem;
}

.gdi-news-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 22px rgba(5, 10, 36, 0.07);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.gdi-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(114, 10, 164, 0.14);
}

.gdi-news-card__media {
    display: block;
    overflow: hidden;
    line-height: 0;
}

.gdi-news-card__img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    display: block;
    background: #e8ecf4;
}

.gdi-news-card__body {
    padding: 1.25rem 1.35rem 1.35rem;
}

.gdi-news-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.78rem;
    color: #8b93a7;
    margin-bottom: 0.65rem;
}

.gdi-news-card__type {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.gdi-news-card__type--site {
    background: rgba(114, 10, 164, 0.12);
    color: #720aa4;
}

.gdi-news-card__type--world {
    background: rgba(5, 10, 36, 0.08);
    color: #050a24;
}

.gdi-news-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.75rem;
}

.gdi-news-card__tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #f0f2f8;
    color: #5c647d;
    text-decoration: none;
}

.gdi-news-card__tag:hover {
    background: #720aa4;
    color: #fff;
}

.gdi-news-article-hero {
    position: relative;
    min-height: 300px;
    background: linear-gradient(135deg, #050a24 0%, #720aa4 100%);
    overflow: hidden;
    isolation: isolate;
}

.gdi-news-article-hero img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    opacity: 0.88;
    filter: contrast(1.05) saturate(1.05);
}

.gdi-news-article-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 10, 36, 0.82) 0%, rgba(5, 10, 36, 0.45) 38%, rgba(5, 10, 36, 0.25) 55%),
        linear-gradient(0deg, rgba(5, 10, 36, 0.97) 0%, rgba(5, 10, 36, 0.55) 45%, transparent 72%);
    pointer-events: none;
}

.gdi-news-article-hero__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 2.25rem 0 2.5rem;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.gdi-news-article-hero__content .container {
    position: relative;
}

.gdi-news-article-hero__crumbs .breadcrumb-item a,
.gdi-news-article-hero__crumbs .breadcrumb-item.active {
    color: #fff !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.45);
    opacity: 1;
}

.gdi-news-article-hero__crumbs .breadcrumb-item a:hover {
    color: #e8d4ff !important;
}

.gdi-news-article-hero__badge {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.gdi-news-article-hero__meta {
    color: #f0f2fa !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.gdi-news-article-hero__title {
    color: #fff !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.02em;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 4px 18px rgba(0, 0, 0, 0.75),
        0 0 1px rgba(0, 0, 0, 1);
}

.gdi-news-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.gdi-news-article-hero .gdi-news-tags-row a {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(5, 10, 36, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.gdi-news-article-hero .gdi-news-tags-row a:hover {
    background: rgba(114, 10, 164, 0.85);
    border-color: rgba(255, 255, 255, 0.55);
}

.gdi-news-read-also {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e8ecf4;
}

.gdi-news-read-also h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #050a24;
    margin-bottom: 1.25rem;
}


.news-body-rich .gdi-news-world p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.news-body-rich .gdi-news-world p:first-of-type {
    font-size: 1.08rem;
    color: #050a24;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(5, 10, 36, 0.05), rgba(114, 10, 164, 0.06));
    border-left: 4px solid #720aa4;
}

.news-body-rich .gdi-news-source {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #dee2e6;
    font-size: 0.9rem;
}
