/*
Theme Name: GridMaster
Theme URI: http://example.com/
Author: Ваше Имя
Description: Простая тема на CSS Grid
Version: 1.0
*/

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

/* ===== МИНИМАЛЬНЫЙ РАЗМЕР ШРИФТА ===== */
html {
    font-size: 17px;
}

body {
    font-size: 1rem;
}

* {
    font-size: 1rem;
}

/* Исключения для мелких элементов */
small,
.meta,
.post-meta,
.comment-meta,
.time,
.date,
.caption,
sub,
sup {
    font-size: 0.875rem;
}

/* На мобильных 1rem */
@media (max-width: 768px) {
    body {
        font-size: 1.2rem;
    }
    
    * {
        font-size: 1.2rem;
    }
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    padding: 2px;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
#page {
    display: grid;
    width: 100%;
    grid-template-areas:
        "head head head head"
        "side1 main side2 side3"
        "foot foot foot foot";
    grid-template-columns: minmax(20%, .5fr) 1fr minmax(20%, .5fr) minmax(20%, .5fr);
    grid-template-rows: auto 1fr auto;
    margin: 0 auto;
    gap: 2px;
}

/* ===== ГЛАВНАЯ - ТОЛЬКО КОНТЕНТ ===== */
body.home #page {
    grid-template-areas:
        "head"
        "main"
        "foot";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
}

body.home #page > aside {
    display: none;
}

/* ===== ШАПКА ===== */
#page > header {
    grid-area: head;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 25px;
    border-radius: 8px 8px 0 0;
}

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

.header-brand h1 {
    font-size: 1.6rem;
    margin: 0;
}

.header-brand h1 a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-description {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    margin: 4px 0 0;
}

.header-search {
    flex: 1;
    min-width: 250px;
    max-width: 500px;
}

.header-widget-area {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.header-widget-area .header-widget {
    color: #fff;
}

.header-widget-area .header-widget-title {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 8px;
}

.header-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.header-widget-area ul li a {
    color: #fff;
    text-decoration: none;
    padding: 6px 14px;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
    transition: all 0.3s;
    display: inline-block;
}

.header-widget-area ul li a:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== КОНТЕНТ ===== */
#page > main {
    grid-area: main;
    background: #ffffff;
    padding: 25px;
    overflow-x: hidden;
}

/* ===== САЙДБАРЫ ===== */
#page > aside {
    background: #2d3436;
    padding: 15px;
}

#page > aside:nth-of-type(1) {
    grid-area: side1;
}

#page > aside:nth-of-type(2) {
    grid-area: side2;
}

#page > aside:nth-of-type(3) {
    grid-area: side3;
}

#page > aside .widget {
    margin-bottom: 20px;
}

#page > aside .widget:last-child {
    margin-bottom: 0;
}

#page > aside .widget-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

#page > aside a,
#page > aside ul li a,
#page > aside .widget a,
#page > aside .menu-item a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-left: 2px solid transparent;
}

#page > aside a:hover,
#page > aside ul li a:hover,
#page > aside .widget a:hover,
#page > aside .menu-item a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-left-color: #fd79a8;
}

#page > aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#page > aside ul li {
    margin-bottom: 6px;
}

/* ===== ПОДВАЛ ===== */
#page > footer {
    grid-area: foot;
    background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%);
    padding: 30px 25px 20px;
    border-radius: 0 0 8px 8px;
}

#page > footer .footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20%, .5fr));
    gap: 25px;
    margin-bottom: 25px;
    text-align: left;
}

#page > footer .footer-widgets .footer-widget {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 20px 22px 22px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#page > footer .footer-widgets .footer-widget:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

#page > footer .footer-widgets .footer-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #fd79a8 100%);
    border-radius: 12px 12px 0 0;
}

#page > footer .footer-widgets .footer-widget-title {
    color: #fd79a8;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(253,121,168,0.2);
    letter-spacing: 0.5px;
}

#page > footer .footer-widgets .footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

#page > footer .footer-widgets .footer-widget ul::-webkit-scrollbar {
    width: 4px;
}

#page > footer .footer-widgets .footer-widget ul::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

