.afgrode-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem; /* lidt mindre gap */
}

.afgrode-grid-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9; /* lavere højde end 4/3 */
    object-fit: cover;    /* beskær billedet pænt */
}

.afgrode-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9; /* matcher billedets ratio */
    background-color: #eee;
    background-image: url("/wp-content/uploads/placeholder.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.afgrode-grid-item {
    background-color: var(--global-palette1);
    transition: background-color 0.2s ease;
    overflow: hidden; /* sikrer at indhold ikke strækker boksen */
}

.afgrode-grid-item:hover {
    background-color: var(--global-palette2);
}

.afgrode-grid-item h2 {
    font-size: 17px !important; /* lidt mindre font */
    text-align: center;
    font-weight: normal !important;
    color: #fff;
    padding: 1em 0; /* mindre padding */
}
a {
	text-decoration: none !important;
}
.last {
	color: var(--global-palette-highlight) !important;
}
.last:last-child {
	color: #000 !important;
}

@media only screen and (max-width: 992px) {
  .afgrode-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 600px) {
  .afgrode-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.afgrode-excerpt { 
    color: #fff; 
    text-align: center !important; 
    font-size: 12px; 
    padding: 1em; 
    background-color: #d93b33; 
    margin: 0 !important; 
}

/* Post-kort: flex-kolonne så footer altid sidder i bunden */
.afgrode-grid-item--post {
    display: flex;
    flex-direction: column;
}

.afgrode-grid-item--post .afgrode-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.afgrode-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.afgrode-card-footer .article-link {
    text-align: left;
}

.afgrode-card-footer .afgrode-modified-date {
    text-align: right;
}

.afgrode-modified-date {
    color: rgba(0,0,0,0.65);
    font-size: 11px;
    white-space: nowrap;
}
