.pagination{
display:flex;
justify-content:center;
margin-top:25px;
gap:6px;
}

.pagination a{
color:#003366;
padding:8px 14px;
text-decoration:none;
border:1px solid #e5e5e5;
border-radius:4px;
background:#ffffff;
font-weight:500;
transition:all .25s ease;
}

/* Active page */
.pagination a.active{
background:#003366;
color:#ffffff;
border-color:#003366;
}

/* Hover */
.pagination a:hover:not(.active){
background:#f3f7ff;
color:#cc0000;
border-color:#cc0000;
}

.gallery img {
  display: block;
  width: 100%;
}
.gallery figure {
  --gallery-height: 15rem;

  /* reset figure default margin */
  margin: 0;
  height: var(--gallery-height);
  background-color: hsl(200, 85%, 2%);
}
.gallery img {
  display: block;
  width: 100%;
  object-fit: cover;
  height: var(--gallery-height);
}
/* Add aspect-ratio custom property */
.gallery figure {
  --gallery-aspect-ratio: 4/3;
}

@supports (aspect-ratio: 1) {
  .gallery figure,
  .gallery img {
    aspect-ratio: var(--gallery-aspect-ratio);
    /* Remove height to prevent distorting aspect-ratio */
    height: auto;
  }
}
.gallery figure {
  /* ...existing styles */

  display: grid;
  grid-template-areas: "card";
  place-items: end;
  border-radius: 0.5rem;
  overflow: hidden;
}

.gallery figure > * {
  grid-area: card;
}


.gallery figcaption {
  transform: translateY(100%);
  transition: transform 800ms ease-in;

  /* Visual styles for the caption */
  padding: 0.25em 0.5em;
  border-radius: 4px 0 0 0;
  background-color: hsl(0 0% 100% / 87%);
}

.gallery figure:hover figcaption {
  transform: translateY(0);
}
.gallery img {
  transform: scale(1) translate(0, 0);
  transition: transform 1200ms ease-in;
}

.gallery figure:hover img {
  transform: scale(1.3) translate(-8%, -3%);
}

.gallery figcaption {
  /* added 400ms delay */
  transition: transform 800ms 400ms ease-in;
}
.gallery figure:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.gallery figure:hover figcaption,
.gallery figure:focus figcaption {
  transform: translateY(0);
}

.gallery figure:hover img,
.gallery figure:focus img {
  transform: scale(1.3) translate(-8%, -3%);
}