/*
Theme Name: Days From Blog
Author: Days From Date
Author URI: https://www.daysfromdate.com
Description: A clean and refreshing blog theme with a calm blue palette and a simple, elegant header design.
Version: 1.0.3
Requires at least: 5.9
Tested up to: 7.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: days-from-blog
Tags: blog, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

:root {
    --primary-color: #125c88;
    --secondary-color: #5a7689;
    --accent-color: #3c8dbc;
    --background-color: #f5f8fa;
    --nav-hover-color: #e3eef7;
    --border-color: #e2e8f0;
    --muted-color: #94a3b8;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --danger-color: #e53e3e;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #125c88;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link: hidden until keyboard focus, then jumps to main content (#content) */
.skip-link {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.skip-link:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #125c88;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #7f3300;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ---------- Header ---------- */
.site-header {
    background-color: #B16B4A;;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
	width: 100%;
	position: fixed;
    z-index: 100;
   
}

.header-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    padding: 0.9rem 0;
}

.site-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.site-description {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.site-nav {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.6rem 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.main-navigation a {
    display: inline-flex;
    align-items: center;
    color: #1d2327;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background-color: var(--nav-hover-color);
    color: var(--primary-color);
}

.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .menu-item-has-children > a {
    padding-right: 1.7rem;
    position: relative;
}

.main-navigation .menu-item-has-children > a::after {
    content: '\25BE';
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--muted-color);
    transition: transform 0.2s ease;
}

.main-navigation .menu-item-has-children:hover > a::after,
.main-navigation .menu-item-has-children:focus-within > a::after {
    transform: translateY(-50%) rotate(180deg);
}

.main-navigation a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: ;
    border: ;
    border-radius: 8px;
    box-shadow: var(--hover-shadow);
    min-width: 180px;
    padding: 0.4rem 0;
    z-index: 1000;
}

.main-navigation .sub-menu .sub-menu {
    top: -0.4rem;
    left: 100%;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children.open > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0;
    font-size: 0.9rem;
}

/* ---------- Hamburger Menu Button ---------- */
.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
}

.menu-toggle:hover {
    background-color: var(--nav-hover-color);
    border-color: var(--accent-color);
}

.menu-toggle-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 2px;
    background-color: currentColor;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.2s ease;
}

.menu-toggle-icon::before {
    top: -6px;
}

.menu-toggle-icon::after {
    top: 6px;
}

.is-open .menu-toggle-icon {
    background-color: transparent;
}

.is-open .menu-toggle-icon::before {
    transform: translateY(6px) rotate(45deg);
}

.is-open .menu-toggle-icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Main Content Area ---------- */
.site-content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 20px 2rem;
    flex: 1;
}

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

.site-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
	margin-top: 5rem;
}

.site-layout.has-sidebar .content-area {
    flex: 1 1 auto;
}

.site-layout.has-sidebar .widget-area {
    flex: 0 0 300px;
}

@media (max-width: 992px) {
    .site-layout {
        flex-direction: column;
        align-items: stretch; /* КЛЮЧЕВОЕ ИСПРАВЛЕНИЕ: заставляет элементы растягиваться на всю ширину */
    }
    
    .site-layout.has-sidebar .content-area,
    .site-layout.has-sidebar .widget-area {
        width: 100%;
        flex: none; /* Убираем жесткие размеры flex, чтобы ширина работала корректно */
    }

    .widget-area {
        position: static; /* Отключаем sticky на мобильных, чтобы не было наложений */
        margin-top: 20px; /* Добавляем отступ сверху от основного контента */
    }
}

/* ---------- Cards ---------- */
.card {
    background: #ffffff;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.card h1, .card h2 {
    color: #aa5533;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #aa5533;
}

