AltoCode

Crissolo

HTML


<!-- ============================================ -->
<!--                     Hero                     -->
<!-- ============================================ -->

<section id="hero-1951">
    <div class="cs-container">
        <div class="cs-content">
            <h2 class="cs-title">Sapori Autentici, Ricette Di Casa!</h2>
            <p class="cs-text">
                Ricette ispirate alla tradizione, ingredienti genuini e profumi che sanno di casa. Dolci semplici, preparati con passione, da condividere e ricordare.
            </p>
            <a class="cs-button-solid" href="">Scopri il Menu</a>
            <div class="cs-reviews">
                <div class="cs-reviews-flex">
                    <img class="cs-reviews-img" decoding="async" fetchpriority="high" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/hero-profile1.png" alt="icona" width="48" height="48">
                    <img class="cs-reviews-img" decoding="async" fetchpriority="high" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/hero-profile2.png" alt="icona" width="48" height="48">
                    <img class="cs-reviews-img" decoding="async" fetchpriority="high" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/hero-profile3.png" alt="icona" width="48" height="48">
                    <img class="cs-reviews-img" decoding="async" fetchpriority="high" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/hero-profile4.png" alt="icona" width="48" height="48">
                    <span class="cs-reviews-number">+4k</span>
                </div>
                <div class="cs-flex">
                    <h3 class="cs-rating">Recensioni<img class="cs-rating-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/lil-star.svg" alt="stella" width="16" height="16" loading="lazy" decoding="async">5.0</h3>
                    <p class="cs-reviews-text">Siamo Amati da Tutto il Mondo</p>
                </div>
            </div>
        </div>
        <div class="cs-image-group">
            <picture class="cs-picture cs-left">
                <source media="(max-width: 600px)" srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/pancakes.jpg">
                <source media="(min-width: 601px)" srcset="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/pancakes.jpg">
                <img decoding="async" src="https://csimages2.nyc3.digitaloceanspaces.com/Images/MISC/pancakes.jpg" alt="pancake" width="305" height="600" aria-hidden="true">
            </picture>
            <img class="cs-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Graphics/highlight.svg" alt="icona" width="169" height="100" loading="lazy" decoding="async">
            <picture class="cs-picture cs-right">
                <source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/sushi.jpeg">
                <source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/sushi.jpeg">
                <img decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/sushi.jpeg" alt="sushi" width="305" height="600" aria-hidden="true">
            </picture>
        </div>
    </div>
</section>

CSS


/*-- -------------------------- -->
<---            Hero            -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #hero-1951 {
    padding: var(--sectionPadding);
    position: relative;
    z-index: 1;
  }
  #hero-1951 .cs-container {
    width: 100%;
    max-width: 44rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: clamp(3rem, 6vw, 4rem);
  }
  #hero-1951 .cs-content {
    text-align: center;
    width: 100%;
    max-width: 32.625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #hero-1951 .cs-title {
    font-size: clamp(2.4375rem, 5vw, 3.8125rem);
  }
  #hero-1951 .cs-text {
    margin-bottom: 1.25rem;
  }
  #hero-1951 .cs-button-solid {
    font-size: 1rem;
    font-weight: 700;
    line-height: clamp(2.875rem, 5.5vw, 3.5rem);
    text-align: center;
    text-decoration: none;
    min-width: 9.375rem;
    margin: 0;
    box-sizing: border-box;
    padding: 0 clamp(2rem, 4vw, 3rem);
    background-color: var(--primary);
    overflow: hidden;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    display: inline-block;
    position: relative;
    z-index: 1;
  }
  #hero-1951 .cs-button-solid:before {
    content: "";
    width: 0%;
    height: 100%;
    background: #000;
    opacity: 1;
    border-radius: 0.25rem;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: width 0.3s;
  }
  #hero-1951 .cs-button-solid:hover:before {
    width: 100%;
  }
  #hero-1951 .cs-reviews {
    text-align: center;
    margin-top: clamp(2.5rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  #hero-1951 .cs-reviews-flex {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  #hero-1951 .cs-reviews-img {
    width: 3rem;
    height: auto;
    margin: 0 -1rem 0 0;
    border: 1px solid #fff;
    border-radius: 50%;
  }
  #hero-1951 .cs-reviews-number {
    font-size: 1rem;
    font-weight: 700;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    color: var(--bodyTextColorWhite);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #hero-1951 .cs-flex {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  #hero-1951 .cs-rating {
    font-size: clamp(1.25rem, 2.5vw, 1.5625rem);
    font-weight: 700;
    line-height: 1.2em;
    margin: 0;
    color: var(--headerColor);
  }
  #hero-1951 .cs-rating-icon {
    width: 1rem;
    height: auto;
    margin: 0 0.25rem;
  }
  #hero-1951 .cs-reviews-text {
    font-size: clamp(0.875rem, 1.75vw, 1rem);
    line-height: 1.5em;
    margin: 0;
    color: var(--bodyTextColor);
  }
  #hero-1951 .cs-image-group {
    font-size: min(2.3vw, 1rem);
    width: 39.375em;
    height: 43.125em;
    position: relative;
    z-index: 1;
  }
  #hero-1951 .cs-picture {
    width: 19.0625em;
    height: 37.5em;
    margin: 0;
    overflow: hidden;
    border-radius: 37.5em;
    display: block;
    position: absolute;
    top: 0.75em;
    left: 0;
    z-index: 1;
  }
  #hero-1951 .cs-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
  }
  #hero-1951 .cs-icon {
    width: 12.6875em;
    height: auto;
    position: absolute;
    top: 0;
    left: 13.125em;
  }
  #hero-1951 .cs-right {
    bottom: 0;
    top: auto;
    left: auto;
    right: 0;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #hero-1951 .cs-reviews {
    text-align: left;
    flex-direction: row;
  }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #hero-1951 .cs-container {
    max-width: 80rem;
    flex-direction: row;
    align-items: stretch;
  }
  #hero-1951 .cs-content {
    text-align: left;
    padding: clamp(3rem, 6vw, 5rem) 0;
    align-items: flex-start;
    align-self: center;
  }
  #hero-1951 .cs-image-group {
    font-size: min(1.12vw, 1rem);
    height: auto;
    min-height: 43.125em;
    flex: none;
  }
  #hero-1951 .cs-left {
    height: auto;
    top: 0.75em;
    bottom: 4.875em;
  }
  #hero-1951 .cs-right {
    height: auto;
    top: 5.625em;
    bottom: 0em;
  }
}