.acf-rpg-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.acf-rpg-card{
  position:relative;
  border:1px solid rgba(0,0,0,.08);
  overflow:hidden;
}

.acf-rpg-card-link{
  position:absolute;
  inset:0;
  z-index:2;
  display:block;
}

.acf-rpg-thumb{
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Flex container */
.acf-rpg-thumb-inner{
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* Elementor overrides */
  align-items: center;     /* Elementor overrides */
}

/* Prevent theme styles forcing full width */
.acf-rpg-thumb .acf-rpg-thumb-link{
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
}

/* Default image behaviour */
.acf-rpg-thumb img{
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* COVER = fills box (alignment not visually obvious) */
.acf-rpg-thumb.acf-rpg-fit-cover img{
  width: 100%;
  height: 100%;
}

/* CONTAIN = shrink-wrap (alignment clearly visible) */
.acf-rpg-thumb.acf-rpg-fit-contain img{
  width: auto;
  height: auto;
}



.acf-rpg-card-inner{
  position:relative;
  z-index:3; /* keep text links above overlay */
  padding:14px;
}

.acf-rpg-title{
  margin: 0 0 8px;
  font-size: 1.05em;
  line-height: 1.2;
}

.acf-rpg-title a{
  text-decoration:none;
}

.acf-rpg-excerpt{
  margin: 0;
  opacity: .9;
}

.acf-rpg-notice{
  padding: 12px 14px;
  border: 1px dashed rgba(0,0,0,.3);
}

/* Hover lift effect (can be toggled off from Elementor) */
.acf-rpg-has-hover .acf-rpg-card{
  transition: transform .18s ease;
}
.acf-rpg-has-hover .acf-rpg-card:hover{
  transform: translateY(-3px);
}
