/**
 * CTA Banner Block Styles
 */

.cta-banner-block {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.cta-content {
    transform-origin: center;
    position: relative;
    z-index: 10;
}

/* Initial animation states - will be overridden by GSAP */
/* If JS fails to load, content will be visible after 1 second */
.cta-banner-block .cta-content {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    animation: fallback-show 0.5s ease forwards 1s;
}

.cta-banner-block .cta-heading,
.cta-banner-block .cta-form,
.cta-banner-block .cta-social {
    opacity: 0;
    transform: translateY(20px);
}

.cta-banner-block .social-link {
    opacity: 0;
    transform: scale(0);
}

/* Fallback animation if GSAP doesn't load */
@keyframes fallback-show {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Override fallback when GSAP is animating */
.cta-banner-block.gsap-animating .cta-content {
    animation: none;
}

/* Form styling */
.cta-form {
    opacity: 1;
}

.cta-form .frm_fields_container {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

/* Flexbox layout for form fields */
.cta-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.cta-form .frm_form_field {
    flex: 1 1 100%;
    margin-bottom: 0;
    width: 100%;
}

.cta-form #frm_field_6_container {
    flex: 0;
}

.cta-form .frm_form_fields {
    width: 100%;
}

.cta-form .frm_submit {
    flex: 0 0 56px;
    margin-bottom: 0;
    width: 56px;
}

/* Make textarea and certain fields full width */
.cta-form .frm_form_field:has(textarea),
.cta-form .frm_form_field.frm_full_width {
    flex: 1 1 100%;
}

.cta-form input[type="text"],
.cta-form input[type="email"],
.cta-form input[type="tel"],
.cta-form input[type="url"],
.cta-form textarea,
.cta-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #145381;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    background-color: #145381;
    color: #ffffff;
}

.cta-form input[type="text"]:focus,
.cta-form input[type="email"]:focus,
.cta-form input[type="tel"]:focus,
.cta-form input[type="url"]:focus,
.cta-form textarea:focus,
.cta-form select:focus {
    outline: none;
    border-color: #A6D9FF;
    background-color: #145381;
    box-shadow: 0 0 0 3px rgba(166, 217, 255, 0.2);
}

.cta-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
}

/* Submit button with SVG icon */
.cta-form button[type="submit"],
.cta-form input[type="submit"] {
    background-color: #A6D9FF;
    color: transparent;
    padding: 0;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 0.5rem;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cta-form button[type="submit"]::before,
.cta-form input[type="submit"]::before {
    content: '';
    position: absolute;
    width: 29px;
    height: 25px;
    background-image: url('data:image/svg+xml;utf8,<svg width="29" height="25" viewBox="0 0 29 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.21403 12.6929L0.138916 12.1484L27.7592 0.261475L27.9087 0.735615L7.21403 12.6929ZM2.2538 11.796L7.09485 12.1684L23.8526 2.48628L2.2538 11.796Z" fill="%2314598C"/><path d="M27.5707 0.337925L6.85596 12.3065L8.85474 19.8023L14.1191 14.5375L13.6347 14.295L9.12135 18.8088L7.4539 12.5546L26.2166 1.71308L25.9623 1.96736L27.7798 0.513608L27.5429 1.11309L27.9744 0.681586L28.1969 0.144775L27.5707 0.337925Z" fill="%2314598C"/><path d="M9.82459 18.1052L11.9461 13.5097L11.5778 13.1465L11.5311 13.1845L8.89069 18.905L8.85474 19.8024L14.0764 14.5802L13.5889 14.3408L9.82459 18.1052Z" fill="%2314598C"/><path d="M21.0406 18.2855L11.601 13.5656L11.5311 13.1845L27.619 0.31284L28.2586 0L21.0406 18.2855ZM12.2128 13.297L20.7689 17.575L27.1865 1.31763L12.2128 13.297Z" fill="%2314598C"/><path d="M0 23.7317L5.65108 19.1101L5.97625 19.5077L0.325168 24.1293L0 23.7317Z" fill="%2314598C"/><path d="M6.49048 15.9209L1.86919 19.5172L1.5541 19.1123L6.17539 15.516L6.49048 15.9209Z" fill="%2314598C"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.cta-form button[type="submit"]:hover,
.cta-form input[type="submit"]:hover {
    background-color: #8BCFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.cta-form button[type="submit"]:active,
.cta-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Social links styling */
.social-links {
    display: flex;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background-color, box-shadow;
}

.social-link:hover {
    background-color: rgba(166, 217, 255, 0.25);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.social-link i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .cta-banner-block {
        min-height: 600px;
    }
}

@media (min-width: 1024px) {
    .cta-banner-block {
        min-height: 650px;
    }


}

@media (max-width: 768px) {
    .cta-form .frm_fields_container {
        flex-direction: column;
    }

    .cta-form button[type="submit"],
    .cta-form input[type="submit"] {
        width: 100%;
    }
}
