/* General Reset */
* {
    box-sizing: border-box;
}

/* Container Styling */
.taxonomy-posts,
.child-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 15px;
}

/* Child Category Item */
.child-category {
    width: calc(25% - 20px); /* 4 columns on desktop */
    text-align: center;
}

.child-category img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Optional: Square images */
    object-fit: cover;
    margin-bottom: 10px;
}

.child-category h2 {
    font-size: 1.5rem;
    margin: 0;
}

/* Taxonomy Post Item */
.taxonomy-post {
    width: calc(25% - 20px); /* 4 columns on desktop */
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
}

.taxonomy-post:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.taxonomy-post .post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    aspect-ratio: 16 / 9; /* Optional: Ensure thumbnail consistency */
    object-fit: cover;
}

.taxonomy-post h3 {
    margin-top: 15px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

.taxonomy-post .post-content {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Utility Padding */
.p-10 {
    padding: 10px;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
    .child-category, .taxonomy-post {
        width: calc(33.33% - 20px);
    }
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .child-category, .taxonomy-post {
        width: calc(50% - 20px);
    }
}
