/* Embed Posts Grid */
:root {
    --primary-shadow: 0 5px 10px rgba(0, 0, 0, 0.1), 0 20px 20px rgba(0, 0, 0, 0.05);
    --primary-border-color: rgba(0, 0, 0, 0.1);
    --primary-background: #fff;
    --grid-gap: 1em;
}

/* Dummy content styles (optional) */
hr { 
    height: 6px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
} 

hr:last-child {
    margin-right: 60%;
}

hr.image {
    padding-bottom: 50%;
} 

/* Grid and Wrapper Styles */
.embed-grid {
    padding: 2em;
    width: 100%;
    display: inline-grid;
    margin: 0;
}

.wrapper {
    padding: 2em;
    background: transparent;
    max-width: 100%;
    width: 100%;
    margin: 1em 0;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    .embed-grid,
    .wrapper {
        width: 100%;
        padding: 1em;
        margin: 1em 0;
    }
}

/* Posts Grid Layout */
.embed-posts-wrapper {
    display: grid;
    /* Column configuration is set dynamically via inline CSS */
    grid-gap: var(--grid-gap);
}

/* Individual Post Styles */
.embed-posts {
    padding: 1em;
    background: var(--primary-background);
    box-shadow: var(--primary-shadow);
    border-radius: 0.5em;
    border: solid 1px var(--primary-border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.embed-posts:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 25px 25px rgba(0, 0, 0, 0.08);
}

/* Typography */
.embed-posts h3 {
    font-size: 1.4em;
    margin-bottom: 0.5em;
    color: #333;
    line-height: 1.3;
}

.embed-posts small {
    display: block;
    color: #666;
    margin-bottom: 0.5em;
    font-size: 0.9em;
}

/* Image Styles */
.embed-posts img {
    width: 100%;
    height: auto;
    border-radius: 0.3em;
    margin-bottom: 0.5em;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.embed-posts img:hover {
    opacity: 0.9;
}

/* Read More Link */
.embed-posts .read-more {
    display: inline-block;
    color: #0073a8;
    text-decoration: none;
    margin-top: 0.5em;
    font-weight: bold;
    transition: color 0.3s ease;
}

.embed-posts .read-more:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Alternative Layout: Inline Image Style */
.embed-posts-inline {
    width: 100%;
    margin: 2em 0 0;
}

.embed-posts-inline img {
    width: 35%;
    float: left;
    margin-right: 2em;
}

@media only screen and (max-width: 768px) {
    .embed-posts-inline img {
        width: 100%;
        float: none;
        margin-right: 0;
    }
}
