/* [resources_live_filter] — same look as the original WPCode snippet. Selectors are scoped to
   each .resources-filter instance (no IDs), with enough specificity to beat theme form styles. */
.resources-filter .resources-controls {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #e0e0e0;
}

.resources-filter .filter-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.resources-filter .resources-controls .resources-search,
.resources-filter .resources-controls .resources-category,
.resources-filter .resources-controls .resources-year {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  min-width: 150px;
  margin-bottom: 0px !important;
}

.resources-filter .resources-controls .resources-search {
  flex: 2;
  min-width: 200px;
}

.resources-filter .resources-controls .clear-filters {
  background: #5f7a2f;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.resources-filter .resources-controls .clear-filters:hover {
  background: #C6DEA1;
}

.resources-filter .resources-entries {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.resources-filter.js.is-loading .resources-entries {
  visibility: hidden;
}

.resource-image-and-title {
  display: flex;
  align-items: center;
  flex-direction: row;
  margin-bottom: 0.75em;
}

.resource-image-and-title img {
  height: 2em;
  width: auto;
  padding-right: 0.5em;
  flex-shrink: 0;
}

.resource-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #eae6c0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resource-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.resource-featured-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.resource-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resource-header {
  flex-shrink: 0;
  padding: 15px 20px 0 20px;
}

.resource-header h3 {
  margin: 0 0 0.5rem 0 !important;
  font-size: 1em;
  font-weight: bold;
  line-height: 1.35;
}

.resource-content {
  flex-grow: 1;
  padding: 0 20px;
}

.resource-content p {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.5;
}

.resource-button {
  flex-shrink: 0;
  padding: 0 20px 20px 20px;
}

.read-more {
  color: rgba(18, 18, 18, 0.44);
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

.resources-filter .no-results {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-style: italic;
  background: #f9f9f9;
  border-radius: 8px;
  border: 2px dashed #ddd;
}

/* Pagination */
.resources-filter .resources-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.resources-filter .resources-pagination button {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resources-filter .resources-pagination button:hover {
  background: #f0f0f0;
}

.resources-filter .resources-pagination button.active {
  background: #5f7a2f;
  color: white;
  border-color: #5f7a2f;
}

.resources-filter .resources-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 768px) {
  .resources-filter .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .resources-filter .resources-controls .resources-search,
  .resources-filter .resources-controls .resources-category,
  .resources-filter .resources-controls .resources-year,
  .resources-filter .resources-controls .clear-filters {
    width: 100%;
    min-width: auto;
  }

  .resources-filter .resources-entries {
    grid-template-columns: 1fr;
  }
}
