/**
 * Blog Posts Section - Clean Implementation
 * Purpose: Full width layout with minimal gaps
 */

.opsim-blogpost-section {
    /* Break out of container to reach red lines */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    padding: 0 5% 60px; /* 5% side padding matches wide layouts */
    background: transparent;
}

.opsim-blogpost-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1600px; /* Target width for the "red lines" */
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .opsim-blogpost-section {
        width: 100%;
        margin-left: 0;
        padding: 0 20px 40px;
    }
}

@media (max-width: 991px) {
    .opsim-blogpost-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .opsim-blogpost-grid {
        grid-template-columns: 1fr;
    }
    .opsim-blogpost-section {
        padding-bottom: 30px;
    }
}

/* Card Styling - High Quality, Minimalist */
.opsim-blogpost-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
    height: 100%;
}

.opsim-blogpost-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.opsim-blogpost-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.opsim-blogpost-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

.opsim-blogpost-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.opsim-blogpost-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #000;
}

.opsim-blogpost-title a {
    color: inherit;
    text-decoration: none;
}

.opsim-blogpost-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.opsim-blog-placeholder {
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 16px;
    color: #666;
}

/* Admin Editor Responsive Fixes */
.editor-styles-wrapper .opsim-blogpost-section,
.block-editor-page .opsim-blogpost-section {
    width: 100%;
    margin-left: 0;
    padding: 20px 0;
}

.editor-styles-wrapper .opsim-blogpost-grid,
.block-editor-page .opsim-blogpost-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
