/* Wrapper around grid and loader */
#posts-wrapper {
    position: relative;
    min-height: 200px; /* Ensures space is reserved for spinner even if no posts yet */
}

/* Post grid */
#posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 120px 50px;
}

.posts-wrapper-opportunity #posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 18px;
}

/* Individual post item */
#posts-grid .post-item .post-categories,
.posts-wrapper-opportunity #posts-grid .post-item .post-meta{
	text-transform: uppercase;
	color: #2E2E2E;
	margin-bottom: 7px;
}

#posts-grid .post-item .post-excerpt{
	margin-bottom: 30px;
}

.posts-wrapper-opportunity #posts-grid .post-item .post-excerpt{
	margin-bottom: 0;
}

#posts-grid .post-item  .post-title{
	font-weight: 700;
}

#posts-grid .post-item .post-thumbnail{
	margin-bottom: 16px;
}

#posts-grid .post-item .post-thumbnail img{
	height: 328px;
	object-fit: cover;
	display: block;
	width: 100%;
}


.posts-wrapper-opportunity #posts-grid .post-item .post-thumbnail img{
	height: 200px;
}

/* Spinner overlay */
.ajax-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
}

/* Spinner SVG animation */
.spinner {
    animation: rotate 2s linear infinite;
    width: 48px;
    height: 48px;
}

.spinner .path {
    stroke: #0073aa; /* WordPress blue or choose your own */
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

/* Spinner keyframes */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Category dropdown & pagination styling (optional) */
.filter-container-organization{
	text-align: center;
	gap: 20px
}

.filter-container-organization select{
	margin: 0 10px;
}

#filter-container{
	margin-bottom: 60px;
}

#filter-container select {
    padding: 8px;
    font-size: 16px;
}

#pagination-buttons {
    margin-top: 60px;
    display: flex;
    gap: 20px;
	justify-content: center;
}

#pagination-buttons button {
    padding: 8px 16px;
    cursor: pointer;
    border: none;
    background-color: #EDECDD;
    color: #0E4A1A;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#pagination-buttons button:hover {
    background-color: #1D6D50;
	color: #fff;
}

@media (max-width: 1024px){
	/* Post grid */
	#posts-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr)!important;
		gap: 60px 30px;
	}
}

@media (max-width: 768px){
	/* Post grid */
	#posts-grid {
		display: grid;
		grid-template-columns: 1fr!important;
		gap: 30px;
	}
	
	posts-grid .post-item .post-thumbnail img{
		height: 280px;
	}
}