.resources-grid-wrapper {
    margin: 20px 0;
}

/* Category Buttons */
.resources-filter-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
	    flex-wrap: wrap;
}
.resource-cat-button {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background-color 0.2s ease;
}
.resource-cat-button:hover {
    background-color: #ddd;
}
.resource-cat-button.active {
    background-color: #FEC52E;
    color: #000;
}

/* Grid with dynamic columns */
.resources-grid {
    display: grid;
    gap: 40px;
    /* Desktop by default */
    grid-template-columns: repeat(var(--desktop-cols, 3), 1fr);
}

/* Tablet breakpoint (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .resources-grid {
        grid-template-columns: repeat(var(--tablet-cols, 2), 1fr);
    }
}

/* Mobile breakpoint (under 768px) */
@media (max-width: 767px) {
    .resources-grid {
        grid-template-columns: repeat(var(--mobile-cols, 1), 1fr);
    }
}

/* Card container */
.resource-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.resource-card {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease;
}
.resource-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Featured Image */
.resource-image img {
    width: 100%;
	height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Category pill */
.resource-category-pill {
    display: inline-block;
    background: linear-gradient(135deg, #FEC52E 0%, #FEC52E 100%);
    color: #000;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    margin-bottom: 8px;
	white-space: nowrap;
}

/* Date */
.resource-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

/* Title */
.resource-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
}

/* Excerpt */
.resource-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4em;
    margin-bottom: 16px;
    flex: 1; /* let excerpt expand */
}

.resource-excerpt .excerpt-full {
    display: none;
}

.resource-excerpt.expanded .excerpt-full {
    display: block;
}

.resource-excerpt.expanded .excerpt-short {
    display: none;
}

.read-more, .read-less {
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
}

/* Footer */
.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Buttons container */
.resource-buttons {
    display: flex;
/*     gap: 10px; */
    flex-wrap: nowrap;
    align-items: center;
}

/* Author */
.resource-author {
    display: flex;
    align-items: center;
}
.resource-author img {
    border-radius: 50%;
    margin-right: 8px;
}
.author-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stats (like + comments) */
.resource-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resource-like-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #333;
}
.resource-like-button .flame-icon {
    font-size: 1rem;
}
.comment-count {
    font-size: 0.9rem;
    color: #666;
}
/* Ensure the grid wrapper can position the loader absolutely */
.resources-grid-wrapper {
    position: relative; /* so the overlay can appear on top */
}

/* Loader overlay */
.resources-loader-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content:  center;
    z-index: 9999;
}

/* Spinning loader element */
.resources-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: resourcesSpin 1s linear infinite;
}

@keyframes resourcesSpin {
    to {
        transform: rotate(360deg);
    }
}

.resource-category-pill {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -16px);
    top: 0;
    font-size: 15px;
    padding: 6px 21px;
    text-transform: capitalize;
}

.resource-card {
    position: relative;
    padding: 0;
}

.resource-item {
    overflow: visible;
}

h3.resource-title, .resource-excerpt,.resource-date {
    padding: 6px 20px;
    text-align: center;
}

h3.resource-title {
    font-size: 22px;
}
.resource-image img {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.resource-category-pill.only_emoji {left: 0;transform: translate(0, 0);background: transparent;font-size: 28px;padding: 4px;}
.resource-category-pill.only_emoji {
    left: -10px;
    top: -14px;
    background: #fec52e;
    padding: 8px;
    border-radius: 50%;
}
.resource-date {
    display: none;
}


.resource-image a,
.resource-title a,
.resource-date a,
.resource-excerpt a{
  text-decoration: none !important;
  color: inherit;
}
.resource-button {
  margin: 0 5px 10px !important;
  display: inline-block !important;
  padding: 10px 15px !important;
  background: #FEC52E !important;
  color: #000 !important;
  text-decoration: none !important;
  border-radius: 50px !important;
}

.resource-secondary-button {
  margin: 0 5px 10px !important;
  display: inline-block !important;
  padding: 10px 15px !important;
  background: #000 !important; /* Gray for secondary */
  color: #FEC52E !important;
  text-decoration: none !important;
  border-radius: 50px !important;
}

.resource-buttons a {
  font-size: 15px;
}
