/**
 * Rich Blog Content Styling
 * Ensures all multimedia content displays beautifully
 */

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Headings within blog content */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.blog-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

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

/* Paragraphs */
.blog-content p {
    margin-bottom: 1.5rem;
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Image positioning classes */
.blog-content .image-left {
    float: left;
    margin: 10px 30px 20px 0;
    max-width: 50%;
}

.blog-content .image-right {
    float: right;
    margin: 10px 0 20px 30px;
    max-width: 50%;
}

.blog-content .image-center {
    display: block;
    margin: 30px auto;
    max-width: 100%;
}

.blog-content .img-fluid {
    width: 100%;
    height: auto;
}

/* Figures with captions */
.blog-content figure {
    margin: 30px 0;
    text-align: center;
}

.blog-content figure img {
    margin-bottom: 10px;
}

.blog-content figcaption {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}

/* Before/After Image Layouts */
.blog-content .before-after {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.blog-content .before-after > div {
    flex: 1;
}

.blog-content .before-after h4 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Image Galleries */
.blog-content .image-gallery {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.blog-content .image-gallery.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.blog-content .image-gallery.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.blog-content .image-gallery.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive galleries */
@media (max-width: 768px) {
    .blog-content .image-gallery.cols-3,
    .blog-content .image-gallery.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .blog-content .image-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .blog-content .image-left,
    .blog-content .image-right {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }
}

/* Videos and iframes */
.blog-content iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

/* Responsive video container */
.blog-content .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 8px;
}

.blog-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

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

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

/* Blockquotes */
.blog-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
}

/* Code blocks */
.blog-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e83e8c;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Tables */
.blog-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.blog-content table th,
.blog-content table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.blog-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

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

/* Links */
.blog-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.blog-content a:hover {
    border-bottom-color: #007bff;
}

/* Clear floats */
.blog-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Horizontal rules */
.blog-content hr {
    margin: 3rem 0;
    border: 0;
    border-top: 2px solid #e9ecef;
}

/* Highlight/callout boxes */
.blog-content .callout {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.blog-content .callout.info {
    background-color: #d1ecf1;
    border-left-color: #0dcaf0;
}

.blog-content .callout.success {
    background-color: #d1e7dd;
    border-left-color: #198754;
}

.blog-content .callout.danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-content {
        font-size: 1rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
}

