/**
 * Стили для отдельных постов блога
 */

/* Основная статья */
.single-post-article {
    padding-top: 40px;
}

/* Категория как тег */
.post-category-tag {
    text-align: center;
}

.category-tag {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    margin: 0 auto;
    color: #fff;
}

/* Заголовок статьи */
.entry-header {
    margin-bottom: 40px;
}

.hero-title {
    text-align: center;
    margin: 16px 0;
}

.post-content {
    max-width: 1000px;
}

/* Краткая мета информация под заголовком */
.post-meta-brief {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 0;
    justify-content: center;
}

.meta-separator {
    color: #64748b;
    font-weight: 300;
}

.reading-time,
.post-date {
    font-weight: 500;
}

/* Изображение статьи */
.post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 512px;
    object-fit: cover;
}

/* Основной контент с сайдбаром */
.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    margin-bottom: 60px;
}

/* Левая колонка - контент */
.post-content {
    min-width: 0; /* Для правильного переноса длинных слов */
}

.entry-content {
    line-height: 1.7;
    color: #cbd5e1;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #e2e8f0;
    margin-top: 2em;
    margin-bottom: 1em;
}

.wp-block-pullquote {
    margin: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.entry-content blockquote {
    padding-left: 64px;
    background: url("../images/quote.svg") no-repeat;
    text-align: left;
}

.entry-content blockquote p {
    font-style: italic;
}

.entry-content blockquote cite {
    font-style: normal;
    text-transform: none;
    color: #E6DDF0;
    font-size: 14px;
    line-height: 145%;
}

.entry-content img {
    border-radius: 12px;
}

.entry-content h2 {
    font-size: 30px;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 125%;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content h4 {
    font-size: 1.25rem;
}

.entry-content p {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 135%;
    font-weight: 400;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content code {
    background: rgba(216, 180, 254, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.entry-content pre {
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* Теги статьи */
.post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.tags-title {
    font-weight: 600;
    color: #e2e8f0;
    margin-right: 10px;
}

.post-tags a {
    display: inline-block;
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: rgba(25, 25, 31, 0.55);
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Правая колонка - сайдбар */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 20px;
}

/* Оглавление */
.table-of-contents-widget {
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.toc-placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.toc-note {
    margin: 0;
    line-height: 1.5;
}

.toc-note small {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Похожие статьи */
.related-posts-widget, .related-posts-mobile {
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.related-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.related-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.related-post-title a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.related-post-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Мобильный блок "Похожие статьи" (скрыт по умолчанию) */
.related-posts-mobile {
    display: none;
    margin-top: 40px;
}

/* Блоки на всю ширину */
.full-width-sections {
    margin-top: 60px;
}

.full-width-sections section {
    position: relative;
    z-index: 1;
    padding: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
}

.full-width-sections section .container {
    padding: 0;
    width: 100%;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #e2e8f0;
}

/* Блок "Поделиться" */
.share-section {
    background: rgba(216, 180, 254, 0.02);
}

.share-buttons-placeholder {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* Блок FAQ */
.faq-section-post {
    background: rgba(216, 180, 254, 0.02);
}

.faq-placeholder {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* Блок комментариев */
.comments-section {
    background: rgba(216, 180, 254, 0.02);
}

/* Кастомизация формы комментариев */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    width: 100%;
    margin-bottom: 20px;
}

/* Горизонтальное размещение полей Имя, Email, Сайт */
.comment-form .comment-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

/* Стили для полей формы комментариев */
.comment-form label {
    font-weight: 500;
    font-size: 18px;
    line-height: 28px;
    user-select: none;
    color: #ffffff;
    text-align: left;
    display: block;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    height: 48px;
    margin-top: 12px;
    width: 100%;
    font-weight: 400;
    font-size: 17px;
    line-height: 140%;
    background: transparent;
    border-radius: 10px;
    padding: 12px 16px;
    color: rgb(228, 228, 255);
    transition: 0.3s;
    border: 2px solid var(--border-color);
    font-family: Manrope, sans-serif, sans-serif;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--border-color);
    background: radial-gradient(98.8% 98.8% at 50% 1.2%, #09090A 0%, #15151A 100%);
    box-shadow: 0 0 0 3px rgba(216, 180, 254, 0.1);
}

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

/* Кнопка отправки комментария */
.comment-form .form-submit {
    margin-top: 40px;
}

.comment-form input[type="submit"] {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 15px 40px;
    border-radius: 12px;
    position: relative;
    background: linear-gradient(270deg, #4785FF 25.54%, #6f5b96 100%);
    color: rgb(228, 228, 255);
    font-weight: 600;
    font-size: 18px;
    line-height: 28px;
    align-items: center;
    cursor: pointer;
    transition-duration: 300ms;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(71, 133, 255, 0.3);
}

/* Кастомный чекбокс для сохранения данных */
.comment-form-cookies-consent {
    margin: 20px 0;
}

.comment-form-cookies-consent input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(216, 180, 254, 0.3);
    border-radius: 4px;
    background: rgba(15, 10, 43, 0.3);
    cursor: pointer;
    position: relative;
    margin-right: 12px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.comment-form-cookies-consent input[type="checkbox"]:checked {
    background: linear-gradient(270deg, #4785FF 25.54%, #6f5b96 100%);
    border-color: var(--border-color);
}

.comment-form-cookies-consent input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.comment-form-cookies-consent input[type="checkbox"]:hover {
    border-color: rgb(216, 180, 254);
    background: rgba(15, 10, 43, 0.5);
}

.comment-form-cookies-consent input[type="checkbox"]:checked:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
}

.comment-form-cookies-consent label {
    color: #cbd5e1;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

/* Стили для списка комментариев */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 0 0;
}

.comment-list .comment {
    background: rgba(216, 180, 254, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.comment-list .fn {
    color: #e2e8f0;
    font-weight: 600;
    text-decoration: none;
}

.comment-meta {
    color: #CABFD9;
    font-size: 14px;
    line-height: 145%;
}

.comment-list .comment-metadata {
    color: #CABFD9;
    font-size: 14px;
    line-height: 145%;
}

.comment-list .comment-metadata a {
    color: #94a3b8;
    text-decoration: none;
}

.comment-list .comment-metadata a:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.comment-list .comment-content {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 15px;
}

.comment-list .reply {
    text-align: right;
}

.comment-list .comment-reply-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.comment-list .comment-reply-link:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Вложенные комментарии */
.comment-list .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 20px;
}

/* Заголовки секций комментариев */
.comments-title,
.comment-reply-title {
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
}


/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .comment-form .comment-form-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .comment-form .comment-form-fields .comment-form-author,
    .comment-form .comment-form-fields .comment-form-email,
    .comment-form .comment-form-fields .comment-form-url {
        margin-bottom: 15px;
    }

    .comment-list .children {
        padding-left: 20px;
    }
}

/* Адаптивность */
@media (max-width: 1024px) {
    .post-content-wrapper {
        grid-template-columns: 1fr 250px;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .single-post-article {
        padding-top: 20px;
    }

    .entry-title {
        font-size: 2rem;
    }

    .entry-meta {
        flex-direction: column;
        gap: 10px;
    }

    .post-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: relative;
    }

    .entry-content h2 {
        margin-top: 0;
    }

    .post-sidebar {
        position: static;
        order: -1; /* Показываем сайдбар перед контентом */
    }

    .post-content {
        order: 1; /* Контент после сайдбара */
    }

    /* Скрываем "Похожие статьи" в сайдбаре на мобильных */
    .post-sidebar .related-posts-widget {
        display: none;
    }

    /* Показываем мобильный блок "Похожие статьи" */
    .related-posts-mobile {
        display: block;
    }

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

    .full-width-sections section {
        padding: 20px;
    }

    .comments-section {
        margin: 8px;
    }

    .comment-form input[type="submit"] {
        width: 100%;
    }
}

.lwptoc {
    margin-bottom: 0 !important;
}

.lwptoc_i {
    background: none !important;
    padding: 0 !important;
}

.lwptoc_item_label {
    font-size: 16px !important;
    color: #fff !important;
    line-height: 135% !important;
}

.lwptoc_item {
    margin-bottom: 12px !important;
}

.says {
    display: none;
}