#page > footer .footer-widgets .footer-widget ul::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

#page > footer .footer-widgets .footer-widget ul::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #fd79a8 100%);
}

#page > footer .footer-widgets .footer-widget ul {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(255,255,255,0.05);
}

#page > footer .footer-widgets .footer-widget ul li {
    margin-bottom: 6px;
    padding: 4px 0;
}

#page > footer .footer-widgets .footer-widget ul li:last-child {
    margin-bottom: 0;
}

#page > footer .footer-widgets .footer-widget ul li a {
    color: #b2bec3;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
}

#page > footer .footer-widgets .footer-widget ul li a:hover {
    color: #fff;
    background: rgba(102,126,234,0.15);
    padding-left: 14px;
}

#page > footer .footer-widgets .footer-widget p {
    color: #b2bec3;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

#page > footer .footer-widgets .footer-widget .textwidget {
    color: #b2bec3;
    font-size: 0.9rem;
    line-height: 1.6;
}

#page > footer .footer-widgets .footer-widget .search-form {
    display: flex;
    width: 100%;
    gap: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

#page > footer .footer-widgets .footer-widget .search-form:focus-within {
    border-color: #667eea;
    background: rgba(255,255,255,0.1);
}

#page > footer .footer-widgets .footer-widget .search-form label {
    flex: 1;
    margin: 0;
}

#page > footer .footer-widgets .footer-widget .search-form input[type="search"] {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

#page > footer .footer-widgets .footer-widget .search-form input[type="search"]::placeholder {
    color: rgba(255,255,255,0.4);
}

#page > footer .footer-widgets .footer-widget .search-form .search-submit {
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

#page > footer .footer-widgets .footer-widget .search-form .search-submit:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#page > footer .footer-widgets .footer-widget .search-form .search-submit svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#page > footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 18px;
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #b2bec3;
}

#page > footer .copyright p {
    margin: 0;
}

/* ===== ГЛАВНАЯ - КАРТОЧКИ ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.post-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(102,126,234,0.15);
    border-color: #667eea;
}

.post-thumbnail {
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

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

.post-content {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 15px 18px 18px;
    gap: 8px;
}

.post-title {
    font-size: 1.1rem;
    margin: 0;
}

.post-title a {
    color: #2d3436;
    text-decoration: none;
    transition: color 0.3s;
}

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

.post-excerpt {
    font-size: 0.9rem;
    color: #636e72;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    max-height: 8em;
}

.read-more {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s;
    justify-self: start;
    align-self: end;
    border: none;
}

.read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    margin-top: 25px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.pagination .page-numbers:hover {
    background: #8ca0ff;
    color: #fff;
    border-color: #8ca0ff;
}

.pagination .current {
    background: #8ca0ff;
    color: #fff;
    border-color: #8ca0ff;
}

/* ===== ЗАПИСИ ===== */
.single-post {
    max-width: 100%;
}

.single-header {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 3px solid #667eea;
}

.single-title {
    font-size: 2rem;
    color: #2d3436;
    margin-bottom: 12px;
}

.single-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, auto));
    gap: 10px;
    font-size: 0.85rem;
    color: #636e72;
}

