.dynamic-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.posts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.post-item {
    position: relative;
    min-height: 400px;
}

/* Estilos base para todas las entradas */
.post-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.post-content h3 {
    font-size: 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 37px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: #000;
    margin: 10px 0;
    line-height: 27px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

/* Estilos para filas impares (3 columnas) */
.posts-row:nth-child(odd) .col-third {
    flex: 0 0 calc(33.333% - 14px);
}

/* Estilos para filas pares (2 columnas) */
.posts-row:nth-child(even) .col-wide {
    flex: 0 0 calc(65% - 10px);
    position: relative;
}

.posts-row:nth-child(even) .col-narrow {
    flex: 0 0 calc(35% - 10px);
}

/* Invertir el orden en filas pares (las que tienen 2 entradas) */
.posts-row:nth-of-type(4n) {
    flex-direction: row-reverse;
}

/* Estilos para posts con imagen de fondo */
.post-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.col-wide .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    color: white;
}

.col-wide .post-content h3,
.col-wide .post-content .post-excerpt {
    color: white;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.load-more-button {
    padding: 12px 24px;
    background: transparent;
    color: #000;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    border: none;
    font-family: 'Poppins';
}

.load-more-button.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Responsive */
@media (max-width: 768px) {
    .post-item {
        flex: 0 0 100% !important;
        min-height: 300px;
    }
    
    .posts-row {
        gap: 15px;
    }
    
    .post-content h3 {
        font-size: 20px;
        line-height: 30px;
    }
}