/* blog-content-styles.css */

/* Blog pattern background */
.blog-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54 30h6v6h-6zM0 30h6v6H0zM30 0v6h6V0zM30 54v6h6v-6z' fill='%23198341' fill-opacity='0.05'/%3E%3C/svg%3E");
}

/* Basic content container */
.content-body {
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: none;
    position: relative;
}

/* Headings */
.content-body h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3c39; /* dark-bg */
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.content-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3c39; /* dark-bg */
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3c39; /* dark-bg */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.content-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3c39; /* dark-bg */
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.content-body h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3c39; /* dark-bg */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.content-body h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3c39; /* dark-bg */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    text-transform: uppercase;
}

/* Paragraphs */
.content-body p {
    color: #4b5563; /* text-gray-700 */
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

/* Lists */
.content-body ul,
.content-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-body ul {
    list-style-type: disc;
}

.content-body ol {
    list-style-type: decimal;
}

.content-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-body li > ul,
.content-body li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Links */
.content-body a {
    color: #198341; /* primary */
    text-decoration: underline;
    transition: color 0.2s;
}

.content-body a:hover {
    color: #145c2c; /* primary-dark-50 */
}

/* Blockquotes */
.content-body blockquote {
    border-left: 4px solid #198341; /* primary */
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #718096; /* text-gray-600 */
    font-style: italic;
}

.content-body blockquote p {
    color: #718096; /* text-gray-600 */
}

/* Code blocks */
.content-body pre {
    background-color: #f9fafb; /* bg-gray-50 */
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
}

.content-body code {
    background-color: #f9fafb; /* bg-gray-50 */
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    color: #198341; /* primary */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
}

.content-body pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

/* Images */
.content-body img {
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    display: block;
}

/* Tables */
.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.content-body table th,
.content-body table td {
    border: 1px solid #d1d5db; /* border-gray-300 */
    padding: 0.75rem;
}

.content-body table th {
    background-color: #f9fafb; /* bg-gray-50 */
    font-weight: 600;
    text-align: left;
}

.content-body table tr:nth-child(even) {
    background-color: #f9fafb; /* bg-gray-50 */
}

/* Horizontal rule */
.content-body hr {
    border: 0;
    border-top: 1px solid #e5e7eb; /* border-gray-200 */
    margin: 2rem 0;
}

/* Quill specific classes */
.content-body .ql-indent-1 {
    padding-left: 3em;
}

.content-body .ql-indent-2 {
    padding-left: 6em;
}

.content-body .ql-indent-3 {
    padding-left: 9em;
}

.content-body .ql-indent-4 {
    padding-left: 12em;
}

.content-body .ql-indent-5 {
    padding-left: 15em;
}

.content-body .ql-indent-6 {
    padding-left: 18em;
}

.content-body .ql-indent-7 {
    padding-left: 21em;
}

.content-body .ql-indent-8 {
    padding-left: 24em;
}

.content-body .ql-align-center {
    text-align: center;
}

.content-body .ql-align-right {
    text-align: right;
}

.content-body .ql-align-justify {
    text-align: justify;
}

/* Quill size classes */
.content-body .ql-size-small {
    font-size: 0.875rem;
}

.content-body .ql-size-large {
    font-size: 1.25rem;
}

.content-body .ql-size-huge {
    font-size: 1.5rem;
}

/* Script styles */
.content-body sub {
    vertical-align: sub;
    font-size: smaller;
}

.content-body sup {
    vertical-align: super;
    font-size: smaller;
}

/* Video container */
.content-body .ql-video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    margin: 1.5rem 0;
}

/* For the case where the iframe itself has the ql-video class */
.content-body iframe.ql-video {
    width: 100%;
    height: 450px !important; /* Fixed height */
    position: static !important; /* Override the relative positioning */
    padding-bottom: 0 !important; /* Remove the padding */
    display: block;
    margin: 1.5rem auto;
    width: 100%;
    border-radius: 8px;
}

/* For responsive sizing - use this instead if you prefer responsive height */
@media (max-width: 768px) {
    .content-body iframe.ql-video {
        height: 350px !important;
    }
}
@media (max-width: 458px) {
    .content-body iframe.ql-video {
        height: 220px !important;
    }
}
/* Color and background color will be handled by the editor */

/* Fade in and slide up animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}
