/*
Theme Name: Novinka
Description: Быстрая, адаптивная WordPress тема с современным дизайном.
Version: 1.1
Author: Gemini
Text Domain: novinka
*/

/* --- Переменные и сброс стилей --- */
:root {
    --main-bg-color: #f0f4f7;
    --content-bg-color: #ffffff;
    --dark-color: #1a1e26;
    --accent-color: #007bff; /* Измененный акцентный цвет */
    --text-color: #444444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--main-bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Шапка (Header) --- */
.header {
    background: var(--dark-color);
    padding: 25px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent-color);
}

.site-branding {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-branding-text {
    text-align: left;
}

.site-title {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

.site-title a {
    color: #fff;
}

.site-description {
    font-style: italic;
    color: #a9a9a9;
    font-size: 1em;
    margin: 0;
}

.top-menu {
    position: relative;
    z-index: 10;
}

.top-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.top-menu-list a {
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.top-menu-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* --- Анимация частиц в шапке и подвале --- */
.header-particles-container, .footer-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

[class*="particle-"] {
    position: absolute;
    background-color: rgba(0, 123, 255, 0.2); /* Измененный акцентный цвет с прозрачностью */
    border-radius: 50%;
    animation: particle-float 15s infinite ease-in-out;
}

.particle-1 { width: 10px; height: 10px; top: 10%; left: 5%; animation-delay: 0s; }
.particle-2 { width: 15px; height: 15px; top: 50%; left: 20%; animation-delay: 2s; }
.particle-3 { width: 8px; height: 8px; top: 80%; left: 45%; animation-delay: 4s; }
.particle-4 { width: 12px; height: 12px; top: 30%; left: 70%; animation-delay: 6s; }
.particle-5 { width: 18px; height: 18px; top: 60%; left: 85%; animation-delay: 8s; }
.particle-6 { width: 9px; height: 9px; top: 20%; left: 90%; animation-delay: 10s; }

@keyframes particle-float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.4; }
    100% { transform: translateY(0) rotate(360deg); opacity: 0.8; }
}

/* --- Основной контент и сайдбар --- */
.main-content {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 0;
}

.content-area {
    flex-grow: 1;
}

.sidebar {
    width: 300px;
    background: var(--content-bg-color);
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- Карточки постов --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.post-card {
    background: var(--content-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.post-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.placeholder-image {
    background: linear-gradient(135deg, var(--dark-color), #333333);
    height: 100%;
}

.date-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 4px;
    font-weight: bold;
}

.post-content-wrap {
    padding: 20px;
}

.post-title {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 10px;
}

.post-excerpt {
    font-size: 1em;
}

/* --- Одиночный пост/страница --- */
.single-post {
    background: var(--content-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.single-post h1 {
    font-size: 2.5em;
    margin-bottom: 25px;
}

.single-post-image {
    height: auto;
    margin-bottom: 25px;
}

.single-post-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.single-post-content-wrap {
    padding: 0 20px;
}

.post-content {
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--main-bg-color);
}

.nav-previous, .nav-next {
    max-width: 45%;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    background: var(--main-bg-color);
    border-radius: 50px;
    text-align: center;
    color: var(--dark-color);
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
}

/* --- Виджеты сайдбара --- */
.widget {
    margin-bottom: 25px;
}

.widget h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 18px;
    font-size: 1.3em;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    margin-bottom: 8px;
}

.widget ul li a {
    display: block;
    padding: 10px 15px;
    background: var(--main-bg-color);
    border-radius: 5px;
    transition: background-color 0.3s ease;
    color: var(--dark-color); /* Улучшенная читаемость */
}

.widget ul li a:hover {
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
}

/* --- Пагинация (Pagination) --- */
.novinka-pagination {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.novinka-pagination .page-numbers {
    padding: 12px 18px;
    border: 2px solid var(--accent-color);
    color: var(--dark-color);
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.novinka-pagination .page-numbers:hover {
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
}

.novinka-pagination .page-numbers.current, .novinka-pagination .page-numbers.current:hover {
    background-color: var(--dark-color);
    color: #fff;
    border-color: var(--dark-color);
}

/* --- Подвал (Footer) --- */
.footer {
    background: var(--dark-color);
    color: #fff;
    padding: 30px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

.footer-content {
    position: relative;
    z-index: 10;
}

.footer a {
    color: var(--accent-color);
}

.footer-info {
    font-size: 0.9em;
}

.footer-description {
    font-size: 0.8em;
    color: #a9a9a9;
    margin: 5px 0 0;
}

/* --- Адаптивность (Responsive) --- */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    .content-area { order: 2; }
    .sidebar {
        width: 100%;
        order: 1;
        position: static;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .site-branding {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .site-title {
        font-size: 1.8em;
    }
    .top-menu-list {
        flex-wrap: wrap;
        justify-content: center;
    }
}