.single-meta span {
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.single-meta a {
    color: #667eea;
    text-decoration: none;
}

.single-meta a:hover {
    text-decoration: underline;
}

.single-thumbnail {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #2d3436;
}

.single-content h2 {
    margin-top: 30px;
    font-size: 1.6rem;
    color: #2d3436;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

.single-content h3 {
    margin-top: 25px;
    font-size: 1.3rem;
    color: #2d3436;
}

.single-content p {
    margin-bottom: 18px;
}

.single-content ul,
.single-content ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.single-content li {
    margin-bottom: 6px;
}

.single-content blockquote {
    background: #f8f9fa;
    border-left: 5px solid #fd79a8;
    padding: 18px 25px;
    margin: 25px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    color: #2d3436;
}

.single-content blockquote p {
    margin-bottom: 0;
}

/*.single-content pre {
    background: #1a1a2e;
    color: #fd79a8;
    padding: 18px 22px;
    border-radius: 8px;
    overflow-y: auto;
    overflow-x: auto;
    max-height: 300px;
    min-height: 60px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 20px 0;
    border: 1px solid #2d3436;
    position: relative;
}

.single-content pre::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.single-content pre::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.single-content pre::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.single-content pre::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #fd79a8 100%);
}

.single-content pre {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(255,255,255,0.05);
}

.single-content pre .copy-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.single-content pre:hover .copy-btn {
    opacity: 1;
    pointer-events: auto;
}

.single-content pre .copy-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.single-content pre .copy-btn.copied {
    background: #00b894;
    border-color: #00b894;
}

.single-content pre .copy-btn.copied::after {
    content: ' ✓';
}

.single-content code {
    background: #f8f9fa;
    color: #e17055;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
}

.single-content pre code {
    background: transparent;
    color: #fd79a8;
    padding: 0;
    border: none;
}*/

.single-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.single-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

/* ===== ТЕГИ ===== */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.post-tags a {
    background: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(253,121,168,0.3);
}

.post-tags a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253,121,168,0.5);
}

/* ===== НАВИГАЦИЯ МЕЖДУ ЗАПИСЯМИ ===== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px 0;
}

.post-navigation a {
    color: #2d3436;
    text-decoration: none;
    padding: 10px 18px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-align: center;
    border: 1px solid #e9ecef;
}

.post-navigation a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

/* ===== ГАЛЕРЕИ ===== */
.slg-gallery {
    width: 100%;
    margin: 25px 0;
}

.slg-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* ===== ТАБЛИЦЫ ===== */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

.single-content table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 15px;
    text-align: left;
}

.single-content table td {
    padding: 10px 15px;
    border: 1px solid #e9ecef;
}

.single-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.single-content table tr:hover {
    background: #e9ecef;
}

/* ===== КОММЕНТАРИИ ===== */
.comments-area {
    max-width: 100%;
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.comments-title {
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.comment-list .comment {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.comment-list .comment:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(5px);
}

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

.comment-list .comment .comment-author .avatar {
    border-radius: 50%;
    border: 2px solid #667eea;
}

.comment-list .comment .comment-author .fn {
    font-weight: 700;
    color: #2d3436;
    font-size: 1.05rem;
}

.comment-list .comment .comment-author .says {
    display: none;
}

.comment-list .comment .comment-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}

.comment-list .comment .comment-meta a {
    color: #888;
    text-decoration: none;
}

.comment-list .comment .comment-meta a:hover {
    color: #667eea;
}

.comment-list .comment .comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.comment-list .comment .comment-content p {
    margin-bottom: 10px;
}

.comment-list .comment .reply {
    margin-top: 12px;
}

.comment-list .comment .reply .comment-reply-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.comment-list .comment .reply .comment-reply-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.comment-list .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 15px;
}

.comment-navigation {
    text-align: center;
    margin: 25px 0 30px;
}

.comment-navigation .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.comment-navigation .page-numbers:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.comment-navigation .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.comment-navigation .dots {
    border: none;
    background: transparent;
}

.comment-respond {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.comment-reply-title {
    font-size: 1.5rem;
    color: #2d3436;
    margin-bottom: 20px;
}

.comment-reply-title small {
    margin-left: 10px;
}

.comment-reply-title small a {
    color: #e17055;
    text-decoration: none;
    font-size: 0.9rem;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.comment-form-comment {
    grid-column: 1 / -1;
}

.comment-form-comment label {
    display: block;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 0;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
}

.comment-form-author label .required,
.comment-form-email label .required {
    color: #e17055;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.comment-form-cookies-consent {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.comment-form-cookies-consent label {
    font-size: 0.9rem;
    color: #555;
}

.form-submit {
    grid-column: 1 / -1;
    margin-top: 5px;
}

.form-submit .submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 200px;
}

.form-submit .submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102,126,234,0.4);
}

