/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.blog-post-detail {
    margin: 240 0 0 0;
    padding: 0;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 0 120px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    margin-top: 120px;
}

.post-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 120px rgba(0, 0, 0, 0.03);
}

/* ===== ЗАГОЛОВОК ===== */
.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #333;
}

/* ===== МЕТА-ИНФОРМАЦИЯ ===== */
.post-meta {
    font-size: 0.95rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.post-meta-left {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-excerpt {
    color: #333;
    font-size: 1.3rem;
    margin-top: 1rem;
}

/* ===== ИЗОБРАЖЕНИЯ ===== */
.featured-image {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-image img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
}

/* ===== КОНТЕНТ С ВЫРАВНИВАНИЕМ ===== */
.content-wrapper {
    line-height: 1.9;
    font-size: 1.12rem;
    color: #111827;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-break: break-word;
    max-width: 100%;
}

.content-wrapper p {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
}

.content-wrapper h2 {
    color: #333;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
    text-align: left;
}

.content-wrapper h3 {
    color: #333;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
    text-align: left;
}

.content-wrapper blockquote {
    border-left: 4px solid #333;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
    text-align: left;
}

.content-wrapper ul,
.content-wrapper ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    text-align: left;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
}

/* ===== ТАБЛИЦЫ ===== */
.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff !important;
    color: #111827;
}

.content-wrapper .table-wrapper {
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    padding: 0;
    margin: 2rem 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none !important;
}

.content-wrapper th,
.content-wrapper td {
    padding: 0.85rem 1rem;
    border: 1px solid #e5e7eb;
    background: #ffffff !important;
    text-align: left;
}

.content-wrapper thead {
    background: #f3f4f6 !important;
    font-weight: 600;
}

.content-wrapper tbody tr:nth-child(even) {
    background: #ffffff !important;
}

.content-wrapper tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

/* ===== МЕДИА ===== */
.content-wrapper figure {
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.content-wrapper .media-embed {
    margin: 0 auto;
    border-radius: 18px !important;
    overflow: hidden;
    background: #0f172a !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
    text-align: center;
}

.content-wrapper figure figcaption,
.media-embed__caption {
    margin: 0;
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.content-wrapper img,
.content-wrapper video {
    display: block;
    margin: 2rem auto;
    border-radius: 16px;
    max-width: 100%;
    height: auto;
}

.content-wrapper video {
    width: 100%;
}

.media-embed__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.media-embed__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

/* ===== РАЗДЕЛИТЕЛЬ ===== */
.post-divider {
    border: 0;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 2.5rem 0;
}

/* ===== ПОДВАЛ ===== */
.post-footer {
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.share {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.share span {
    color: #6b7280;
}

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

.copy-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
}

.btn {
    margin: 1rem 0;
    color: #6b7280;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    color: #333;
    transform: translateX(-5px);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
    .post-card {
        padding: 2rem;
        border-radius: 30px;
        margin-top: 100px;
    }
    .post-container {
        padding: 0 1.8rem;
    }
}

@media (max-width: 768px) {
    .blog-post-detail {
        padding: 2.2rem 0;
    }

    .post-container {
        padding: 0 1rem;
    }

    .post-card {
        padding: 1.5rem 1rem;
        border-radius: 24px;
        margin-top: 80px;
    }

    .post-header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .post-meta-left,
    .post-meta-right {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .post-excerpt {
        font-size: 1rem;
        margin-top: 0.8rem;
    }

    .content-wrapper {
        font-size: 1rem;
        line-height: 1.8;
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .content-wrapper h2 {
        font-size: 1.4rem;
    }

    .content-wrapper h3 {
        font-size: 1.2rem;
    }

    .content-wrapper img,
    .content-wrapper video {
        border-radius: 12px;
        margin: 1rem auto;
    }

    .featured-image img {
        border-radius: 14px;
    }

    .share {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .share a,
    .copy-link {
        font-size: 14px;
        padding: 4px 8px;
    }

    .post-footer {
        margin-top: 1rem;
    }

    .post-divider {
        margin: 1.5rem 0;
    }

    .btn {
        font-size: 14px;
    }

    .content-wrapper blockquote {
        padding-left: 1rem;
        margin: 1.5rem 0;
    }

    .content-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper th,
    .content-wrapper td {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }

    .content-wrapper ul,
    .content-wrapper ol {
        padding-left: 1.2rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .blog-post-detail {
        padding: 1.5rem 0;
    }

    .post-container {
        padding: 0 0.8rem;
    }

    .post-card {
        padding: 1rem 0.8rem;
        border-radius: 20px;
        margin-top: 60px;
    }

    .post-header h1 {
        font-size: 1.3rem;
    }

    .post-meta {
        font-size: 0.75rem;
    }

    .post-excerpt {
        font-size: 0.9rem;
    }

    .content-wrapper {
        font-size: 0.92rem;
        line-height: 1.7;
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .content-wrapper h2 {
        font-size: 1.2rem;
    }

    .content-wrapper h3 {
        font-size: 1.05rem;
    }

    .content-wrapper img,
    .content-wrapper video {
        border-radius: 10px;
    }

    .featured-image img {
        border-radius: 12px;
    }

    .share span {
        font-size: 13px;
    }

    .share a,
    .copy-link {
        font-size: 12px;
        padding: 3px 6px;
    }

    .btn {
        font-size: 12px;
        margin: 0.5rem 0;
    }

    .content-wrapper blockquote {
        padding-left: 0.8rem;
        margin: 1rem 0;
        font-size: 0.9rem;
    }

    .content-wrapper table {
        font-size: 0.75rem;
    }

    .content-wrapper th,
    .content-wrapper td {
        padding: 0.3rem 0.5rem;
    }

    .post-divider {
        margin: 1rem 0;
        height: 2px;
    }
}
/* ===== КОММЕНТАРИИ ===== */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.comments-section h3 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.comment-count {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.xtdcomment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.xtdcomment:last-child {
    border-bottom: none;
}

.avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.comment-date {
    color: #adb5bd;
    font-size: 0.8rem;
    margin-left: 0.75rem;
}

.comment-text {
    margin: 0.3rem 0 0.5rem 0;
    color: #34495e;
    line-height: 1.6;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.comment-actions a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-actions a:hover {
    color: #6c5ce7;
    text-decoration: underline;
}

.children {
    margin-left: 3.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e9ecef;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-top: 1.5rem;
}

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

.comment-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    font-family: inherit;
}

.comment-form textarea:focus {
    border-color: #6c5ce7;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.comment-form .form-actions {
    display: flex;
    justify-content: flex-end;
}

.comment-form .btn-primary {
    background: #6c5ce7;
    border: none;
    padding: 0.6rem 2rem;
    font-weight: 500;
    border-radius: 50px;
    transition: background 0.2s, transform 0.1s;
    color: #fff;
    cursor: pointer;
}

.comment-form .btn-primary:hover {
    background: #5a4bd1;
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .xtdcomment {
        flex-direction: column;
        gap: 0.5rem;
    }
    .children {
        margin-left: 1.2rem;
        padding-left: 0.8rem;
    }
    .comment-form {
        padding: 1rem;
    }
    .comment-form .form-actions {
        justify-content: stretch;
    }
    .comment-form .btn-primary {
        width: 100%;
    }
}

.comments-section .login-link {
    display: block;
    width: 100%;
    background: #6c5ce7;
    color: #fff;
    text-align: center;
    padding: 0.75rem 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.comments-section .login-link:hover {
    background: #5a4bd1;
}