/*
 Theme Name: Neve Child
 Theme URI: https://example.com/
 Author: Your Name
 Author URI: https://example.com/
 Description: A child theme for Neve.
 Version: 1.0.0
 Template: neve
*/

/* * Final Corrected CSS for a uniform-height grid layout.
 * This code uses CSS Grid to ensure all cards have the same height.
 */

/* Main container for the grid */
.posts-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 1fr;
    gap: 30px;
    max-width: 1200px;
    box-sizing: border-box;
    margin: 40px auto;
    padding: 0 20px;
}

/* Styles for each individual post card */
.post-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    height: 100%;
}

/* Hover effect for the post card */
.post-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Main clickable area for image, title, and excerpt */
.post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    outline: none;
}

.post-card__image {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
}

.post-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 20px 20px;
}

/* Post title styling */
.post-card h2.post-card__title {
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin: 0 0 10px; /* Increased margin to 10px */
    padding: 10px 0 0;
    transition: color 0.3s ease;
}

/* Change title color on card hover */
.post-card-link:hover .post-card__title {
    color: #0073aa;
}

/* Post Excerpt */
.post-card__excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Ensure the last paragraph within the excerpt doesn't have extra bottom margin */
.post-card__excerpt p {
    margin: 0;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 992px) {
    .posts-grid-container {
        gap: 25px;
    }
    .post-card {
        flex: 1 1 calc(50% - 12.5px);
    }
}
@media (max-width: 768px) {
    .posts-grid-container {
        gap: 20px;
    }
    .post-card {
        flex: 1 1 calc(50% - 10px);
    }
    .post-card h2.post-card__title {
        font-size: 1.15em;
    }
    .post-card__image {
        height: 180px;
    }
    .post-card__content {
        padding: 15px;
    }
}
@media (max-width: 480px) {
    .posts-grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    .post-card {
        flex-basis: 100%;
    }
    .post-card__image {
        height: 160px;
    }
    .post-card__content {
        padding: 15px;
    }
}