/*
Theme Name: Sport Vestnik
Theme URI: https://sport-vestnik.ru/
Author: Sport Vestnik Team
Author URI: https://sport-vestnik.ru/
Description: Легкий и быстрый шаблон для спортивного новостного сайта с правым сайдбаром и похожими постами
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sport-vestnik
Tags: news, sports, sidebar, responsive, lightweight
*/

/* ========================================
   CSS Variables
======================================== */
:root {
    --primary-color: #17543E;
    --primary-hover: #0d3829;
    --accent-color: #D6A944;
    --text-color: #333333;
    --text-light: #656565;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e5e5e5;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 6px;
    --transition: 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition);
}

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

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

ul, ol {
    list-style: none;
}

/* ========================================
   Layout
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ========================================
   Header
======================================== */
.site-header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.site-logo img {
    max-width: 200px;
    height: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-title a {
    color: inherit;
}

.site-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Header Bar */
.header-bar {
    background: var(--text-color);
    height: 45px;
}

/* Search */
.header-search {
    position: relative;
}

.search-form {
    display: flex;
}

.search-field {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.9rem;
    width: 200px;
    outline: none;
}

.search-field:focus {
    border-color: var(--primary-color);
}

.search-submit {
    padding: 8px 15px;
    background: var(--primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: background var(--transition);
}

.search-submit:hover {
    background: var(--primary-hover);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: var(--radius);
}

/* ========================================
   Posts Grid
======================================== */
.posts-grid {
    display: grid;
    gap: 25px;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.post-card-inner {
    display: flex;
    gap: 20px;
}

.post-thumbnail {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
}

.post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.post-category:hover {
    background: var(--accent-color);
    color: #fff;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    flex: 1;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   Single Post
======================================== */
.single-post-article {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.single-thumbnail {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.single-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-content {
    padding: 30px;
}

.single-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.single-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-color);
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entry-content {
    font-size: 1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 1.5em 0 0.75em;
    color: var(--text-color);
}

.entry-content ul,
.entry-content ol {
    margin: 1em 0 1.5em 2em;
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content blockquote {
    margin: 1.5em 0;
    padding: 20px 25px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
}

.entry-content img {
    border-radius: var(--radius);
    margin: 1.5em 0;
}

/* Post Tags */
.post-tags {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags span {
    font-weight: 600;
    margin-right: 10px;
}

.post-tags a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg-light);
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin: 5px 5px 5px 0;
    transition: background var(--transition);
}

.post-tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ========================================
   Ad Banners
======================================== */
.ad-banner-top {
    background: var(--bg-color);
    padding: 15px 0;
    text-align: center;
}

.widget-ad {
    text-align: center;
    margin-bottom: 25px;
    overflow: hidden;
}

.widget-ad img,
.widget-ad iframe,
.widget-ad > div {
    max-width: 100%;
    height: auto;
}

.ad-banner-article {
    text-align: center;
    margin: 20px 0;
}

/* ========================================
   Related Posts
======================================== */
.related-posts {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.related-posts-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

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

.related-item {
    background: var(--bg-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition);
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-thumbnail {
    height: 140px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.related-item:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-info {
    padding: 15px;
}

.related-info h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.related-info h4 a {
    color: var(--text-color);
}

.related-info h4 a:hover {
    color: var(--primary-color);
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ========================================
   Sidebar
======================================== */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar img {
    max-width: 100%;
    height: auto;
}

.widget {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-color);
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-color);
    font-size: 0.9rem;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

/* Popular Posts Widget */
.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0 !important;
}

.popular-post-thumb {
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

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

.popular-post-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 5px;
}

.popular-post-info h4 a {
    color: var(--text-color);
}

.popular-post-info h4 a:hover {
    color: var(--primary-color);
}

.popular-post-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--text-color);
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-column:empty {
    display: none;
}

.footer-widget .widget-title {
    color: #fff;
    border-bottom-color: var(--accent-color);
}

.site-footer .widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.footer-widget ul li a {
    color: #ccc;
}

.footer-widget ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 0.85rem;
}

.copyright {
    color: #999;
}

.footer-nav ul {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #ccc;
}

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

/* ========================================
   Pagination
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: var(--bg-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: #fff;
}

.pagination .dots {
    background: none;
    padding: 10px 5px;
}

/* ========================================
   Comments
======================================== */
.comments-area {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-list {
    margin-bottom: 30px;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.comment-content {
    margin-top: 10px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition);
}

.comment-form .submit:hover {
    background: var(--primary-hover);
}

/* ========================================
   Page
======================================== */
.page-article {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* Archive */
.archive-header {
    background: var(--bg-color);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.archive-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.archive-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   404 Page
======================================== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-404 p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 992px) {
    .site-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .main-nav.active ul {
        display: flex;
    }

    .main-nav .sub-menu {
        position: static;
        display: none;
        padding-left: 20px;
    }

    .main-nav li:hover > .sub-menu {
        display: flex;
    }

    .post-card-inner {
        flex-direction: column;
    }

    .post-thumbnail {
        width: 100%;
        height: 200px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

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

    .related-grid {
        grid-template-columns: 1fr;
    }

    .single-title {
        font-size: 1.5rem;
    }

    .search-field {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .single-content {
        padding: 20px;
    }

    .widget {
        padding: 15px;
    }

    .post-meta {
        flex-wrap: wrap;
    }
}
