/* Custom CSS for blog list and search results */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Blog list search box */
.blog-list-search-wrapper {
  margin: 0 0 40px;
}

.blog-list-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 8px 8px 24px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-list-search-form:focus-within {
  border-color: #e34035;
  box-shadow: 0 6px 24px rgba(227, 64, 53, 0.15);
}

.blog-list-search-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 10px 4px;
  color: #222;
  height: auto;
  min-height: 0;
  box-shadow: none !important;
}

.blog-list-search-input::placeholder {
  color: #999;
}

.blog-list-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #e34035;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.blog-list-search-btn:hover,
.blog-list-search-btn:focus {
  background: #c92b22;
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 575px) {
  .blog-list-search-form {
    padding: 6px 6px 6px 16px;
  }
  .blog-list-search-btn span {
    display: none;
  }
  .blog-list-search-btn {
    padding: 10px 14px;
  }
}

/* Search page: hide default search form (we render our own above) plus
   tabs/help link to keep the result list clean. */
.path-search-node form.search-form,
.path-search .tabs,
.path-search .search-help-link {
  display: none;
}

/* Search page: hide the redundant "Search results" h2 emitted by
   SearchController. The page H1 ("Search for {keys}") already labels
   the page; the H2 is duplicated. */
.path-search-node #block-seoc-content > h2:first-of-type {
  display: none;
}

/* Search results: keep the same look as the blog list (`blog-top-boxarea`)
   but tighten typography and spacing where needed. */
.search-results-list-wrapper {
  margin-top: 20px;
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results-list > li {
  margin: 0 0 30px;
}

/* Search results whose translation doesn't match the interface language
   are blanked in the preprocessor. Hide the entire <li> so they don't
   leave empty rows in the result list. */
.search-results-list > li.search-result--filtered {
  display: none;
}

/* When a search result has no image, the right column wrapper still
   exists in the template but renders empty. Hide the two spacer/image
   columns and let the content column take the full row. */
.search-result-card--no-image .row > div:nth-child(2),
.search-result-card--no-image .row > div:nth-child(3) {
  display: none;
}
.search-result-card--no-image .row > div:nth-child(1) {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Blog list teasers (blog view page_3 / block displays) use the same
   `blog-top-boxarea` horizontal layout. If a row's image cell is empty
   (node has no `field_image`), hide the spacer + image columns and let
   the content area take the full row. */
.blog-top-area .blog-top-boxarea .row:has(> div:nth-child(3) .images:empty) > div:nth-child(2),
.blog-top-area .blog-top-boxarea .row:has(> div:nth-child(3) .images:empty) > div:nth-child(3) {
  display: none;
}
.blog-top-area .blog-top-boxarea .row:has(> div:nth-child(3) .images:empty) > div:nth-child(1) {
  flex: 0 0 100%;
  max-width: 100%;
}

.search-result-card .search-result-title {
  margin: 6px 0 10px;
  font-size: 24px;
  line-height: 1.35;
}

.search-result-card .search-result-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.search-result-card .search-result-title a:hover {
  color: #e34035;
}

.search-result-card .search-result-excerpt {
  color: #555;
  line-height: 1.7;
  margin-bottom: 16px;
}

.search-result-card .search-result-readmore {
  display: inline-block;
  font-weight: 600;
  color: #e34035;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

.search-result-card .search-result-readmore:hover {
  color: #c92b22;
}

.search-result-card .images img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.search-result-empty {
  text-align: center;
  padding: 60px 20px;
  color: #777;
  font-size: 16px;
}
