/*
Theme Name: Correspondent Media
Theme URI: https://correspondent.net.ua/
Author: Custom News Theme Studio
Description: Преміальний швидкий новинний шаблон у стилі PSM7 для порталу correspondent.net.ua.
Version: 1.0.5
Text Domain: correspondent
*/

:root {
    --primary-color: #0c4a60; /* Глибокий синій відтінок для бренду */
    --accent-color: #e63946;  /* Червоний маркер для топ-новин */
    --text-main: #1f2937;     /* Зручний для читання темний текст */
    --text-muted: #6b7280;    /* Сірий для дат та авторів */
    --bg-site: #f3f4f6;       /* Легкий фон за межами карток */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-site);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ШАПКА САЙТУ ТА ВПОРЯДКУВАННЯ МЕНЮ */
.site-header {
    background: #ffffff;
    border-bottom: 2px solid var(--primary-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (min-width: 768px) {
    .header-wrap {
        flex-direction: row;
        justify-content: space-between;
    }
}

.logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    text-align: center;
}

.logo span {
    color: var(--accent-color);
}

/* АДАПТИВНЕ МЕНЮ (Горизонтальний скролл на мобільних, як у PSM) */
.main-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.main-nav::-webkit-scrollbar {
    display: none; /* Ховаємо некрасивий скроллбар */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    display: flex;
    gap: 15px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .main-nav {
        width: auto;
        overflow: visible;
    }
    .main-nav ul {
        gap: 20px;
        font-size: 15px;
    }
}

/* ДВОКОЛОНКОВА СІТКА НОВИН */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .news-grid {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
    }
}

/* СТРІЧКА НОВИН ТА СТАТТІ */
.news-feed-block {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .news-feed-block {
        padding: 25px;
    }
}

.block-title {
    font-size: 18px;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.feed-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: flex-start;
}

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

.feed-time {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.feed-content h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .feed-content h3 {
        font-size: 16px;
    }
}

.feed-thumb {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ОПТИМІЗАЦІЯ ВНУТРІШНЬОГО КОНТЕНТУ СТАТТІ */
.post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px;
    margin: 15px 0;
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 16px;
    line-height: 1.6;
}

/* БОКОВА ПАНЕЛЬ */
.sidebar-block {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* ПІДВАЛ */
.site-footer {
    background: #111827;
    color: #ffffff;
    padding: 30px 0;
    margin-top: 50px;
    font-size: 14px;
}

.footer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

@media (min-width: 768px) {
    .footer-wrap {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}