.cta-template {
    position: relative;
    background-color: var(--rp-bright-red);
    overflow: hidden;
}

.cta-template .container {
    max-width: 1440px;
}

.cta-template::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background-image: url(../images/bg-texture-hero.webp);
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* CTA Template 1 */
.cta-template-1 .cta-image-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 660px;
    z-index: 1;
}

.cta-template-1 .cta-content-col {
    position: relative;
    z-index: 1;
    padding: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-template-1 .cta-content-col h2 {
    color: var(--rp-white);
    font-family: var(--font-heading);
    font-size: var(--heading-lg-size);
    line-height: var(--heading-lg-line);
    font-weight: var(--weight-bold);
    margin-bottom: 18px;
}

.cta-template-1 .cta-content-col p {
    color: var(--rp-white);
    font-family: var(--font-body);
    font-size: var(--paragraph-lg-size);
    line-height: var(--paragraph-lg-line);
    font-weight: var(--weight-regular);
    margin-bottom: 30px;
}

.cta-template-1 .cta-image {
    width: 465px;
    position: relative;
    z-index: 2;
}

.cta-template .arrow-bottom {
    position: absolute;
    bottom: -120px;
    left: inherit;
    right: 70px;
    width: 310px;
    pointer-events: none;
    will-change: transform;
}

.cta-image-col-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;

    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.cta-image-col-bg .shape-black {
    width: 475px;
    height: 388px;
    margin-left: -100px;
    z-index: 1;
}

.cta-image-col-bg .shape-pale-pink {
    width: 391px;
    height: 391px;
    margin-right: -100px;
    z-index: 1;
}

/* Continuous floating animation */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.cta-image-col-bg::before {
    content: "";
    position: absolute;
    background: url(../icons/asterisk-with-arrow.svg) no-repeat center center;
    top: 40px;
    right: 8px;
    width: 229px;
    height: 229px;
    z-index: 1;
    animation: floatUpDown 3s ease-in-out infinite;
}

/* Initial slide in, then continuous float */
.cta-image-col-bg::before {
    animation: floatUpDown 3s ease-in-out infinite;
    opacity: 1;
}



/* CTA Image Animations - Slide In Up */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial hidden state */
.cta-image-col-bg .shape-pale-pink,
.cta-image-col-bg .shape-black,
.cta-image-col-bg::before,
.cta-image img {
    opacity: 0;
}

/* Animated state - triggered by JS */
.cta-image-col-bg .shape-pale-pink.animate {
    animation: slideInUp 0.7s ease-out forwards;
    animation-delay: 0s;
}

.cta-image-col-bg .shape-black.animate {
    animation: slideInUp 0.7s ease-out forwards;
    animation-delay: 0.2s;
}

.cta-image-col-bg.animate::before {
    animation: floatUpDown 3s ease-in-out infinite;
    opacity: 1;
}

.cta-image img.animate {
    animation: slideInUp 0.7s ease-out forwards;
    animation-delay: 0.6s;
}


@media screen and (max-width: 991.98px) {
    .cta-template-1 .cta-content-col {
        padding: 60px 20px 40px;
    }

    .cta-template-1 .cta-image-col {
        min-height: 450px;
    }
    .cta-template-1 .cta-image {
        width: 80%;
        height: auto;
    }

    .cta-image-col-bg .shape-pale-pink {
        width: 80%;
        height: auto;
        margin-left: -50px;
    }

    .cta-image-col-bg .shape-black {
        width: 80%;
        height: auto;
        margin-right: -50px;
    }

    .cta-image-col-bg::before {
        width: 177px;
        height: 177px;
        background-size: contain;
        top: 0;
        right: 0;
    }

    .cta-template-1 .cta-content-col h2 {
        margin-bottom: 12px;
    }
}

/* ===================================
   CTA Template 2
   =================================== */

.cta-template-2 {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

.cta-template-2 .container {
    position: relative;
    z-index: 1;

}

.cta-template-2 .cta-image-col {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.cta-template-2 .cta-image-wrapper {
    position: relative;
    height: 500px;
}

.cta-template-2 .cta-image-bg {
    position: absolute;
    bottom: 0;
    left: -50px;
    width: 400px;
    height: 450px;
    z-index: 1;
}

.cta-template-2 .shape-pale-pink {
    position: absolute;
    width: 100%;
    height: auto;
    bottom: 0;
    left: -25px;
}

.cta-template-2 .shape-black {
    position: absolute;
    width: 100%;
    height: auto;
    bottom: 0;
    left: 120px;
}

.cta-template-2 .cta-image {
    position: relative;
    z-index: 2;
    height: 100%;
}

.cta-template-2 .cta-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom left;
}

.cta-template-2 .decorative-arrow {
    position: absolute;
    top: 0;
    right: -50px;
    width: 240px;
    z-index: 3;
}

.cta-template-2 .decorative-arrow img {
    width: 100%;
    height: auto;
}


.cta-template-2 .cta-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 680px;
}

.cta-template-2 .cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

/* Icon Boxes Grid */
.cta-template-2 .icon-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}


.cta-template-2 .icon-box-icon {
    width: 41px;
    height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-template-2 .icon-box-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.cta-template-2 .icon-box-text {
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
    margin: 0;
}

.cta-template-2 .cta-button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* CTA Template 3 */

.cta-template-3 .cta-content p {
    color: var(--rp-white);
    max-width: 680px;
    
}

/* Responsive */
@media (max-width: 1200px) {
    .cta-template-2 .cta-content {
        padding-left: 0;
    }

    .cta-template-2 .cta-image-wrapper {
        height: 400px;
    }

    .cta-template-2 .decorative-arrow {
        width: 220px;
    }

    .cta-template-2 .cta-image img {
        width: 350px;
    }

    .cta-template-2 .shape-black,
    .cta-template-2 .shape-pale-pink {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .cta-template-2 {
        padding: 60px 20px;
        padding-bottom: 0px;
    }

    .cta-template-2 .container {
        padding: 0;
    }

    .cta-template-2 .row {
        gap: 60px;
    }

    .cta-template-2 .cta-title {
        font-size: var(--heading-mobile-lg-size);
        line-height: var(--heading-mobile-lg-line);
        max-width: 100%;
    }

    .cta-template-1 .cta-content-col p {
        font-size: var(--paragraph-md-size);
        line-height: var(--paragraph-md-line);
    }

    .cta-template-2 .icon-boxes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }

    .cta-template-2 .icon-box-icon img {
        width: 34px;
        height: auto;
        
    }

    .cta-template-2 .cta-image-wrapper {
        height: 350px;
    }

    .cta-template-2 .cta-image-bg {
        left: -30px;
    }

    .cta-template-2 .cta-image-col {
        order: 2;
    }

    .cta-template-1 .cta-content-col h2 {
        font-size: var(--heading-mobile-lg-line);
        line-height: var(--heading-mobile-lg-line);
    }
}

@media (max-width: 576px) {

    .cta-template-2 .icon-box-icon {
        width: 50px;
        height: 50px;
    }

    .cta-template-2 .shape-black, .cta-template-2 .shape-pale-pink {
        width: 200px;
    }
}
