/* Контейнер картки */
.search-results .wp-block-tiptip-hyperlink-group-block{
  position: relative;
  background: #ececf2;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  overflow: hidden;
}

/* Сітка: велике фото зліва */
.search-results .card-inner{
  display: grid;
  grid-template-columns: 300px 1fr; /* як на макеті */
  gap: 20px;
  align-items: start;
}

/* Фото — повна висота блоку з фіксованою висотою */
.search-results .wp-block-group.relative{
  position: relative;
  height: 240px;           /* висота як на скріні */
  border-radius: 16px;
  overflow: hidden;
}
.search-results .card-image,
.search-results .card-image img,
.wp-block-post-featured-image,
.wp-block-post-featured-image img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 16px;
}

/* Текстова частина */
.search-results .card-body{ display:flex; flex-direction:column; gap:10px; width:100%; }
.search-results .card-title{ margin:0; font-size:26px; line-height:1.25; font-weight:800; color:#2c2f36; }
.search-results .card-excerpt{ margin:0; color:#1e2431; }
.search-results .card-date{ font-size:13px; color:#7a7f89; }

/* Градієнтна лінія з «крапкою» праворуч */
.search-results .card-bar{
  position: relative;
  height: 6px;
  border: none;
  margin: 8px 0 6px;
  background: linear-gradient(90deg,#c65094 0%, #4884c3 50%, #6c3088 100%);
  border-radius: 999px;
  opacity: 1;
}
/* Бейдж праворуч */
.search-results .badge{
  margin-left:auto;
  padding:.45rem .9rem;
  border-radius:999px;
  font-weight:700;
  font-size:13px;
  line-height:1;
  color:#fff;
  white-space:nowrap;
  background: linear-gradient(90deg,#c65094 0%, #4884c3 50%, #6c3088 100%);
  box-shadow:0 2px 4px rgba(0,0,0,.15);
}
.search-results .type-post .badge::after{ content:'Новина'; }
.search-results .type-page .badge::after{ content:'Сторінка'; }
.search-results .type-attachment .badge::after{ content:'PDF'; }

/* Адаптив */
@media (max-width:782px){
  .search-results .card-inner{ grid-template-columns:1fr; gap:14px; }
  .search-results .wp-block-group.relative{ height:180px; }
}

/* Fallback-зображення (коли немає <img>) */
.search-results .wp-block-group.relative:not(:has(> figure.wp-block-post-featured-image))::after,
.search-results .wp-block-group.relative > figure.wp-block-post-featured-image:empty::after{
  content:"";
  position:absolute;
  inset:0;
  background:url("/wp-content/uploads/2025/08/tools-profile.svg") center/contain no-repeat;
  border-radius:16px;
  pointer-events:none;
}

.search-results .page-control {
  display: none;
}




/* Сам блок пошуку */
.search-page-search.search-block-wrapper {
  width: 60rem;
  position: relative;
}
.search-page-search .wp-block-search {
  padding: 1rem;
}


.search-page-search .search-input-wrapper {
	position: absolute;
	width: 100%;
	bottom: 0;
  transform: translateY(50%);
}

/* Поле вводу */
.search-page-search .wp-block-search__input {
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 50px !important; /* місце під іконку */
  border-radius: 40px;
  border: 0;
  background-color: #fff;
  font-size: 16px;

  /* Іконка у фоні */
  background-repeat: no-repeat;
  background-position: 16px 50%;
  background-size: 20px 20px;
}

.search-page-search .wp-block-search__input:focus {
  outline: none;
}

/* Кнопка пошуку */
.search-page-search .wp-block-search__button {
  border-radius: 8px;
  margin-left: 0.5rem;
  background-color: #fff56e;
  color: #575756;
  transition: 0.3s ease-in-out;
  font-weight: 600;
}
a.btn-yellow-hover,
.btn-yellow-hover a  {
  transition: 0.3s ease-in-out;
}
.search-page-search .wp-block-search__button:hover,
a.btn-yellow-hover:hover,
.btn-yellow-hover:hover a {
  box-shadow: 0 0 0 2px #575756;
  z-index: 1;
}

.block-editor-rich-text__editable.wp-block-post-excerpt__more-link.rich-text {
  display: none !important;
}

p.wp-block-post-excerpt__excerpt {
  min-height: 5em;
  text-align: justify;
}

.search-title { display:none !important; }

body.has-search-query .search-title--with { display:block !important; }

body.has-empty-search .search-title--empty { display:block !important; }


@media (min-width: 961px) {
  .btn-search-mobile {
    display: none !important;
  }
}
@media (max-width: 960px) {
  .btn-search-pc button {
    display: none !important;
  }
  .search-page-search.search-block-wrapper {
    width: 100%;
  }
}

