AltoCode
Teggiano

HTML
<!-- ============================================ -->
<!-- Gallery -->
<!-- ============================================ -->
<section id="gallery-1716">
<div class="cs-container">
<div class="cs-content">
<span class="cs-topper">Galleria</span>
<h2 class="cs-title">Alcuni dei Nostri Ricordi</h2>
<p class="cs-text">
Aqestic recusandae laudantium optio amet a quisquam saepe aliquid, voluptate praesentium dicta fuga dolor error.
</p>
<a href="" class="cs-button-solid">Scopri di Più</a>
</div>
<div class="cs-gallery">
<picture class="cs-picture">
<source media="(max-width: 600px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-1.jpg">
<source media="(min-width: 601px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-1.jpg">
<img loading="lazy" decoding="async"
src="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-1.jpg" alt="foto ricordo" width="480" height="549">
</picture>
<picture class="cs-picture">
<source media="(max-width: 600px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-2.jpg">
<source media="(min-width: 601px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-2.jpg">
<img loading="lazy" decoding="async"
src="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-2.jpg" alt="foto ricordo" width="480" height="549">
</picture>
<picture class="cs-picture">
<source media="(max-width: 600px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-3.jpg">
<source media="(min-width: 601px)"
srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-3.jpg">
<img loading="lazy" decoding="async"
src="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/enterprise-gallery-3.jpg" alt="foto ricordo" width="480" height="549">
</picture>
</div>
</div>
</section>
CSS
/*-- -------------------------- -->
<--- Gallery -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
#gallery-1716 {
padding: var(--sectionPadding);
position: relative;
z-index: 1;
overflow: hidden;
}
#gallery-1716 .cs-container {
width: 100%;
max-width: 80rem;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(3rem, 6vw, 4rem);
}
#gallery-1716 .cs-content {
text-align: left;
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
}
#gallery-1716 .cs-text {
margin-bottom: 1rem;
}
#gallery-1716 .cs-text:last-of-type {
margin-bottom: clamp(2rem, 7vw, 4rem);
}
#gallery-1716 .cs-text:last-of-type:before {
content: '';
width: 100%;
height: 80%;
background: var(--primary);
opacity: .1;
position: absolute;
display: block;
bottom: 0;
left: 0;
z-index: -1;
}
#gallery-1716 .cs-button-solid {
font-size: 1rem;
line-height: clamp(2.875rem, 5.5vw, 3.5rem);
text-decoration: none;
font-weight: 700;
text-align: center;
margin: 0;
color: #fff;
min-width: 9.375rem;
padding: 0 1.5rem;
background-color: var(--primary);
display: inline-block;
position: relative;
z-index: 1;
box-sizing: border-box;
}
#gallery-1716 .cs-button-solid:before {
content: '';
position: absolute;
height: 100%;
width: 0%;
background: #000;
opacity: 1;
top: 0;
left: 0;
z-index: -1;
transition: width .3s;
}
#gallery-1716 .cs-button-solid:hover:before {
width: 100%;
}
#gallery-1716 .cs-gallery {
width: 100%;
display: grid;
grid-template-columns: repeat(12, 1fr);
order: -1;
}
#gallery-1716 .cs-picture {
width: 100%;
height: 100vw;
max-height: 25rem;
display: block;
position: relative;
z-index: 1;
grid-column: span 4;
}
#gallery-1716 .cs-picture img {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
}
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
#gallery-1716 .cs-container {
flex-direction: row;
justify-content: space-between;
align-items: stretch;
}
#gallery-1716 .cs-content {
max-width: 19rem;
padding-bottom: clamp(2rem, 7vw, 4rem);
}
#gallery-1716 .cs-text:last-of-type {
position: relative;
z-index: 1;
}
#gallery-1716 .cs-text:last-of-type:before {
width: 250vw;
height: 100vw;
top: calc(100% + 1.8rem);
left: 50%;
transform: translateX(-50%);
}
#gallery-1716 .cs-gallery {
height: auto;
}
#gallery-1716 .cs-picture {
height: 100%;
max-height: 100%;
min-height: clamp(17.5rem, 37vw, 26.25rem);
}
}