/* ===== СЕТКА ===== */
.aad-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:22px;
}

/* ===== КАРТОЧКА ===== */
.aad-card{
  background:#f9f9f9;
  border-radius:12px;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
  padding:14px 14px 16px;
  text-align:center;
}

/* Ровная миниатюра */
.aad-thumb{
  display:block;
  width:100%;
  aspect-ratio:var(--aad-ratio, 4/3);
  border-radius:10px;
  overflow:hidden;
  background:#eee;
}
.aad-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.aad-noimg{
  display:grid; place-items:center;
  width:100%; height:100%;
  color:#9aa0a6; font-size:14px;
}

/* Текст */
.aad-title{ font-size:18px; font-weight:800; margin:12px 0 6px; }
.aad-title a{ color:#6c0e2e; text-decoration:none; }
.aad-title a:hover{ text-decoration:underline; }
.aad-date{ margin:0; font-size:14px; color:#888; }

/* ===== ПАГИНАЦИЯ ===== */
.aad-pagination{
  margin:28px 0 48px;           /* «подушка» от футера */
  text-align:center;
  position:relative;
  z-index:50;                    /* выше футера/оверлеев темы */
  pointer-events:auto;
}
.aad-pager{
  display:inline-flex;
  gap:8px;
  list-style:none;
  margin:0; padding:0;
}
.aad-page-item{ position:relative; z-index:50; }
.aad-page-item .page-numbers{
  display:inline-block;
  min-width:36px;
  padding:8px 12px;
  border-radius:8px;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  text-decoration:none;
  color:#333;
  font-weight:600;
  position:relative;
  z-index:50;
}
.aad-page-item .page-numbers.current{
  background:#6c0e2e;
  color:#fff;
}
.aad-page-item .page-numbers:hover{
  text-decoration:none;
  filter:brightness(0.97);
}

/* Если у темы футер/оверлей с огромным z-index — опустим слой */
.site-footer, footer, .elementor-location-footer{
  position:relative;
  z-index:1;
}

@media (max-width:768px){
  .aad-grid{ gap:16px; }
  .aad-page-item .page-numbers{ min-width:32px; padding:6px 10px; }
}
