/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Jul 01 2026 | 19:26:57 */
/****************************************************
  RA NEWS — одинаковая высота карточек + ровный футер
  (Royal Elementor: Post Grid) — устойчивая версия
****************************************************/

/* 0) Сетка и базовые отступы */
.ra-news-custom .wpr-grid { gap: 0px !important; }
.ra-news-custom .wpr-grid-item { margin: 0 0 24 !important; }

/* 1) Карточка — flex-колонка на всю высоту (стабильно) */
.ra-news-custom .wpr-grid-item-inner{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 16px !important;
  box-sizing: border-box;

  /* ВАЖНО: оставляем hidden — так карточки не «расползаются» */
  overflow: hidden !important;

  box-shadow: none !important;
  background-clip: padding-box;
}

/* 2) Медиа-блок (картинка) — фиксированная высота и красивая обрезка */
.ra-news-custom .wpr-grid-media-wrap{ overflow: hidden !important; }
.ra-news-custom .wpr-grid-image-wrap img{
  display: block;
  width: 100% !important;
  height: 206px !important;        /* при необходимости подстрой */
  object-fit: cover !important;
}

/* 3) Контент тянется, чтобы выровнять высоту всех карточек */
.ra-news-custom .wpr-grid-content-wrap{
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0;
}

/* 4) Нижний блок — стабильная 3-рядная grid:
      1) заголовок; 2) эластичный spacer; 3) футер (Подробнее слева, дата справа) */
.ra-news-custom .wpr-grid-item-below-content{
  display: grid !important;
  grid-template-columns: 1fr auto;   /* слева — ссылка, справа — дата */
  grid-template-rows: auto 1fr auto; /* title / spacer / footer */
  row-gap: 10px;
  column-gap: 14px;                   /* безопасный зазор между текстами */
  margin-top: auto;                   /* прижим к низу карточки */
  min-height: 0;
}

/* 4.1) Заголовок — на всю ширину, мягкая обрезка в 2 строки (можно 3) */
.ra-news-custom .wpr-grid-item-below-content > .wpr-grid-item-title{
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  margin: 0 0 4px 0 !important;
}
.ra-news-custom .wpr-grid-item-title a{
  display: -webkit-box;
  -webkit-line-clamp: 2;            /* ← поставь 3, если нужно три строки */
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* чтобы короткие заголовки были «сверху» блока */
  -webkit-box-pack: start;
}

/* 4.2) Эластичный spacer — забирает лишнюю высоту */
.ra-news-custom .wpr-grid-item-below-content::before{
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
}

/* 4.3) Футер: слева «Подробнее», справа — дата — всегда на одной линии снизу */
.ra-news-custom .wpr-grid-item-below-content > .wpr-grid-item-read-more{
  grid-column: 1 !important;
  grid-row: 3 !important;
  justify-self: start;
}
.ra-news-custom .wpr-grid-item-below-content > .wpr-grid-item-date{
  grid-column: 2 !important;
  grid-row: 3 !important;
  justify-self: end;
  align-self: end;
  white-space: nowrap;
  margin: 0 !important;
  color: #788696;
  font-size: 14px;
}

/* 5) «Подробнее» — стиль и стрелка БЕЗ transform (чтобы ничего не резалось) */
.ra-news-custom .wpr-grid-item-read-more a{
  display: inline-flex;
  align-items: center;
  gap: 2px;

  /* даём запас справа; всё остаётся внутри ссылки — ничего не обрежется */
  padding-right: 14px !important;
  white-space: nowrap;
  overflow: hidden;

  color: #788696;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color .25s ease;
  position: relative;
}
.ra-news-custom .wpr-grid-item-read-more a::after{
  content: "→";
  display: inline-block;
  margin-left: 4px;                 /* базовый зазор */
  transition: margin-left .25s ease;/* «уход» вправо — в пределах padding */
}
.ra-news-custom .wpr-grid-item-read-more a:hover{ color: #2C9347; }
.ra-news-custom .wpr-grid-item-read-more a:hover::after{ margin-left: 8px; }

/* 6) Фильтры — линия и активное подчёркивание */
.ra-news-custom .wpr-grid-filters{
  display: flex !important;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  border-bottom: 2px solid #EAEAEA;
}
.ra-news-custom .wpr-grid-filters .wpr-grid-filters-item{
  position: relative;
  display: inline-block;
  padding-bottom: 24px;
  cursor: pointer;
  transition: color .25s ease;
  color: #788696;
}
.ra-news-custom .wpr-grid-filters li.wpr-active-filter > .wpr-grid-filters-item,
.ra-news-custom .wpr-grid-filters .wpr-grid-filters-item.wpr-active-filter{
  color: #204C7E !important;
}
.ra-news-custom .wpr-grid-filters li.wpr-active-filter > .wpr-grid-filters-item::after,
.ra-news-custom .wpr-grid-filters .wpr-grid-filters-item.wpr-active-filter::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: #204C7E;
}
.ra-news-custom .wpr-grid-filters li:not(.wpr-active-filter) > .wpr-grid-filters-item:hover{
  color: #204C7E;
}

/* 7) Кнопка «Показать ещё» (во всю ширину) */
.wpr-grid-pagination .wpr-load-more-btn{
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 21px;
  background-color: #2C9347;
  color: #fff;
  border: none; border-radius: 0;
  font-family: "Tilda Sans", Arial, sans-serif;
  font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: -0.3px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wpr-grid-pagination .wpr-load-more-btn:active{
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
@media (hover:hover) and (pointer:fine){
  .wpr-grid-pagination .wpr-load-more-btn:hover{
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
  }
}
.wpr-grid-pagination .wpr-load-more-btn,
.wpr-grid-pagination .wpr-load-more-btn:hover,
.wpr-grid-pagination .wpr-load-more-btn:focus,
.wpr-grid-pagination .wpr-load-more-btn:active{
  background-color: #2C9347 !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* 8) На тач-устройствах — без hover-анимаций картинок/карточек */
@media (hover: none), (pointer: coarse){
  .ra-news-custom .wpr-grid-media-hover,
  .ra-news-custom .wpr-grid-media-hover-bg{
    opacity: 0 !important; transform: none !important;
  }
  .ra-news-custom .wpr-grid-item:hover .wpr-grid-item-inner,
  .ra-news-custom .wpr-grid-item-inner{
    transform: none !important; box-shadow: none !important;
  }
}


/* === MOBILE FIX: вертикальные отступы между карточками === */
@media (max-width: 767px) {
  /* если у контейнера сохраняется grid — пусть работает gap */
  .ra-news-custom .wpr-grid {
    row-gap: 18px !important;     /* можно 16–24 по вкусу */
    column-gap: 0 !important;
  }

  /* страховка на случай, если плагин на мобилке ставит display:block и gap не работает */
  .ra-news-custom .wpr-grid-item {
    margin: 0 0 18px 0 !important; /* вертикальный отступ между карточками */
  }
  .ra-news-custom .wpr-grid-item:last-child {
    margin-bottom: 0 !important;
  }
}
