/* Стили для контента, созданного в визуальном редакторе */

.prose {
    color: #374151;
    max-width: none;
}

.prose h1 {
    color: #1f2937;
    font-weight: 800;
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.prose h2 {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.prose h3 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h4 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.prose h5 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.prose h6 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.prose p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.prose img {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    height: auto;
}

.prose a {
    color: #0ea5e9;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #0284c7;
}

.prose strong {
    color: #1f2937;
    font-weight: 600;
}

.prose em {
    color: #374151;
    font-style: italic;
}

.prose ul {
    list-style-type: disc;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose ol {
    list-style-type: decimal;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.prose li p {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #1f2937;
    border-left: 0.25rem solid #0ea5e9;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6rem;
    margin-bottom: 1.6rem;
    padding-left: 1rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.prose blockquote p:first-of-type::before {
    content: open-quote;
}

.prose blockquote p:last-of-type::after {
    content: close-quote;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-top: 1.7rem;
    margin-bottom: 1.7rem;
    border-radius: 0.375rem;
    padding: 1rem;
}

.prose code {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
    background-color: #f1f5f9;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    line-height: 1.7;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.prose thead th {
    color: #1f2937;
    font-weight: 600;
    vertical-align: bottom;
    padding: 0.75rem;
    border-right: 1px solid #e5e7eb;
}

.prose thead th:last-child {
    border-right: none;
}

.prose tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:last-child {
    border-bottom: none;
}

.prose tbody td {
    vertical-align: baseline;
    padding: 0.75rem;
    border-right: 1px solid #e5e7eb;
}

.prose tbody td:last-child {
    border-right: none;
}

.prose hr {
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Адаптивные стили */
@media (max-width: 640px) {
    .prose {
        font-size: 0.875rem;
    }
    
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose table {
        font-size: 0.75rem;
    }
    
    .prose thead th,
    .prose tbody td {
        padding: 0.5rem;
    }
}

/* Специальные стили для изображений в редакторе */
.prose img[style*="float: left"] {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.prose img[style*="float: right"] {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose img[style*="display: block"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Стили для выделения текста */
.prose mark {
    background-color: #fef3c7;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Стили для подписей к изображениям */
.prose figcaption {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    text-align: center;
    font-style: italic;
}

/* Анимации для контента */
.prose-animated {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}