/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #111;
    line-height: 1.5;
    font-size: 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ШАПКА ===== */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-img { height: 60px; width: auto; display: block; }

.header-inner { align-items: center; padding: 4px 0; }

.logo { flex-shrink: 0; }

.footer .logo-img { display: none; }

.banner-ad {
    width: 100%; height: 250px; background: #e8e8e8;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #777; text-align: center; border-radius: 4px;
    border: 2px dashed #bbb; gap: 6px;
}
.banner-ad p { font-size: 14px; margin: 0; }
.banner-ad strong { font-size: 18px; color: #555; }

.logo-text {
    font-size: 28px;
    font-weight: 900;
    color: #111;
    letter-spacing: -1px;
}

.logo-accent {
    color: #d62828;
}

.main-nav {
    display: flex;
    gap: 28px;
    flex: 1;
    justify-content: center;
}

.main-nav a {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.main-nav a:hover {
    border-bottom-color: #d62828;
    color: #d62828;
}

.search-icon {
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.search-icon:hover {
    opacity: 1;
}

/* ===== ПОДШАПКА / ТЕГИ ===== */
.subheader {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tags-wrapper {
    display: flex;
    gap: 0;
    white-space: nowrap;
    align-items: center;
    justify-content: space-between;
}

.tags-wrapper a {
    font-size: 13px;
    color: #555;
    padding: 4px 16px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
    flex: 1;
    text-align: center;
}

.tags-wrapper a:hover {
    background: #d62828;
    color: #fff;
}

/* ===== СЛАЙДЕР ===== */
.hero-slider {
    background: #fff;
    padding: 20px 0;
}

.slider-inner {
    position: relative;
}

.slider-slides {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 40%, transparent);
    color: #fff;
}

.slide-overlay h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    max-width: 600px;
}

.slide-overlay p {
    font-size: 14px;
    opacity: 0.85;
    max-width: 550px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 56px;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: #fff;
}

.slider-btn.prev { left: 0; border-radius: 0 4px 4px 0; }
.slider-btn.next { right: 0; border-radius: 4px 0 0 4px; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active {
    background: #d62828;
}

/* ===== МИНИ-КАРТОЧКИ ===== */
.mini-cards {
    background: #fff;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.mini-card {
    display: block;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.mini-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s;
}

.mini-card:hover img {
    transform: scale(1.04);
}

.mini-card span {
    display: block;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}

.mini-card.promo span {
    color: #d62828;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.content {
    min-width: 0;
}

/* ===== СЕКЦИИ ===== */
.section-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d62828;
    display: inline-block;
}

/* ===== НОВОСТИ ===== */
.news-block {
    margin-bottom: 30px;
}

.news-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-thumb {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    overflow: hidden;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-thumb img {
    transform: scale(1.05);
}

.news-text {
    padding: 10px 12px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-text h3 {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    line-height: 1.35;
    margin-bottom: 4px;
}

.news-text p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.all-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #d62828;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.all-link:hover {
    text-decoration: underline;
}

/* ===== БОЛЬШИЕ СТАТЬИ ===== */
.big-articles {
    margin-bottom: 30px;
}

.big-article {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.big-article:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.big-img {
    display: block;
}

.big-img img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.big-text {
    padding: 16px 18px;
}

.big-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
    margin-bottom: 6px;
}

.big-text p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* ===== ТЕСТЫ ===== */
.tests-block {
    margin-bottom: 20px;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.test-card {
    display: block;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.test-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.test-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.test-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    padding: 10px 12px 2px;
}

.test-card p {
    font-size: 13px;
    color: #444;
    padding: 2px 12px 12px;
    line-height: 1.4;
}

/* ===== САЙДБАР ===== */
.sidebar {
    min-width: 0;
}

.widget {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d62828;
}

/* Интервью */
.interview-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.interview-item:last-child {
    border-bottom: none;
}

.interview-item strong {
    display: block;
    font-size: 14px;
    color: #111;
    margin-bottom: 2px;
}

.interview-role {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.interview-item p {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

/* Популярное */
.popular-item {
    display: block;
    font-size: 13px;
    color: #333;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
    transition: color 0.2s;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    color: #d62828;
}

/* Баннер */
.banner-box {
    width: 100%;
    height: 250px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
}

/* ===== ЖУРНАЛЫ ===== */
.magazines {
    background: #fff;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.magazine-covers {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.magazine-covers a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.magazine-covers a:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.magazine-covers img {
    width: 175px;
    height: 230px;
    object-fit: cover;
}

/* ===== ПОДВАЛ ===== */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 30px 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.footer .logo-text {
    color: #fff;
    font-size: 24px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    font-size: 13px;
    color: #aaa;
    transition: color 0.2s;
}

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

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 20px;
}

.footer-nav a {
    font-size: 13px;
    color: #aaa;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-search {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
}

.footer-search button {
    padding: 8px 12px;
    background: #d62828;
    border: none;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding-top: 16px;
    border-top: 1px solid #333;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 980px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .main-nav {
        display: none;
    }
    .mini-grid {
        grid-template-columns: 1fr;
    }
    .news-list {
        grid-template-columns: 1fr;
    }
    .test-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .slide img {
        height: 240px;
    }
    .big-img img {
        height: 220px;
    }
    .slide-overlay h2 {
        font-size: 16px;
    }
    .footer-top {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    .news-item {
        flex-direction: column;
    }
    .news-thumb {
        width: 100%;
        height: 160px;
    }
}
