body {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    transition: background-color 0.3s;
    font-optical-sizing: auto;
    font-weight: 300;
    font-size: 18px;
    font-style: normal;
    padding: 10px;
    background: #0d1117;
    color: #e6e6e6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

:root {
    --accent: #64ffda;
    --muted: #1f2531;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    position: relative;
}

.logo-image {
    border-radius: 10%;
    width: 40px;
    height: 40px;
    scale: 1;
}

.news-item {
    background: #12161f;
    border: 1px solid #1f2531;
    border-radius: 14px;
    margin: 10px 0;
    width: 100%;
    max-width: 920px;
    overflow: hidden;
    transition: transform 0.3s, background-color 0.2s, box-shadow 0.3s;
    box-shadow: 0 14px 40px rgba(0,0,0,0.35);
    display: grid;
    grid-template-columns: clamp(220px, 32vw, 360px) 1fr;
    align-items: stretch;
    min-height: 260px;
    position: relative;
}

.news-item:hover {
    background-color: #141a24;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(-4px);
}

.news-item i {
    transition: filter 0.3s;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px 0 0 14px;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image { transform: scale(1.04); }

.news-content {
    padding: 18px 20px;
    color: #ccd2dc;
}

.news-content h2 {
    font-family: 'MuseoModerno';
    font-weight: 600;
    letter-spacing: 0.3px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    font-size: 12px;
    color: #a6aab3;
    border: 1px solid var(--muted);
    background: #0f141c;
    padding: 4px 10px;
    border-radius: 999px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.news-item:hover .chip {
    border-color: #2a3242;
    background: #121822;
    color: #cfd6e2;
}

.news-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #9bb8c6;
    text-decoration: none;
    font-weight: 500;
}

.news-action::after {
    content: "→";
    transition: transform 0.2s ease;
}

.news-item:hover .news-action::after {
    transform: translateX(4px);
}

.news-content h2, .news-content h3 {
    margin: 0;
    padding: 5px 0;
}

/* about card overrides */
.about-card {
    display: block;
}
.about-card::before { display: none; }
.about-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px;
}

/* Повышаем специфичность, чтобы перекрыть правило `.news-content h2` */
.news-content .about-title {
    font-family: 'Montserrat', sans-serif;
}

.news-content ul {
    padding-left: 20px;
}

.news-version {
    font-size: 0.8em;
    color: #aaa;
    padding: 5px;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px;
    max-width: 920px;
    margin: 0 auto;
}

/* Расплющиваем вложенные контейнеры в разметке */
.news-container .news-container {
    display: contents;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

footer {
    width: 100%;
    color: white;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    bottom: 20px;
    left: 0;
    right: 0;
    margin-top: auto;
}

footer p {
    margin: 0;
}

a { color: inherit; }

/* Стили для сайдбара */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background: #0e131a;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar a {
    font-family: 'MuseoModerno';
    margin: 0;
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #a6aab3;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: #f1f1f1;
}

.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

.openbtn {
    font-size: 20px;
    cursor: pointer;
    background-color: #111;
    color: white;
    padding: 10px 15px;
    border: none;
    position: absolute;
    top: 10px;
    left: 10px;
}

.openbtn:hover {
    background-color: #444;
}

#main {
    transition: margin-left .5s;
    padding: 16px;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 5px;
    }

    .news-container {
        padding: 10px;
    }

    .news-item {
        width: 100%;
        margin: 10px 0;
        /* Стек сверху вниз: картинка → текст */
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: unset;
    }

    .news-content {
        padding: 10px;
    }

    .news-image {
        height: auto;
        border-radius: 14px 14px 0 0;
    }

    #social-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        line-height: 50px;
    }

    .sidebar {padding-top: 15px;}
    .sidebar a {font-size: 18px;}
}