/* Kontejner mreže */
.custom-posts-grid-wrapper {
    display: grid;
    gap: 24px;
    width: 100%;
}

/* Kolone - Desktop */
.custom-posts-grid-wrapper.cols-d-4 { grid-template-columns: repeat(4, 1fr); }
.custom-posts-grid-wrapper.cols-d-3 { grid-template-columns: repeat(3, 1fr); }
.custom-posts-grid-wrapper.cols-d-2 { grid-template-columns: repeat(2, 1fr); }
.custom-posts-grid-wrapper.cols-d-1 { grid-template-columns: 1fr; }

/* Kartica objave */
.custom-post-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    height: 100%;
}

/* Slika sa omjerom ~ 0.66 */
.custom-post-thumbnail {
    width: 100%;
    margin-bottom: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.custom-post-thumbnail a,
.custom-post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-post-thumbnail:hover img {
    transform: scale(1.03);
}

/* Tijelo kartice */
.custom-post-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.custom-post-title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.custom-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-post-title a:hover {
    color: #1b7340;
}

.custom-post-date {
    font-size: 0.82rem;
    color: #888888;
    margin-bottom: 8px;
}

.custom-post-excerpt {
    font-size: 0.92rem;
    color: #555555;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Dugme / Link na dnu */
.custom-post-footer {
    margin-top: auto;
}

.custom-post-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1b7340;
    text-decoration: none;
}

.custom-post-read-more:hover {
    text-decoration: underline;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .custom-posts-grid-wrapper.cols-t-2 { grid-template-columns: repeat(2, 1fr); }
    .custom-posts-grid-wrapper.cols-t-1 { grid-template-columns: 1fr; }
}

/* Responsive: Mobile */
@media (max-width: 767px) {
    .custom-posts-grid-wrapper.cols-m-1 { grid-template-columns: 1fr; }
    .custom-posts-grid-wrapper.cols-m-2 { grid-template-columns: repeat(2, 1fr); }
}
