/* Grid Wrapper */
.ajax-post-grid-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Dropdown Filter */
.grid-filter-dropdown {
  margin-bottom: 30px;
  text-align: center;
}

#category-filter {
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  min-width: 250px;
  transition: all 0.3s ease;
}

#category-filter:hover,
#category-filter:focus {
  border-color: #0073aa;
  outline: none;
}

/* Post Grid */
.ajax-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

/* Grid Item */
.grid-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.grid-item-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumbnail */
.grid-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}

.grid-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.grid-item:hover .grid-thumbnail img {
  transform: scale(1.05);
}

/* Content */
.grid-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}

.grid-date {
  font-weight: 500;
}

.grid-categories {
  color: #0073aa;
  font-weight: 500;
}

.grid-title {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 15px 0;
}

.grid-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.grid-title a:hover {
  color: #0073aa;
}

.grid-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.grid-read-more {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: color 0.3s ease;
}

.grid-read-more:hover {
  color: #005177;
}

/* Loading Spinner */
.grid-loading {
  text-align: center;
  padding: 30px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Load More Button */
.load-more-btn {
  padding: 12px 30px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.load-more-btn:hover {
  background: #005177;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .ajax-post-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  #category-filter {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .ajax-post-grid {
    grid-template-columns: 1fr;
  }

  .grid-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* Scholarships cards (template: page-scholarships.php) */
.ajax-post-grid.scholarships-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.scholarships-grid {
  text-align: center !important;
}

.scholarship-content {
  margin: 5px 0px !important;
}

.status-text.scholarship-content {
  padding: 0 !important;
}

.scholarship-content strong {
  font-weight: 800 !important;
  color: #000;
}

.scholarship-card-item .scholarship-title {
  margin-bottom: 10px;
}

.scholarship-card-item .scholarship-description {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .ajax-post-grid.scholarships-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  .ajax-post-grid.scholarships-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Bulletins cards (template: page-bulletins.php) */
.bulletins-article {
  padding-top: 20px !important;
}

.bulletins-article h2,
.bulletins-article h3,
.bulletins-article {
  text-align: center !important;
}

.bulletin-title a {
  font-size: 22px;
  color: #2a80c0;
}

.bulletin-title a:hover {
  color: #000;
}

.bulletin-items {
  display: block;
  padding: 10px;
  border-bottom: 1px dotted !important;
  width: 80%;
  margin: auto;
}
