:root {
    --bg-dark: #0a0e17;
    --panel-bg: rgba(16, 22, 35, 0.9);
    --accent-it: #00d2ff;
    --accent-car: #ff3c00;
    --text-main: #e0e6ed;
    --text-muted: #8899a6;
    --shadow-it: 0 0 20px rgba(0, 210, 255, 0.3);
    --shadow-car: 0 0 20px rgba(255, 60, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Стили для новостей на главной странице */
.news-home-section {
    margin-bottom: 40px;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
}

.news-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.news-header h1 .it {
    color: var(--accent-it);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.news-header p {
    font-size: 16px;
    color: var(--text-muted);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Динамическое количество колонок для главной страницы */
.news-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.news-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.news-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.news-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.news-card {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-it);
    border-color: var(--accent-it);
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-title a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.news-title a:hover {
    color: var(--accent-it);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Badge styling for news meta */
.news-meta-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: monospace;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    border-top-left-radius: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.news-meta-badge .news-date,
.news-meta-badge .news-views {
    color: #9ca3af;
    font-size: 0.7rem;
}

.news-meta-badge .news-views i {
    margin-right: 2px;
}

/* Адаптивность для новостей на главной */
@media (max-width: 768px) {
    /* На мобильных всегда 1 колонка */
    .news-grid,
    .news-grid[data-columns="1"],
    .news-grid[data-columns="2"],
    .news-grid[data-columns="3"],
    .news-grid[data-columns="4"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-header h1 {
        font-size: 28px;
    }

    .news-header p {
        font-size: 14px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    /* На планшетах максимум 2 колонки */
    .news-grid[data-columns="3"],
    .news-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}
