/* ==========================================================================
   ACF CTA Section Block Styles
   ========================================================================== */

/* CSS Custom Properties for CTA Section Block */
/* Uses theme-level :root variables defined in themes/binniemedia/style.css */

/* CTA Section */
.cta-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    margin-top: 50px !important;
    position: relative;
    overflow: hidden;
}

/* Fence Images */
.cta-fence {
    position: absolute;
    bottom: 0;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.cta-fence-left {
    left: 0;
}

.cta-fence-right {
    right: 0;
}

.fence-image {
    opacity: 0.3;
    max-height: 200px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.2) contrast(0.8);
    display: block;
    margin: 0;
    padding: 0;
}

/* Full-width alignment for CTA Section */
.cta-section.alignfull {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    width: 100vw;
    max-width: 100vw;
}

.cta-section.alignwide {
    margin-left: calc(-100vw / 2 + 100% / 2 + 50px);
    margin-right: calc(-100vw / 2 + 100% / 2 + 50px);
    width: calc(100vw - 100px);
    max-width: calc(100vw - 100px);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
    color: white;
}

.cta-description {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: var(--font-size-lg);
}

/* Primary CTA Button */
.cta-button.primary-button {
    background-color: white;
    color: var(--primary-color);
}

.cta-button.primary-button:hover {
    background-color: #f8fafc;
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Secondary CTA Button */
.cta-button.secondary-button {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button.secondary-button:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .fence-image {
        max-height: 180px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Adjust fence images for medium screens */
    .fence-image {
        max-height: 120px;
        opacity: 0.25;
    }
    
    /* Adjust full-width on smaller screens */
    .cta-section.alignfull {
        margin-left: calc(-100vw / 2 + 100% / 2);
        margin-right: calc(-100vw / 2 + 100% / 2);
    }
    
    .cta-section.alignwide {
        margin-left: calc(-100vw / 2 + 100% / 2 + 20px);
        margin-right: calc(-100vw / 2 + 100% / 2 + 20px);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 640px) {
    .fence-image {
        max-height: 90px;
        opacity: 0.2;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .cta-section {
        padding: var(--spacing-xl) 0;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-description {
        font-size: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    /* Adjust fence images for small screens */
    .fence-image {
        max-height: 70px;
        opacity: 0.15;
    }
    
    /* Full-width on mobile */
    .cta-section.alignwide {
        margin-left: calc(-100vw / 2 + 100% / 2);
        margin-right: calc(-100vw / 2 + 100% / 2);
        width: 100vw;
        max-width: 100vw;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .fence-image {
        max-height: 50px;
        opacity: 0.1;
    }
}