.comment-form .math-captcha-container {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.comment-form .math-captcha-container .math-captcha-question {
    font-size: 1rem;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.comment-form .math-captcha-container .math-captcha-question .num1,
.comment-form .math-captcha-container .math-captcha-question .num2,
.comment-form .math-captcha-container .math-captcha-question .operator {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.comment-form .math-captcha-container input.math-result {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.3s;
}

.comment-form .math-captcha-container input.math-result:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.comment-form .math-captcha-container .math-captcha-refresh {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0 5px;
}

.comment-form .math-captcha-container .math-captcha-refresh:hover {
    transform: rotate(180deg);
}

.comment-form .math-captcha-container .math-hmac {
    display: none;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    #page {
        grid-template-columns: minmax(20%, .5fr) 1fr minmax(20%, .5fr);
        grid-template-areas:
            "head head head"
            "side1 main side2"
            "foot foot foot";
    }
    
    #page > aside:nth-of-type(3) {
        display: none;
    }
}

@media (max-width: 768px) {
    #page {
        grid-template-areas:
            "head"
            "main"
            "foot";
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        padding: 0;
    }
    
    #page > aside {
        display: none;
    }
    
    #page > main {
        padding: 10px;
    }
    
    #page > header {
        border-radius: 0;
        padding: 15px;
    }
    
    #page > footer {
        border-radius: 0;
        padding: 20px 15px;
    }
    
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-search {
        max-width: 100%;
        min-width: auto;
    }
    
    .header-widget-area ul {
        flex-direction: column;
        gap: 5px;
    }
    
    .header-widget-area ul li a {
        display: block;
        text-align: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .post-thumbnail img {
        height: 180px;
    }
    
    .single-title {
        font-size: 1.5rem;
    }
    
    .single-meta {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .single-thumbnail img {
        max-height: 350px;
        object-fit: contain;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .single-content {
        padding: 0;
    }
    
    .single-content blockquote {
        padding: 12px 18px;
        margin: 18px 0;
    }
    
    .single-content pre {
        max-height: 200px;
        padding: 14px 16px;
        font-size: 0.8rem;
    }
    
    .single-content pre .copy-btn {
        opacity: 1;
        pointer-events: auto;
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    
    .pagination .page-numbers {
        padding: 4px 10px;
        font-size: 0.8rem;
        margin: 0 1px;
    }
    
    #page > footer .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #page > footer .footer-widgets .footer-widget {
        padding: 16px 18px 18px;
    }
    
    #page > footer .footer-widgets .footer-widget ul {
        max-height: 150px;
    }
    
    .comments-area {
        padding: 20px 15px;
    }
    
    .comment-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        grid-column: 1;
    }
    
    .comment-form-cookies-consent {
        flex-wrap: wrap;
    }
    
    .form-submit .submit {
        width: 100%;
        min-width: auto;
        padding: 12px 20px;
    }
    
    .comment-list .children {
        padding-left: 15px;
    }
    
    .comment-list .comment {
        padding: 15px 18px;
    }
    
    .comment-list .comment .comment-author {
        flex-wrap: wrap;
    }
    
    .comment-navigation .page-numbers {
        padding: 4px 10px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
    
    .comment-form .math-captcha-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 15px;
    }
    
    .comment-form .math-captcha-container .math-captcha-question {
        justify-content: center;
    }
    
    .comment-form .math-captcha-container input.math-result {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .comment-form .math-captcha-container .math-captcha-refresh {
        align-self: center;
    }
}

@media (max-width: 480px) {
    #page > main {
        padding: 8px;
    }
    
    #page > header {
        padding: 12px;
    }
    
    #page > footer {
        padding: 15px 12px;
    }
    
    .header-brand h1 {
        font-size: 1.3rem;
    }
    
    .single-title {
        font-size: 1.3rem;
    }
    
    .single-content pre {
        max-height: 150px;
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    .single-content blockquote {
        padding: 10px 14px;
        margin: 15px 0;
        font-size: 0.9rem;
    }
    
    .single-content img {
        margin: 10px 0;
    }
    
    .post-tags a {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    #page > footer .footer-widgets .footer-widget {
        padding: 14px 14px 16px;
    }
    
    #page > footer .footer-widgets .footer-widget ul {
        max-height: 120px;
    }
    
    .comments-area {
        padding: 15px 10px;
    }
    
    .comments-title {
        font-size: 1.4rem;
    }
    
    .comment-reply-title {
        font-size: 1.2rem;
    }
    
    .comment-list .comment {
        padding: 12px 14px;
    }
    
    .comment-list .comment .comment-content {
        font-size: 0.9rem;
    }
    
    .comment-form-comment textarea {
        min-height: 100px;
        padding: 10px 14px;
    }
    
    .comment-form-author input,
    .comment-form-email input,
    .comment-form-url input {
        padding: 10px 14px;
    }
}

