#pbgallery a {
    padding: 1.5rem;
    border: 1px solid #cccccc;
    border-radius: 10px;
    position: relative;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: start;
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 3/4;
}

#pbgallery a.image {
    aspect-ratio: 1/1;
}

#pbgallery a.image:has(> img)::after {
    content: unset;
}

#pbgallery h3, #pbgallery a .h2 {
    color: #ff5757;
}

#pbgallery div:not(.preheader) > a:hover {
    box-shadow: 0px 0px 35px 0px rgba(0, 0, 0, 0.75);
}

#pbgallery a > img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    object-fit: cover;
    object-position: center;
    z-index: -1;
    width: 100%;
    height: 100%;
}

#pbgallery .preheader > a:has(> img)::after,
#pbgallery a:has(> img)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    background-color: rgba(255, 255, 255, 0.95);
    /*background-color: rgba(255, 87, 87, 0.85);*/
}

#pbgallery .preheader > a:has(> img)::after {
    background-color: rgba(255, 87, 87, 0.85);
}

#pbgallery a > div {
    display: flex;
    flex-direction: column;
    justify-content: start;
    width: 100%;
    height: 100%;
    text-align: start;
    position: relative;
    z-index: 1;
}

#pbgallery a > div > p:last-of-type {
    margin-bottom: 1.5rem;
}

#pbgallery .preheader > a span {
    color: #ff5757;
    background-color: #ffffff;
    border-color: #ffffff;
}

#pbgallery .preheader > a:hover span {
    color: #ffffff;
    background-color: #ff5757;
    border-color: #ff5757;
}

#pbgallery a > h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-weight: bold;
}