/* ---------- Article List ---------- */
.article-list-title {
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.article-item .entry-thumbnail {
    flex: 0 0 230px;
    margin: 0;
}

.article-item .entry-thumbnail a {
    display: block;
}

.article-item .entry-thumbnail img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-item-content {
    flex: 1 1 auto;
    min-width: 0;
}

.article-item .entry-title {
    margin: 0 0 0.6rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-item .entry-title a {
    color: #aa5533;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-item .entry-title a:hover {
    color: #df9578;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.article-meta a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.article-excerpt {
    color: #7b4307;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 0.925rem;
}

.article-excerpt p {
    margin: 0;
}

.read-more {
    color: #aa5533;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #df9578;
}

.entry-thumbnail {
    margin-bottom: 1rem;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ---------- Article Detail ---------- */
.article-header {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    
	
}

.article-title {
    color: #aa5533;
    font-size: 1.75rem;
    line-height: 1.35;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-meta-single {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eaeff5;
}

.article-meta-single a {
    color: var(--secondary-color);
    text-decoration: none;
}

.article-meta-single a:hover {
    color: var(--accent-color);
}

.article-body {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.article-body h2 {
    color: var(--primary-color);
    margin: 1.75rem 0 1rem;
    padding-bottom: 0.5rem;
    font-size: 1.45rem;
    font-weight: 600;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent-color);
}

.article-body h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    position: relative;
    padding-left: 10px;
}

.article-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -0.5em;
    width: 3px;
    height: 65%;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.article-body p {
    margin: 0 0 1rem 0;
    line-height: 1.65;
    color: #7b4307;
    font-size: 0.95rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--accent-color);
    background: var(--background-color);
    border-radius: 6px;
    color: #4a5568;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-body a {
    color: #aa5533;
    font-weight: 500;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.article-body a:hover {
    color: #df9578;
}

.article-body code {
    background: var(--nav-hover-color);
    color: var(--primary-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
}

.article-body pre {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f8fafc !important;
    color: #333 !important;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.article-body pre code {
    background: transparent;
    color: #333;
    padding: 0;
    font-family: 'Fira Code', Consolas, monospace !important;
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d5dde5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

table th {
    background-color: #f6f8fa;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

table td {
    padding: 0.75rem 1rem;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid var(--border-color);
}

table tr:nth-child(even) {
    background-color: #f9fbfd;
}

table tr:hover {
    background-color: var(--nav-hover-color);
}

/* WordPress block table overrides: replace core dark borders with a light, clean style */
body .wp-block-table {
    overflow-x: auto;
    margin: 1.25rem 0;
}

body .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body .wp-block-table thead {
    border-bottom: none;
}

body .wp-block-table th {
    background-color: #f6f8fa;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

body .wp-block-table td {
    padding: 0.75rem 1rem;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid var(--border-color);
}

body .wp-block-table tbody tr:nth-child(even) {
    background-color: #f9fbfd;
}

body .wp-block-table tbody tr:hover {
    background-color: var(--nav-hover-color);
}

table tr:nth-child(even) {
    background-color: #fafbfc;
}

table tr:hover {
    background-color: var(--nav-hover-color);
}

table tr:last-child td {
    border-bottom: none;
}

/* ---------- Pagination ---------- */
.pagination {
    margin: 2rem 0 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    padding: 0.5rem 0.9rem;
    border: 1px solid #aa5533;
    border-radius: 6px;
    color: #aa5533;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.pagination .page-numbers:hover {
    border-color: #aa5533;
    color: #ffffff;
    background-color: #aa5533;
}

.pagination .page-numbers.current {
    background-color: #aa5533;
    color: #ffffff !important;
    border-color: #aa5533;
    box-shadow: 0 2px 6px rgba(60,141,188,0.2);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #a0aec0;
}

/* ---------- Sidebar / Widgets ---------- */
.widget-area {
    min-width: 0;
    position: sticky;
    top: 100px;
    display: block;
}
.widget {
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
}

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

.widget ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.widget_search .search-form {
    display: flex;
    gap: 0.5rem;
}

.widget .wp-block-search {
    margin: 0;
}

/* ---------- Gutenberg Block Widgets ---------- */
.widget .wp-block-heading {
    color: #aa5533;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.widget .wp-block-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: #aa5533;
}

.widget .wp-block-search__label {
    font-weight: 600;
    color: #7b4307;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    display: block;
}

.widget .wp-block-search__inside-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.widget .wp-block-search__inside-wrapper .wp-block-search__input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0.35rem 0.7rem;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.widget .wp-block-search__button {
    margin-left: 0 !important;
    flex-shrink: 0;
    background-color: #df9578;
    border-color: #df9578;
    color: #ffffff;
    height: 40px;
    padding: 0.35rem 1rem;
    box-sizing: border-box;
    font-size: 0.9rem;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.widget .wp-block-search__button:hover {
    background-color: #aa5533;
    border-color: #aa5533;
    color: #ffffff;
}

.widget .wp-block-group__inner-container {
    display: block;
}

.widget .wp-block-latest-posts__list,
.widget .wp-block-archives-list,
.widget .wp-block-categories-list,
.widget .wp-block-tag-cloud,
.widget .wp-block-latest-comments {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget .wp-block-latest-posts__list li,
.widget .wp-block-archives-list li,
.widget .wp-block-categories-list li,
.widget .wp-block-latest-comments li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
}

.widget .wp-block-latest-posts__list li:last-child,
.widget .wp-block-archives-list li:last-child,
.widget .wp-block-categories-list li:last-child,
.widget .wp-block-latest-comments li:last-child {
    border-bottom: none;
}

.widget .wp-block-latest-posts__list a,
.widget .wp-block-archives-list a,
.widget .wp-block-categories-list a,
.widget .wp-block-latest-comments a {
    color: #aa5533;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget .wp-block-latest-posts__list a:hover,
.widget .wp-block-archives-list a:hover,
.widget .wp-block-categories-list a:hover,
.widget .wp-block-latest-comments a:hover {
    color: #df9578;
}

.widget .wp-block-latest-posts__list .wp-block-latest-posts__post-date,
.widget .wp-block-latest-posts__list .wp-block-latest-posts__post-author {
    color: var(--muted-color);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.widget .wp-block-categories-list .cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget .wp-block-categories-list .cat-item a {
    flex: 1;
}

.widget .wp-block-categories-list .cat-item .count {
    color: var(--muted-color);
    font-size: 0.8rem;
    background: var(--nav-hover-color);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    padding: 0.7rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(60,141,188,0.15);
}

button,
input[type="submit"],
input[type="button"] {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
    min-height: 2.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #2b6a8b;
    border-color: #2b6a8b;
}

/* ---------- Search ---------- */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
}

/* ---------- Comments ---------- */
.comments-area {
    background: #ffffff;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.comments-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
}

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

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-list .children {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.comment-author .avatar {
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.comment-metadata a {
    color: var(--secondary-color);
    text-decoration: none;
}

.comment-content {
    color: #4a5568;
    font-size: 0.95rem;
}

.comment-reply-link,
.comment-edit-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.comment-reply-link:hover,
.comment-edit-link:hover {
    color: var(--primary-color);
}

.comment-respond .comment-form {
    margin-top: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
}

.comment-notes,
.logged-in-as,
.form-allowed-tags {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.logged-in-as a,
.comment-notes a,
.form-allowed-tags a,
.must-log-in a {
    color: #aa5533;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.logged-in-as a:hover,
.comment-notes a:hover,
.form-allowed-tags a:hover,
.must-log-in a:hover {
    color: #df9578;
    text-decoration: underline;
}

.comment-respond .required-field-message {
    color: var(--danger-color);
}

.comment-respond .required {
    color: var(--danger-color);
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: #B16B4A;
    color: #B16B4A;
    margin-top: auto;
}

.footer-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 20px;
    text-align: center;
}

.footer-content p {
    color: #ffffff;
    line-height: 1.5;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 20px 0.5rem;
    text-align: left;
}

.footer-widget {
    flex: 1 1 240px;
    min-width: 0;
}

.footer-widget .widget-title {
    color: #ffffff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.footer-widget .widget-title::after {
    background-color: rgba(255,255,255,0.6);
}

.footer-widget ul li {
    border-bottom-color: rgba(255,255,255,0.15);
}

.footer-widget ul li a {
    color: rgba(255,255,255,0.85);
}

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

/* Footer copyright link: distinct from the surrounding text (underline + lighter tint) */
a.footer-links {
    color: #eaf3fb;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    margin: 0 5px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a.footer-links:hover {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

/* Footer menu links */
.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ---------- Tags / Categories ---------- */
.tagcloud a,
.entry-tags a {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    background: #d1c3ba;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #aa5533;
    text-decoration: none;
    font-size: 0.85rem !important;
    margin: 0 0.3rem 0.3rem 0;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.tagcloud a:hover,
.entry-tags a:hover {
    background: #f1dfc4;
    border-color: #aa5533;
    color: #aa5533;
}

.entry-tags {
    margin: 1rem 0;
}

.entry-tags a {
    display: inline-flex;
}

/* ---------- Image Gallery / Quote Block Variation ---------- */
.gallery-caption,
.wp-block-gallery .blocks-gallery-caption,
.wp-block-image figcaption {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.blockquote.is-style-days-from-blog-quote {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(135deg, var(--nav-hover-color) 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

/* ---------- Previous / Next Navigation ---------- */
.post-navigation,
.posts-navigation {
    margin-bottom: 1.5rem;
}

.post-navigation .nav-links,
.posts-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1 1 0;
    display: flex;
}

.post-navigation .nav-next {
    justify-content: flex-end;
}

.post-navigation .nav-next a {
    text-align: right;
}

.post-navigation .nav-links a,
.posts-navigation .nav-links a {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    background: #ffffff;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    color: #aa5533;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    overflow-wrap: break-word;
}

.post-navigation .nav-links a:hover,
.posts-navigation .nav-links a:hover {
    border-color: #df9578;
    color: #df9578;
    box-shadow: var(--hover-shadow);
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

/* ---------- Legacy WordPress Classes ---------- */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 0.4rem;
    line-height: 1.5;
}

.sticky .entry-title a {
    color: var(--primary-color);
}

.bypostauthor > .comment-body {
    background-color: var(--nav-hover-color);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .main-navigation a {
        padding: 0.3rem 0.6rem;
        font-size: 0.88rem;
    }

    .article-title {
        font-size: 1.35rem;
    }

    .article-header,
    .article-body {
        padding: 1.25rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .card {
        padding: 1rem 1.25rem;
    }

    .article-item {
        flex-direction: column;
        gap: 1rem;
    }

    .article-item .entry-thumbnail {
        flex: 1 1 100%;
        width: 100%;
    }

    .article-meta {
        gap: 0.6rem 1rem;
    }

    table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table th,
    table td {
        min-width: 100px;
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .nav-links a {
        max-width: 100%;
    }

    .comment-list .children {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
        margin: 0.6rem 0;
    }

    html.js .main-navigation ul.nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0 0.75rem;
    }

    html.js .main-navigation.is-open ul.nav-menu {
        display: flex;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        min-width: 0;
        padding-left: 1rem;
    }

    .main-navigation a {
        width: 100%;
    }
}

html.no-js .menu-toggle {
    display: none;
}

html.no-js .main-navigation ul.nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0 0.75rem;
}

html.no-js .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    min-width: 0;
    padding-left: 1rem;
}

/* ---------- мои правки ---------- */

.article-meta {
  display: none;
}

.site-title {
  display: none;
}

.site-description {
  display: none;
}



.menu-item {
  color: #8b4513; /* Цвет текста при наведении (можно поставить любой) */
  background-color: #ff8c42; /* Опционально: можно менять и фон */
  transition: color 0.3s ease, background-color 0.3s ease; /* Плавный переход */
}
.wp-post-image {
    width: 200px;
    height: 300px;
    object-fit: cover; /* чтобы картинка заполняла блок без искажений */
}

@media (max-width: 768px) {
    .content-area {
        margin-top: 50px;
    }
}

.cat-links a {
  display: inline-block;
  margin: 1px; /* отступ 1px со всех сторон */
  padding: 4px 10px;
  background-color: #B16B4A;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
	 border-radius: 4px;
	 border-color: #ffffff;
}

.cat-links a:hover {
  background-color: #ff8c42;
}

/* Обертка информера */
.custom-informer-wrapper {
    margin-bottom: 10px;
    width: 100%;
    clear: both;
}

/* Коричневая плашка с заголовком */
.custom-informer-header {
    background-color: #a35d3f; 
    padding: 10px 15px;
    margin-bottom: 5px;
}

.custom-informer-header .custom-informer-header-link {
    color: #ffffff !important;
    text-decoration: none !important;
    display: block;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.custom-informer-header .custom-informer-header-link:hover {
    color: #ffd700 !important;
}

/* Сетка: ЖЕСТКО 4 колонки на компьютерах */
.custom-informer-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Ровно 4 колонки */
    gap: 15px !important; /* Расстояние между карточками */
    width: 100%;
}

/* Адаптив для планшетов (3 колонки) */
@media (max-width: 992px) {
    .custom-informer-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Адаптив для телефонов (2 колонки) */
@media (max-width: 576px) {
    .custom-informer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Карточка отдельного фильма */
.custom-informer-item {
    display: flex !important;
    flex-direction: column !important; 
    width: 100% !important;
}

/* Картинка */
.custom-informer-item img.custom-informer-img {
    width: 100% !important;
    height: 220px !important; /* Фиксированная высота, чтобы все карточки были ровными */
    object-fit: cover !important; /* Обрезает лишнее, чтобы картинка не сплющивалась */
    display: block !important;
    border-radius: 4px;
    margin-bottom: 8px;
}

.custom-informer-img {
    transition: filter 0.3s ease;
}

.custom-informer-img:hover {
    filter: brightness(70%); /* чем меньше %, тем темнее */
}

/* Название фильма */
.custom-informer-item .custom-informer-title {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #a35d3f !important;
    text-decoration: none !important;
    text-align: left;
}

.custom-informer-item .custom-informer-title:hover {
    color: #d1c3ba !important;
}
/* --- Сетка (4 колонки) --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    margin-bottom: 40px;
	    background: #ffffff;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom
}

/* --- Карточка --- */
.post-card {
    display: flex;
    flex-direction: column;
}

/* Обертка картинки (фиксируем пропорции постера) */
.post-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3; /* Пропорции 2 к 3, как у постеров */
    overflow: hidden;
    border-radius: 6px;
    background-color: #f0f0f0;
}

.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* Плавный зум */
}

/* --- Оверлей (Затемнение) --- */
.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Темное затемнение */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    
    /* Скрыт по умолчанию */
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.post-overlay-content {
    font-size: 13px;
    line-height: 1.5;
    font-family: sans-serif;
}

/* Обрезаем слишком длинный текст, если он не влезает */
.post-overlay-content p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 10; /* Максимум 8 строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Тексты под карточкой --- */
.post-meta {
    margin-top: 15px;
    text-align: center;
    font-family: sans-serif;
}

.post-title {
    display: inline;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.post-title a {
    color: #7f3300;
    text-decoration: none;
}

.post-title a:hover {
    color: #b16b4a;
}

img.wp-post-image {
    border-radius: 15px; /* Измените значение для нужного радиуса */
}



/* =========================================
   ЭФФЕКТ НАВЕДЕНИЯ (Только для ПК/Ноутбуков)
   ========================================= */
@media (hover: hover) and (pointer: fine) {
    .post-card:hover .post-overlay {
        opacity: 1; /* Проявляем заметку */
    }
    
    .post-card:hover .post-image-wrapper img {
        transform: scale(1.05); /* Легкий зум картинки */
    }
}

/* =========================================
   АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 15px; }
}

@media (max-width: 480px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 15px 10px; }
    .post-title { font-size: 14px; }
    .post-year { font-size: 13px; }
    
    /* На мобильных полностью скрываем оверлей, чтобы не мешал */
    .post-overlay { display: none; }
}

.post-title {
    display: inline; /* Чтобы год был на той же строке */
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #555; /* Темно-серый цвет названия */
}

.post-year {
    font-size: 15px;
    color: #999; /* Светло-серый цвет года */
    margin-left: 4px;
}

/* =========================================
   ЭФФЕКТ НАВЕДЕНИЯ (Только для десктопов)
   ========================================= */
@media (hover: hover) and (pointer: fine) {
    .post-card:hover .post-overlay {
        opacity: 1; /* Проявляем заметку */
    }
}

/* =========================================
   АДАПТИВ (Планшеты и Телефоны)
   ========================================= */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 15px; }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    /* На планшетах тоже можно оставить оверлей, если есть hover, но на тач-экранах он не сработает */
}

@media (max-width: 480px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 15px 10px; }
    .post-title { font-size: 14px; }
    .post-year { font-size: 13px; }
    
    /* На телефонах полностью отключаем оверлей, чтобы он не мешал скроллить */
    .post-overlay { display: none; }
}

.article-bod {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.articl a {
    color: #aa5533;
    font-weight: 500;
    transition: color 0.2s
}		
.articl a:hover {
    color: #df9578;
}

.user-avatar{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
}

.widget a {
    color: #aa5533;
    font-weight: 500;
    transition: color 0.2s
}

.widget a:hover {
    color: #df9578;
}

.logged-in-as {
  display: none;
}


.archive-count	{
    color: #aa5533;
	font-weight: 700;
}

.textwidget img {
    border-radius:50%;
    max-width: 100px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* Скрываем иконку внутри вкладок фильтров */
.main-navigation ul svg {
    display: none !important;
}


/* 1. Скрываем кнопку от всех по умолчанию */
.admin-copy-btn {
    display: none !important;
}

/* 2. Показываем её только тем, у кого есть админ-панель (админам) */
body.admin-bar .admin-copy-btn {
    display: inline-block !important;
}

/* Контейнер модального окна */
.video-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important; /* Максимальный приоритет, чтобы перекрыть шапку сайта */
    display: none; /* JS переключит на flex */
    justify-content: center !important;
    align-items: center !important;
}

/* Темный фон */
.video-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Само белое окно */
.video-modal-content {
    position: relative !important;
    background: #f5f5f5 !important;
    width: 90% !important;
    max-width: 450px !important;
    padding: 30px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    z-index: 1000000 !important;
    margin: 0 !important; /* Убираем возможные отступы от темы */
    max-height: 90vh !important; /* Чтобы окно не вылезало за экран на телефонах */
    overflow-y: auto !important; /* Если форма длинная — внутри окна будет свой скролл */
    box-sizing: border-box !important;
}

/* Кнопка закрытия (крестик) */
.video-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    font-size: 28px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    color: #333 !important;
    line-height: 1 !important;
}

/* Делаем кнопки строчно-блочными, чтобы они встали в ряд */
.textwidget1 .sll-btn {
    display: inline-block !important;
    margin: 0 10px 10px 0 !important; /* Отступы: справа и снизу по 10px */
    vertical-align: middle;
}

/* Делаем кнопки строчно-блочными, чтобы они встали в ряд */
.textwidget1 .sll-btn {
    display: inline-block !important;
    margin: 0 10px 10px 0 !important; /* Отступы: справа и снизу по 10px */
    vertical-align: middle;
}

/* Делаем кнопки строчно-блочными, чтобы они встали в ряд */
.textwidget1 .sll-btn {
    display: inline-block !important;
    margin: 0 10px 10px 0 !important; /* Отступы: справа и снизу по 10px */
    vertical-align: middle;
}

/* Чтобы текст был на отдельной строке над кнопками */
.textwidget1 {
    line-height: 2;
}