.gallery {
    padding-bottom: 120px;
}

.gallery h2 {
	font-family: 'cooper_hewittbold', Helvetica, Calibri, sans-serif;
	font-size: clamp(1.6em, 3vw, 2.36em);
	padding: 20px 0 0 0;
	margin-bottom: 40px;
	color: #151b45;
	border-bottom: 5px solid #151b45;
}
.gallery  h2 a {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

/* programme links */
.gallery  h2 a, .gallery h2 a:link,.gallery  h2 a:visited {
    color: #151b45;
    text-decoration: none;
    display: block;
    transform-origin: left; 
   transition: all .2s ease-in-out;
}
.gallery h2 a:hover, .gallery h2 a:active, .gallery h2 a:focus-visible {
    transform: scale(1.05);
}

.gallery ul {
    display: grid;
    gap: var(--gap, 20px);
    grid-template-columns: repeat(var(--grid-type, auto-fit), minmax(min(164px, 100%), 1fr));
    width: 80%;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    padding: 0;
}

/* for programmes with only 1 page */
.gallery ul li:only-child {
   grid-template-columns: 1fr; 
   justify-items: center; 
}

/* adjust max-wdith + centre */
.gallery ul li:only-child {
   max-width: 460px; 
   margin: 0 auto; 
}

.gallery figure {
	position: relative;
	border: 1px solid rgba(21, 27, 69, .25);
	overflow: hidden;
}
.gallery a figure {
	position: relative;
	border: 1px solid #151B45;
	overflow: hidden;
}
.gallery figure img {
    aspect-ratio: 1;
	object-fit: cover;
}


.gallery figcaption {
	position: absolute;
	bottom: 0;
	width: 100%;
	padding: 6px;
	background: rgba(255,255,255,.75);
	color: #151B45;
}
.gallery a figure img {
	transition: all .2s ease-in-out;	
}
.gallery ul a:link, .gallery ul a:visited {

}
.gallery ul a:hover figure img, .gallery ul a:active figure img, .gallery ul a:focus-visible figure img {
	transform: scale(1.1);
}