/**
 * CTA Section Block - Frontend Styles
 *
 * Note: Global CTA styles are generated dynamically in wphub_output_custom_css()
 * These are additional block-specific styles for Gutenberg integration
 */

/* Block-specific overrides and enhancements */
.aJVsIoY4 {
    /* Increased bottom margin for better content separation */
    margin: 2rem 0 4rem 0;
    /* Ensure text alignment cascades properly */
    position: relative;
    /* Ensure minimum height for split layouts */
    min-height: 500px;
}

/* Padding classes as fallback for different CTA padding sizes */
.aJVsIoY4.oIDrWpcYBd5G {
    padding: 10px 15px !important;
}
.aJVsIoY4.rR651R33 {
    padding: 20px 25px !important;
}
.aJVsIoY4.nCL3yhHeo {
    padding: 30px 35px !important;
}
.aJVsIoY4.yGQOPLd25Z {
    padding: 50px 40px !important;
}
.aJVsIoY4.ywrYSMKGf0Mo {
    padding: 80px 50px !important;
}

/* Editor-specific fixes */
.aJVsIoY4 .lFfsoOH6iN {
    /* Ensure proper spacing for inline editing */
    position: relative;
}

/* Rich Text Editor spacing fixes */
.aJVsIoY4 .sjwh-cta-heading[data-rich-text-placeholder]:empty:before,
.aJVsIoY4 .sjwh-cta-subheading[data-rich-text-placeholder]:empty:before,
.aJVsIoY4 .sjwh-cta-description[data-rich-text-placeholder]:empty:before {
    opacity: 0.7;
    font-style: italic;
}

/* Button wrapper styling for block integration */
.aJVsIoY4 .aUu2TpMO {
    margin-top: 2rem;
}

/* Background Image handling for block */
.aJVsIoY4.has-background-image {
    /* Enhanced background image display */
    background-attachment: scroll;
}

/* Split layout visual containers (for background image layouts) */
.aJVsIoY4.sZeZFggw .r4HwocaKca,
.aJVsIoY4.r1sB8i7WQ .r4HwocaKca {
    /* Visual space for split layouts - background image shows through */
    flex: 0 0 50%;
    /* Height determined by content */
    min-height: auto;
}

/* Split layout content positioning */
.aJVsIoY4.sZeZFggw .qWZyuIPdG,
.aJVsIoY4.r1sB8i7WQ .qWZyuIPdG {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    /* Padding handled by parent container */
}

/* Ensure split layouts respect text alignment */
.aJVsIoY4.sZeZFggw .lFfsoOH6iN,
.aJVsIoY4.r1sB8i7WQ .lFfsoOH6iN {
    width: 100%;
}

