/* Updates by O-S 202505 */
.single-resource__image img, .featured-resources img {
  max-width: 100%;
  height: auto;
}

.single-resource__content h1, .single-resource__content h2, .single-resource__content h3, .single-resource__content h4, .single-resource__content h5, .single-resource__content h6 {
  color: #444;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Featured resources */
.featured-resources {
  margin-bottom: 3rem;
  padding-left: max(1rem, calc((100vw - 1640px) / 2));
  padding-right: max(1rem, calc((100vw - 1640px) / 2));
}

.featured-resources h3 {
  color: black;
  text-align: center;
  font-size: 3rem;
}

.featured-resource-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .featured-resource-list {
    grid-template-columns: 1fr;
  }
}

.featured-resource-tile {
  background-color: #460;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  /* justify-content: space-between; */
}

.featured-resource-tile img {
  width: 100%;
  height: 240px;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.featured-resource-tile h4 {
  margin: 2rem 2rem 1rem !important;
  color: #fff !important;
  /* font-size: 2.5rem; */
}

.featured-resource-readbtn {
  margin-top: auto;;
}

.featured-resource-tile a.btn {
  color: white;
  text-decoration: none;
  border-color: #fff;
  border-radius: 0;
  text-align: center;
  margin: 0 2rem 2rem;
}

/* Resource section with filter */
.resource-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
  background-color: #f9f9f9;
  padding: 3rem 0;
  padding-left: max(2rem, calc((100vw - 1640px) / 2));
  padding-right: max(2rem, calc((100vw - 1640px) / 2));
}

.filter-sidebar {
  background: #fff;
  padding: 2rem;
  border: 2px solid #ddd;
  max-width: 510px;
}

.filter-sidebar__title-row {
  display: flex;
  justify-content: space-between;
}

.filter-sidebar h3 {
  color: black;
  font-size: 2rem;
}

.searchandfilter ul {
  padding-left: 0 !important;
  display: flex;
  flex-direction: column;
}

.searchandfilter h4 {
  font-size: 1.5rem;
  color: black;
}

.searchandfilter .cat-item label {
  font-size: 1rem;
}

.searchandfilter input[type="submit"] {
  background-color: #fff;
  color: #460;
  border: 2px solid #460;
  padding: 1rem 2rem;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
}

.searchandfilter input[type="submit"]:hover {
  background-color: #460;
  color: #fff;
}

.filter-reset a {
  text-transform: uppercase;
  font-size: 1.2rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.resource-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  background-color: #fff;
}

.resource-tile img {
  width: 100%;
  height: 220px;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.resource-tile h4 {
  margin: 1rem 1rem 0;
  color: black;
}

.resource-tile .excerpt {
  margin: 1rem 1rem 0;
}

.resource-readlink {
  margin-top: auto;
  margin-bottom: 1rem;
  margin-left: 1rem;
}

.resource-readlink a {
  text-decoration: underline;
}

.search-tile {
  grid-column: 1 / -1;
}

.search-tile__plugin ul {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.search-tile__plugin ul li:first-child {
  flex-grow: 1;
}

.search-tile__plugin input[type="text"] {
  width: 100%; 
  box-sizing: border-box;
  padding: 0.5rem;
  border: 2px solid #ddd;
}

.search-tile__plugin input[type="submit"] {
  white-space: nowrap;
  padding: 0.5rem 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .resource-section {
    grid-template-columns: 1fr 2fr;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .resource-grid {
    grid-template-columns: repeat(2, 1fr);;
  }
}
@media (max-width: 768px) {
  .resource-section {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }
}
