@media (min-width: 580px) { .images { grid-template-columns: 25% 25% 25% 25%; } } img { height: auto; width: 100%; max-width: 100%; vertical-align: middle; } .template { transition: all 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955); opacity: 0; position: relative; background: #707070; } .template p { position: absolute; left: 0; bottom: 0; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; margin: 0; width: 100%; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); padding: 25px 10px 10px 10px; } .template.animate { transform: scale(1); opacity: 1; } #gallery-pagination { margin: 30px 0; } #btnNext, #btnPrevious { background: transparent; color: #609ea5; padding: 8px 28px; border: 0; font-size: 18px; cursor: pointer; outline: none; } #gallery-pagination #page { margin-left: 15px; margin-right: 15px; color: #707070; font-style: italic; font-size: 13px; } .sr-only { position: absolute !important; overflow: hidden; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; } #gallery-dots { margin-bottom: 15px; } .gallery-dot { background: #609ea5; border: 0; padding: 0; width: 50px; height: 8px; margin: 5px; opacity: 0.4; outline: none; cursor: pointer; } .gallery-dot.active { opacity: 1; } #gallery-pagination { display: grid; grid-template-columns: 1fr 3fr 1fr; align-items: start; }