/* ===== СТИЛИ ПОИСКА ===== */
.search-form {
    display: flex;
    width: 100%;
    gap: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    margin-left: 20px;
    margin-right: 30px;
    width: calc(100% - 40px);
}

.search-form:focus-within {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 30px rgba(102,126,234,0.2);
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    font-family: Arial, sans-serif;
}

.search-form input[type="search"]::placeholder {
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

.search-form input[type="search"]:focus {
    outline: none;
    box-shadow: none;
}

.search-form .search-submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.search-form .search-submit:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.search-form .search-submit svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .search-form {
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
    }
    
    .search-form input[type="search"] {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .search-form .search-submit {
        padding: 10px 16px;
        min-width: 50px;
    }
    
    .search-form .search-submit svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .search-form {
        margin-left: 5px;
        margin-right: 5px;
        width: calc(100% - 10px);
    }
    
    .search-form input[type="search"] {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .search-form .search-submit {
        padding: 8px 12px;
        min-width: 44px;
    }
    
    .search-form .search-submit svg {
        width: 16px;
        height: 16px;
    }
}
/*  -------------------------------------------------------------------------- ДОПЫ НОВЫЕ  -------------------------------------------------------------------  */


/* ===== ТЕГИ В САЙДБАРАХ КАК В ЗАПИСЯХ ===== */
#page > aside .tagcloud,
#page > aside .widget_tag_cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#page > aside .tagcloud a,
#page > aside .widget_tag_cloud a {
    background: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(253,121,168,0.3);
    display: inline-block;
    border-left: none;
}

#page > aside .tagcloud a:hover,
#page > aside .widget_tag_cloud a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253,121,168,0.5);
    background: linear-gradient(135deg, #e17055 0%, #fd79a8 100%);
}

/* ===== АРХИВЫ (ТЕГИ, КАТЕГОРИИ, ДАТЫ) ===== */
body.archive #page {
    grid-template-areas:
        "head"
        "main"
        "foot";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
}

body.archive #page > aside {
    display: none;
}

/* ===== ЦЕНТРИРУЕМ СЧЁТЧИК  ===== */

#page > footer .footer-bottom {
    text-align: center;
}

/* ===== ТЕГИ В ПОДВАЛЕ КАК В СТАТЬЯХ (ФИОЛЕТОВЫЕ) ===== */
#page > footer .footer-widgets .widget_tag_cloud,
#page > footer .footer-widgets .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

#page > footer .footer-widgets .widget_tag_cloud a,
#page > footer .footer-widgets .tagcloud a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
    display: inline-block;
    border-left: none;
}

#page > footer .footer-widgets .widget_tag_cloud a:hover,
#page > footer .footer-widgets .tagcloud a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.5);
    background: linear-gradient(135deg, #764ba2 0%, #fd79a8 100%);
}

/* ===== ТЕГИ В ПОДВАЛЕ 14px ===== */
#page > footer .footer-widgets .widget_tag_cloud a,
#page > footer .footer-widgets .tagcloud a {
    font-size: 15px !important;
}

/*------------------------------       audio video            --------------------------------*/

.mejs-controls {
	background: #764ba2 !important;
}
/* Основные стили для контейнера и видео */
.mejs-container.mejs-video {
    height: 50vh !important; /* Высота контейнера */
    max-height: 100vh !important; /* Ограничение максимальной высоты */
    background: black !important; /* Фон */
    display: flex; /* Используем flex для выравнивания */
   	justify-content: center; /* Горизонтальное центрирование */
    align-items: center; /* Вертикальное центрирование */
}

