/*
Theme Name: AutoBase Eco
Theme URI: https://ваш-сайт.ru
Author: Ваше имя
Author URI: https://ваш-сайт
Description: Приземистый автомобильный дизайн с премиальной читаемостью. Спокойные тона, идеально для автопортала.
Version: 1.0.0
License: GPL v2 or later
Text Domain: autobase
*/

/* ===== СБРОС И ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #e5e9f0;
    color: #1c2a3a;
    line-height: 1.5;
}

.wrapper {
    max-width: 1440px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 32px 32px 0 0;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 10, 20, 0.15);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== ШАПКА — ПРИЗЕМИСТАЯ, МОЩНАЯ ===== */
.header {
    background: #11181f;
    color: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #2a3743;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.4rem;
    color: #d4e6f5;
    opacity: 0.9;
}

.site-title h1 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f0f6fc;
}

.site-title p {
    font-size: 0.85rem;
    color: #a0b8cc;
    margin-top: 2px;
}

.header-contacts {
    background: #1f2d39;
    padding: 8px 20px;
    border-radius: 60px;
    font-size: 0.95rem;
    color: #d3e1f0;
    display: flex;
    gap: 24px;
}

.header-contacts i {
    color: #78a5c7;
    margin-right: 6px;
}

/* ===== ВЕРХНЕЕ МЕНЮ ===== */
.top-menu {
    background: #16222b;
    border-bottom: 1px solid #26333e;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-menu ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.top-menu a {
    display: block;
    padding: 14px 22px;
    color: #e5eff9;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.top-menu a:hover,
.top-menu .current-menu-item a {
    background-color: #253542;
    border-bottom-color: #78a5c7;
    color: white;
}

.top-menu a i {
    margin-right: 8px;
    color: #78a5c7;
}

/* ===== ОСНОВНОЙ ГРИД ===== */
.main-grid {
    display: flex;
    gap: 40px;
    padding: 40px 24px;
}

.content {
    flex: 3;
    min-width: 0;
}

/* ===== САЙДБАР ===== */
.sidebar {
    flex: 1.2;
    background: #f3f7fb;
    border-radius: 28px;
    padding: 28px 22px;
    border: 1px solid #dbe4ed;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 8px 18px rgba(0,20,40,0.06);
}

.sidebar-widget {
    margin-bottom: 38px;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 3px solid #78a5c7;
    display: inline-block;
    color: #15232e;
    letter-spacing: -0.3px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: white;
    color: #1f2f3c;
    text-decoration: none;
    font-weight: 500;
    border-radius: 16px;
    border: 1px solid #d2dfec;
    transition: 0.16s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.sidebar-menu a:hover {
    background: #d7e5f3;
    border-color: #8fb7d9;
    transform: translateX(6px);
    color: #0a1a26;
}

.sidebar-menu a i {
    font-size: 1.2rem;
    width: 26px;
    color: #4b6f8c;
}

/* ===== БЛОК НОВОСТЕЙ ===== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-left: 16px;
    border-left: 6px solid #78a5c7;
    color: #0e1d2b;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.news-card {
    background: white;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 20, 40, 0.08);
    transition: all 0.2s;
    border: 1px solid #e2eaf2;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(45, 90, 120, 0.15);
    border-color: #b5cfec;
}

.news-img {
    height: 300px; /* Увеличили высоту с 180px до 300px */
    background-size: cover;
    background-position: center 20%; /* Фокус на 20% от верха (там где текст) */
    background-repeat: no-repeat;
    position: relative;
    background-color: #2b404e;
}

.news-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #2c4a63;
    color: white;
    padding: 5px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    backdrop-filter: blur(2px);
    z-index: 2;
}

/* Новый класс для тега внизу справа */
.news-tag-bottom {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: auto;
    background: #78a5c7;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.news-content {
    padding: 22px 20px;
}

.news-meta {
    display: flex;
    gap: 18px;
    color: #496277;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.news-meta i {
    color: #4f7896;
    margin-right: 5px;
}

.news-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #0f232f;
}

.news-content p {
    color: #2d4053;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.read-more {
    color: #2b5d83;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid transparent;
    transition: 0.2s;
}

.read-more:hover {
    color: #113247;
    gap: 12px;
    border-bottom-color: #2b5d83;
}

/* ===== ПОПУЛЯРНЫЕ МАТЕРИАЛЫ ===== */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.popular-item {
    background: #eaf1f9;
    border-radius: 24px;
    padding: 28px 20px;
    text-align: center;
    transition: 0.2s;
    border: 1px solid #cbdae7;
}

.popular-item:hover {
    background: #cfe1f2;
    border-color: #7d9eb9;
}

.popular-item i {
    font-size: 2.6rem;
    color: #345c79;
    margin-bottom: 15px;
}

.popular-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #142d3d;
}

.popular-desc {
    font-size: 0.9rem;
    color: #2d4b61;
}

/* ===== ВАЖНАЯ ИНФОРМАЦИЯ ===== */
.important-info {
    background: #142f40;
    color: white;
    padding: 32px 36px;
    border-radius: 32px;
    margin: 50px 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 30px -8px rgba(10, 45, 65, 0.5);
    border-left: 8px solid #78a5c7;
}

.important-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
    text-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.important-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #e1f0fc;
}

.important-badge {
    background: #213b4b;
    padding: 12px 40px;
    border-radius: 60px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #e3f0fa;
    border: 2px solid #78a5c7;
    box-shadow: 0 8px 0 #0c212d;
    transform: translateY(-3px);
}

/* ===== НИЖНЕЕ МЕНЮ ===== */
.bottom-menu {
    background: #1e2d39;
    padding: 20px 0;
    border-top: 1px solid #314553;
    border-bottom: 1px solid #0d1e2a;
}

.bottom-menu .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 45px;
}

.bottom-menu a {
    color: #cbddee;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.bottom-menu a:hover {
    color: white;
    border-bottom-color: #78a5c7;
}

/* ===== ФУТЕР ===== */
.footer {
    background: #0b1b26;
    color: #9cb3c9;
    padding: 30px 0;
    font-size: 0.95rem;
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright i {
    color: #78a5c7;
    margin: 0 4px;
}

.footer-social a {
    color: #aac2d9;
    font-size: 1.5rem;
    margin-left: 22px;
    transition: 0.2s;
    text-decoration: none;
}

.footer-social a:hover {
    color: #dbeefe;
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 900px) {
    .main-grid { flex-direction: column; }
    .popular-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .popular-grid { grid-template-columns: 1fr; }
    .header .container { flex-direction: column; gap: 12px; }
    .important-info { flex-direction: column; text-align: center; }
}

/* Кнопка "Наверх" */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #78a5c7;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 15px rgba(120, 165, 199, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
}

#scrollTopBtn:hover {
    background: #5f8ab0;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(120, 165, 199, 0.6);
}

#scrollTopBtn i {
    line-height: 50px;
}

/* Для мобильных */
@media (max-width: 768px) {
    #scrollTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    #scrollTopBtn i {
        line-height: 45px;
    }
}