/* --- 1. БАЗОВЫЕ НАСТРОЙКИ --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
 --bg-color: #ffffff;
 --text-main: #292929;
 --text-grey: #999;
 --accent: #c33; /* Красный цвет Ленты */
 --header-bg: #292929;
}

body {
 background: var(--bg-color);
 color: var(--text-main);
 font-family: 'Roboto', sans-serif;
 margin: 0; padding: 0;
 line-height: 1.2;
 overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--accent); }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }
button { border: none; background: none; cursor: pointer; padding: 0; }

/* --- 2. ШАПКА --- */
.header {
 background: var(--header-bg);
 height: 50px; /* Узкая шапка как на скрине */
 color: #fff;
 position: sticky; top: 0; z-index: 100;
}
.header__inner {
 max-width: 1280px; margin: 0 auto; padding: 0 20px;
 display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.header__left { display: flex; align-items: center; gap: 15px; }

/* Кнопка Меню (Две полоски) */
.burger-btn {
 width: 24px; height: 14px; position: relative;
 border-top: 2px solid #fff;
 border-bottom: 2px solid #fff;
 transition: 0.3s;
}
.burger-btn:hover { border-color: #ccc; }

.logo { width: 120px; display: block; color: #fff; line-height: 0; }
.logo svg { fill: currentColor; width: 100%; }

.header__right { font-size: 13px; color: #ccc; display: flex; gap: 15px; align-items: center; }
.header__right a:hover { color: #fff; }

/* ТУМБЛЕР "Лента добра" (Визуализация) */
.toggle-wrap { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.toggle-bg { width: 30px; height: 16px; background: #555; border-radius: 10px; position: relative; }
.toggle-circle { width: 12px; height: 12px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; }

/* --- 3. ВЫЕЗЖАЮЩЕЕ МЕНЮ (OFF-CANVAS) --- */
.offcanvas-overlay {
 position: fixed; top: 0; left: 0; width: 100%; height: 100%;
 background: rgba(0,0,0,0.5); z-index: 101;
 opacity: 0; visibility: hidden; transition: 0.3s;
}
.offcanvas-overlay.active { opacity: 1; visibility: visible; }

.offcanvas-menu {
 position: fixed; top: 0; left: -320px; width: 300px; height: 100%;
 background: #292929; z-index: 102;
 transition: 0.3s ease;
 padding: 20px; box-sizing: border-box;
 overflow-y: auto;
}
.offcanvas-menu.active { left: 0; }

.menu-list a {
 display: block; color: #ccc; font-size: 16px; padding: 10px 0;
 border-bottom: 1px solid #333; font-weight: 500;
}
.menu-list a:hover { color: #fff; padding-left: 5px; }
.menu-list a.active { color: #fff; font-weight: 700; }
.menu-close {
 color: #fff; font-size: 24px; position: absolute; top: 10px; right: 15px;
}

/* --- 4. РЕКЛАМА (БАННЕРЫ) --- */
.ad-container { max-width: 1280px; margin: 20px auto; padding: 0 20px; }
.ad-top-banner {
 width: 100%; height: 250px; /* Высота как у Сбера */
 background-color: #1a1a1a;
 background-image: url('https://via.placeholder.com/1200x250/111/333?text=РЕКЛАМА+СБЕР+ПРИМЕР'); /* Заглушка */
 background-size: cover; background-position: center;
 border-radius: 4px; position: relative;
 display: flex; align-items: center; justify-content: center;
}
.ad-sidebar-banner {
 width: 100%; height: 400px; background: #f0f0f0; margin-top: 20px;
 display: flex; align-items: center; justify-content: center; color: #999;
}

/* --- 5. ОСНОВНАЯ СЕТКА (4 КОЛОНКИ) --- */
.main-wrapper {
 max-width: 1280px; margin: 0 auto; padding: 0 20px;
 display: grid;
 /* 4 колонки: Широкая | Средняя | Средняя | Сайдбар */
 grid-template-columns: 2.8fr 1.8fr 1.8fr 300px;
 gap: 25px;
 margin-bottom: 50px;
}

/* Стили карточек */
.card-big img { width: 100%; border-radius: 4px; margin-bottom: 10px; }
.card-big h2 { font-size: 24px; font-weight: 900; line-height: 1.1; margin-bottom: 8px; }
.card-big h2:hover { color: var(--accent); cursor: pointer; }
.time { font-size: 11px; color: #999; margin-top: 5px; }

.card-mini { padding: 12px 0; border-bottom: 1px solid #eaeaea; }
.card-mini h3 { font-size: 15px; font-weight: 400; line-height: 1.3; }
.card-mini h3:hover { color: var(--accent); cursor: pointer; }

/* --- 6. САЙДБАР И ТАБЫ --- */
.sidebar-tabs {
 display: flex; gap: 20px; border-bottom: 1px solid #ddd; margin-bottom: 15px;
}
.tab-btn {
 font-size: 16px; font-weight: 700; color: #999; padding-bottom: 10px;
 cursor: pointer; position: relative;
}
.tab-btn.active { color: #000; }
.tab-btn.active::after {
 content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: #000;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.sidebar-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; }
.sidebar-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 2px; }
.sidebar-item h4 { font-size: 13px; font-weight: 500; line-height: 1.3; }
.sidebar-item:hover h4 { color: var(--accent); }

/* --- 7. АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ --- */
@media (max-width: 1024px) {
 .main-wrapper { grid-template-columns: 1fr; } /* Одна колонка на телефоне */
 .ad-top-banner { height: 100px; } /* Меньше баннер */
 .sidebar { display: none; } /* Можно скрыть или перенести вниз */
 .header__right { display: none; }
}