/* Remove background overlay - text should be readable without it */
.aJVsIoY4.has-background-image .lFfsoOH6iN {
    /* No background overlay needed */
    /* Padding handled by parent container */
    /* Keep text shadow for better readability if needed */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ensure text is readable on background images */
.aJVsIoY4.has-background-image .dTSG0YvzKN,
.aJVsIoY4.has-background-image .dmdJ4nc23u,
.aJVsIoY4.has-background-image .vM4T78OjuBG6 {
    color: white;
}

/* Button enhancements for background image layouts */
.aJVsIoY4.has-background-image .dBfuMgeI0KCa {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Button animations from global theme styles */
.aJVsIoY4 .dBfuMgeI0KCa {
    transition: all 0.3s ease;
    display: inline-block;
}

.aJVsIoY4 .dBfuMgeI0KCa:hover {
    transform: translateY(-2px);
}

/* Specific button animation classes */
.aJVsIoY4 .btn-animation-pulse:hover {
    animation: pulse 1s infinite;
}

.aJVsIoY4 .btn-animation-bounce:hover {
    animation: bounce 0.5s;
}

.aJVsIoY4 .btn-animation-shadow-lift:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

/* Ensure CTA buttons use theme button styles */
.aJVsIoY4 .tXWeLXNw6dX.kFSgg1Anw1,
.aJVsIoY4 .tXWeLXNw6dX.iVGt8PnJe,
.aJVsIoY4 .tXWeLXNw6dX.whylaxvZ {
    /* Inherit from global button styles defined in admin-settings.php */
}

/* Alignment utilities - Enhanced with !important for proper override */
.aJVsIoY4.text-left .lFfsoOH6iN,
.aJVsIoY4.text-left .uOQYoGcn {
    text-align: left !important;
}

.aJVsIoY4.text-left .aUu2TpMO {
    justify-content: flex-start !important;
    display: flex;
}

.aJVsIoY4.text-center .lFfsoOH6iN,
.aJVsIoY4.text-center .uOQYoGcn {
    text-align: center !important;
}

.aJVsIoY4.text-center .aUu2TpMO {
    justify-content: center !important;
    display: flex;
}

.aJVsIoY4.text-right .lFfsoOH6iN,
.aJVsIoY4.text-right .uOQYoGcn {
    text-align: right !important;
}

.aJVsIoY4.text-right .aUu2TpMO {
    justify-content: flex-end !important;
    display: flex;
}

/* Animation integration */
.aJVsIoY4.u5IBHXbFuOL {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.aJVsIoY4.u5IBHXbFuOL.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.aJVsIoY4.c5zgfCBg {
    transform: translateY(30px);
    transition: transform 0.6s ease;
}

.aJVsIoY4.c5zgfCBg.aos-animate {
    transform: translateY(0);
}

/* Button animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 123, 186, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 123, 186, 0.8), 0 0 30px rgba(0, 123, 186, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 123, 186, 0.5);
    }
}

@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .aJVsIoY4 {
        margin: 1.5rem 0;
    }

    .aJVsIoY4 .aUu2TpMO {
        margin-top: 1.5rem;
    }

    /* Responsive padding adjustments for tablet */
    .aJVsIoY4.oIDrWpcYBd5G {
        padding: 8px 12px !important;
    }
    .aJVsIoY4.rR651R33 {
        padding: 15px 20px !important;
    }
    .aJVsIoY4.nCL3yhHeo {
        padding: 25px 30px !important;
    }
    .aJVsIoY4.yGQOPLd25Z {
        padding: 40px 30px !important;
    }
    .aJVsIoY4.ywrYSMKGf0Mo {
        padding: 60px 40px !important;
    }
}

@media (max-width: 575px) {
    .aJVsIoY4 {
        margin: 1rem 0;
    }

    .aJVsIoY4 .aUu2TpMO {
        margin-top: 1rem;
    }

    /* Responsive padding adjustments for mobile */
    .aJVsIoY4.oIDrWpcYBd5G {
        padding: 5px 10px !important;
    }
    .aJVsIoY4.rR651R33 {
        padding: 10px 15px !important;
    }
    .aJVsIoY4.nCL3yhHeo {
        padding: 20px 20px !important;
    }
    .aJVsIoY4.yGQOPLd25Z {
        padding: 30px 20px !important;
    }
    .aJVsIoY4.ywrYSMKGf0Mo {
        padding: 40px 25px !important;
    }

    /* Adjust split visual areas for mobile */
    .aJVsIoY4.sZeZFggw .r4HwocaKca,
    .aJVsIoY4.r1sB8i7WQ .r4HwocaKca {
        /* Height determined by content even on mobile */
        min-height: auto;
    }

    /* Mobile content padding for background images */
    .aJVsIoY4.has-background-image .lFfsoOH6iN {
        /* Padding handled by parent container with responsive adjustments */
        /* No background overlay on mobile either */
    }
}

/* Split Image Styles - Base styles for all layouts */
.aJVsIoY4 .r4HwocaKca {
    position: relative;
    overflow: hidden;
    /* No background - inherits from parent container */
}

.aJVsIoY4 .v9hLIDJA {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Ensure no inherited styles affect split images */
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Ensure split container uses flexbox */
.aJVsIoY4.sZeZFggw .jQtUdmwRDXb,
.aJVsIoY4.r1sB8i7WQ .jQtUdmwRDXb {
    display: flex;
    align-items: stretch;
    min-height: 500px;
    height: 100%;
    width: 100%;
}

/* Split visual takes 50% width and full height */
.aJVsIoY4.sZeZFggw .r4HwocaKca,
.aJVsIoY4.r1sB8i7WQ .r4HwocaKca {
    flex: 1 1 50%;
    max-width: 50%;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

/* Ensure the image fills the container properly */
.aJVsIoY4.sZeZFggw .v9hLIDJA,
.aJVsIoY4.r1sB8i7WQ .v9hLIDJA {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* For narrow images, ensure they scale up */
    min-width: 100%;
    min-height: 100%;
    /* Override any global image styles - split images should be full bleed */
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Prevent any hover effects on split images */
.aJVsIoY4 .v9hLIDJA:hover {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Split content takes 50% width */
.aJVsIoY4.sZeZFggw .qWZyuIPdG,
.aJVsIoY4.r1sB8i7WQ .qWZyuIPdG {
    flex: 1 1 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 500px;
}

/* Mobile Responsive: Stack vertically on mobile */
@media (max-width: 768px) {
    .aJVsIoY4.sZeZFggw .jQtUdmwRDXb,
    .aJVsIoY4.r1sB8i7WQ .jQtUdmwRDXb {
        flex-direction: column;
    }

    .aJVsIoY4.sZeZFggw .r4HwocaKca,
    .aJVsIoY4.r1sB8i7WQ .r4HwocaKca,
    .aJVsIoY4.sZeZFggw .qWZyuIPdG,
    .aJVsIoY4.r1sB8i7WQ .qWZyuIPdG {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }

    /* Ensure image has minimum height on mobile */
    .aJVsIoY4 .r4HwocaKca {
        min-height: 250px;
    }

    /* For split layout, image comes after content on mobile */
    .aJVsIoY4.sZeZFggw .jQtUdmwRDXb {
        flex-direction: column;
    }

    /* For split-reverse, image comes first on mobile */
    .aJVsIoY4.r1sB8i7WQ .jQtUdmwRDXb {
        flex-direction: column-reverse;
    }
}