.mejs-container.mejs-video video {
    max-height: 100% !important; /* Ограничение максимальной высоты видео */
    max-width: 100% !important;  /* Ограничение максимальной ширины видео */
    height: auto !important;     /* Автоматическое изменение высоты для сохранения пропорций */
    width: auto !important;      /* Автоматическое изменение ширины для сохранения пропорций */
}

/* Стили для полноэкранного режима */
.mejs-container.mejs-video:fullscreen,
.mejs-container.mejs-video video:fullscreen,
.mejs-container.mejs-video:-webkit-full-screen,
.mejs-container.mejs-video video:-webkit-full-screen,
.mejs-container.mejs-video:-moz-full-screen,
.mejs-container.mejs-video video:-moz-full-screen {
    height: 100vh !important; /* Высота контейнера в полноэкранном режиме */
    max-height: 100vh !important; /* Ограничение максимальной высоты */
    width: auto !important;  /* Ширина подстраивается автоматически */
    display: flex;
    justify-content: center; /* Центрирование видео в полноэкранном режиме */
    align-items: center; /* Вертикальное центрирование в полноэкранном режиме */
}

.mejs-mediaelement
    {
        text-align: center !important;
 }

/* ===== КАЛЕНДАРЬ В САЙДБАРЕ ===== */
#wp-calendar {
    width: 100%;
    max-width: 27.5rem;
    background: #2d3436;
    border-radius: 12px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ШАПКА КАЛЕНДАРЯ */
#wp-calendar caption {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border-radius: 12px 12px 0 0;
}

/* ДНИ НЕДЕЛИ */
#wp-calendar thead th {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 4px;
    background: #1a1a2e;
    color: #b2bec3;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ЯЧЕЙКИ */
#wp-calendar tbody td {
    position: relative;
    padding: 6px 2px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    background: #2d3436;
    color: #dfe6e9;
    font-size: 0.9rem;
    transition: background 0.3s;
}

#wp-calendar tbody td:hover {
    background: rgba(102,126,234,0.15);
}

#wp-calendar tbody td.pad {
    opacity: 0.3;
}

/* СЕГОДНЯ */
#wp-calendar tbody td#today {
    font-weight: 700;
    background: rgba(102,126,234,0.2);
    border-radius: 4px;
    color: #fd79a8;
}

#wp-calendar tbody td#today:after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ССЫЛКИ В ЯЧЕЙКАХ */
#wp-calendar tbody td a {
    display: block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 4px;
    padding: 2px 0;
    transition: all 0.3s;
    text-decoration: none;
}

#wp-calendar tbody td a:hover {
    background: linear-gradient(135deg, #764ba2 0%, #fd79a8 100%);
    transform: scale(1.05);
}

/* НАВИГАЦИЯ (ПРЕДЫДУЩИЙ/СЛЕДУЮЩИЙ) */
#wp-calendar tfoot tr {
    background: #1a1a2e;
}

#wp-calendar tfoot tr td {
    border: 0;
    padding: 0;
}

#wp-calendar tfoot tr a {
    display: block;
    padding: 10px 16px;
    color: #b2bec3;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
}

#wp-calendar tfoot tr a:hover {
    background: rgba(102,126,234,0.15);
    color: #fd79a8;
}

#wp-calendar tfoot tr #prev {
    text-align: left;
}

#wp-calendar tfoot tr #next {
    text-align: right;
}

/* ===== WP-НАВИГАЦИЯ (СОВРЕМЕННАЯ) ===== */
nav.wp-calendar-nav {
    padding: 0;
    width: 100%;
    background: #1a1a2e;
    text-align: center;
    padding: 10px;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}

nav.wp-calendar-nav a {
    color: #b2bec3;
    padding: 6px 16px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.85rem;
}

nav.wp-calendar-nav a:hover {
    background: rgba(102,126,234,0.15);
    color: #fd79a8;
}

nav.wp-calendar-nav .wp-calendar-nav-prev {
    text-align: left;
}

nav.wp-calendar-nav .wp-calendar-nav-next {
    text-align: right;
}