/* ==== Gallery Base ==== */ .Gallery { background: #222; font-family: "Fira Sans", sans-serif; padding: 2rem 1rem; overflow: hidden; } * { box-sizing: border-box; } .gallery { display: flex; flex-wrap: wrap; width: 100%; max-width: 1300px; margin: auto; padding: 0; } .gallery__strip__wrapper { flex: 0 0 100%; background: #222; position: relative; border-right: none; } .gallery__strip { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .photo { position: relative; padding: 1rem 0; text-align: center; } .photo__image img { width: 90%; max-width: 100%; height: auto; border-radius: 10px; transform: translateX(30%); transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1) 0.2s; } .photo__name { text-transform: uppercase; font-size: 40px; letter-spacing: 2px; color: transparent; -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: white; margin-top: -25px; transition: 0.4s ease-in-out 0.4s; position: relative; width: 100%; } .photo:hover .photo__image img { transform: translateX(0%); } .photo:hover .photo__name { color: #fff; } /* ==== Animations ==== */ @keyframes move-it { 0%, 90%, 100% { transform: translateY(2%); } 45% { transform: translateY(-50%); } } @keyframes move-it-2 { 0%, 90%, 100% { transform: translateY(-50%); } 45% { transform: translateY(5%); } } /* ==== Responsive Layouts ==== */ @media (max-width: 599px) { .gallery__strip__wrapper { flex: 0 0 100%; } .gallery__strip { min-height: 70vh; } .photo__image img { width: 100%; transform: none; } .photo__name { font-size: 24px; margin-top: -15px; } } @media (min-width: 600px) and (max-width: 767px) { .gallery__strip__wrapper { flex: 0 0 50%; border-right: 2px solid #333; } .photo__image img { width: 90%; } } @media (min-width: 768px) and (max-width: 991px) { .gallery__strip__wrapper { flex: 0 0 50%; } .photo__image img { width: 90%; } } @media (min-width: 992px) and (max-width: 1199px) { .gallery__strip__wrapper { flex: 0 0 25%; border-right: 2px solid #333; } .gallery__strip { min-height: 100vh; } .gallery__strip.one { animation: 60s move-it ease alternate infinite 5s; transform: translateY(2%); } .gallery__strip.two { animation: 58s move-it-2 ease alternate infinite 5s; transform: translateY(-50%); } .gallery__strip.three { animation: 70s move-it ease alternate infinite 6s; transform: translateY(2%); } .gallery__strip.four { animation: 65s move-it-2 ease alternate infinite 5.5s; transform: translateY(-50%); } .gallery__strip:hover { animation-play-state: paused; } } @media (min-width: 1200px) { .gallery__strip__wrapper { flex: 0 0 25%; border-right: 2px solid #333; } .gallery__strip { min-height: 100vh; } .gallery__strip.one { animation: 60s move-it ease alternate infinite 5s; transform: translateY(2%); } .gallery__strip.two { animation: 58s move-it-2 ease alternate infinite 5s; transform: translateY(-50%); } .gallery__strip.three { animation: 70s move-it ease alternate infinite 6s; transform: translateY(2%); } .gallery__strip.four { animation: 65s move-it-2 ease alternate infinite 5.5s; transform: translateY(-50%); } .gallery__strip:hover { animation-play-state: paused; } }