AltoCode

Parlasco

HTML


<!-- ============================================ -->
<!--                    CTA                       -->
<!-- ============================================ -->

<section id="cta-2353">
    <div class="cs-container">
        <div class="cs-content">
            <span class="cs-topper">Contattaci Ora</span>
            <h2 class="cs-title">Esplora i progetti realizzati e lasciati guidare da idee e soluzioni di interior design.</h2>
            <div class="cs-button-box">
                <a href="" class="cs-link">
                    <picture class="cs-icon-wrapper">
                        <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/phone-brown.svg" alt="icona" width="24" height="24">
                    </picture>
                    <div class="cs-info">
                        <span class="cs-desc">Vuoi Rinnovare Casa?</span>
                        <span class="cs-contact">Chiama al +39 123 456 78 90</span>
                    </div>
                </a>
                <a href="" class="cs-link">
                    <picture class="cs-icon-wrapper">
                        <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/mail-brown.svg" alt="icona" width="24" height="24">
                    </picture>
                    <div class="cs-info">
                        <span class="cs-desc">Vuoi Rinnovare Casa?</span>
                        <span class="cs-contact">Chiama al +39 123 456 78 90</span>
                    </div>
                </a>
            </div>
            <a href="" class="cs-button-solid">Richiedi Preventivo</a>
        </div>
        <picture class="cs-picture">
            <source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/building20.jpg">
            <source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/building20.jpg">
            <img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/building20.jpg" alt="interior design" width="1280" height="568">
        </picture>
    </div>
</section>

CSS


/*-- -------------------------- -->
<---            CTA             -->
<--- -------------------------- -*/

/* Mobile */
@media only screen and (min-width: 0rem) {
  #cta-2353 {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  #cta-2353 .cs-container {
    width: 100%;
    max-width: 112.5rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
  }
  #cta-2353 .cs-content {
    width: 100%;
    max-width: 52.125rem;
    padding: var(--sectionPadding);
  }
  #cta-2353 .cs-title {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  #cta-2353 .cs-button-box {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
    row-gap: 1rem;
  }
  #cta-2353 .cs-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
  }
  #cta-2353 .cs-icon-wrapper {
    width: clamp(3rem, 5vw, 3.75rem);
    height: clamp(3rem, 5vw, 3.75rem);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #cta-2353 .cs-icon {
    width: 1.5rem;
    height: auto;
    display: block;
  }
  #cta-2353 .cs-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  #cta-2353 .cs-desc {
    font-size: 1rem;
    line-height: 1.5em;
    color: var(--bodyTextColor);
    display: block;
  }
  #cta-2353 .cs-contact {
    font-size: 1.25rem;
    line-height: 1.2em;
    font-weight: 700;
    color: var(--bodyTextColor);
    display: block;
  }
  #cta-2353 .cs-button-solid {
    font-size: 1rem;
    text-decoration: none;
    line-height: clamp(2.875rem, 3vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 0 3rem;
    background-color: var(--primary);
    color: #fff;
    display: inline-block;
    position: relative;
    z-index: 1;
  }
  #cta-2353 .cs-button-solid:hover:before {
    width: 100%;
  }
  #cta-2353 .cs-button-solid:before {
    content: '';
    width: 0%;
    height: 100%;
    background: #1a1a1a;
    opacity: 1;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: width 0.3s;
  }
  #cta-2353 .cs-picture {
    width: 100%;
    height: 31.875rem;
    display: block;
    position: relative;
    z-index: 1;
    order: -1;
  }
  #cta-2353 .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) {
  #cta-2353 {
    padding: var(--sectionPadding);
    padding-top: 0;
    padding-bottom: 0;
  }
  #cta-2353 .cs-container {
    padding: var(--sectionPadding);
    padding-left: 0;
    padding-right: 0;
    align-items: flex-start;
  }
  #cta-2353 .cs-content {
    width: 47.5%;
    padding: 0;
  }
  #cta-2353 .cs-picture {
    width: 50vw;
    height: 100%;
    margin-left: clamp(2.5rem, 5vw, 3.75rem);
    position: absolute;
    top: 0;
    left: 50%;
  }
}