/* Post Type Grid Block Styles */
.post-type-grid {
    margin: 40px 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Column variations */
.post-type-grid--columns-1 .post-grid {
    grid-template-columns: 1fr;
}

.post-type-grid--columns-2 .post-grid {
    grid-template-columns: repeat(2, 1fr);
}

.post-type-grid--columns-3 .post-grid {
    grid-template-columns: repeat(3, 1fr);
}

.post-type-grid--columns-4 .post-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Card styling */
.post-grid__card {
    padding: 30px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-grid__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Featured card - middle card gets special styling */
.post-grid__card--featured {
    background: linear-gradient(135deg, #2d5436 0%, #1a3320 100%);
    color: #fff;
    border: none;
    transform: scale(1.05);
    z-index: 1;
}

.post-grid__card--featured:hover {
    transform: scale(1.05) translateY(-5px);
}

/* Image styling */
.post-grid__image {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-grid__card--featured .post-grid__image {
    background-color: rgba(255, 255, 255, 0.1);
}

.post-grid__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.post-grid__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-grid__title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: #000;
}

.post-grid__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-grid__title a:hover {
    color: #2d5436;
}

.post-grid__card--featured .post-grid__title a {
    color: #fff;
}

.post-grid__card--featured .post-grid__title a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.post-grid__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
    flex: 1;
}

.post-grid__card--featured .post-grid__excerpt {
    color: rgba(255, 255, 255, 0.9);
}

/* Meta information (ACF fields) */
.post-grid__meta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    text-align: left;
}

.post-grid__card--featured .post-grid__meta {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.post-grid__meta-item {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.5;
    color: #666;
}

.post-grid__card--featured .post-grid__meta-item {
    color: rgba(255, 255, 255, 0.85);
}

.post-grid__meta-item strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-grid__card--featured .post-grid__meta-item strong {
    color: rgba(255, 255, 255, 0.7);
}

.post-grid__meta-item:last-child {
    margin-bottom: 0;
}

/* Date */
.post-grid__date {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
}

.post-grid__card--featured .post-grid__date {
    color: rgba(255, 255, 255, 0.7);
}

/* Empty state */
.post-grid__empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1149px) {
    .post-type-grid--columns-4 .post-grid,
    .post-type-grid--columns-3 .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-type-grid--columns-4 .post-grid,
    .post-type-grid--columns-3 .post-grid,
    .post-type-grid--columns-2 .post-grid {
        grid-template-columns: 1fr;
    }
    
    .post-grid__card {
        padding: 25px;
    }
    
    .post-grid__card--featured {
        transform: scale(1);
    }
    
    .post-grid__card--featured:hover {
        transform: translateY(-5px);
    }
    
    .post-grid__title {
        font-size: 18px;
    }
    
    .post-grid__excerpt {
        font-size: 13px;
    }
}

/* Animation support */
.post-grid__card.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.post-grid__card:nth-child(1) {
    animation-delay: 0.1s;
}

.post-grid__card:nth-child(2) {
    animation-delay: 0.2s;
}

.post-grid__card:nth-child(3) {
    animation-delay: 0.3s;
}

.post-grid__card:nth-child(4) {
    animation-delay: 0.4s;
}

.post-grid__card:nth-child(5) {
    animation-delay: 0.5s;
}

.post-grid__card:nth-child(6) {
    animation-delay: 0.6s;
}