/**
 * Block: CTA Pre-footer
 * Pre-footer call-to-action with optional image + text.
 * Supports bg-white, bg-teal, bg-dark, bg-orange backgrounds.
 */

.cta-prefooter {
    padding: var(--space-3xl) 0;
}

/* Two-column layout when image is present */
.cta-prefooter__inner {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.cta-prefooter__media {
    flex: 0 0 45%;
}

.cta-prefooter__media img {
    border-radius: var(--border-radius);
    width: 100%;
    height: auto;
}

/* When no image: center everything */
.cta-prefooter__inner:not(:has(.cta-prefooter__media)) {
    justify-content: center;
    text-align: center;
}

.cta-prefooter__inner:not(:has(.cta-prefooter__media)) .cta-prefooter__content {
    max-width: 700px;
}

.cta-prefooter__content {
    flex: 1;
}

.cta-prefooter__title {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--space-md);
}

.cta-prefooter__desc {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

/* Orange variant (legacy modifier) */
.cta-prefooter--orange {
    background-color: var(--color-orange);
    color: var(--color-white);
}

.cta-prefooter--orange .cta-prefooter__title {
    color: var(--color-white);
}

/* White background — dark text */
.cta-prefooter.bg-white {
    color: var(--color-dark);
}

.cta-prefooter.bg-white .cta-prefooter__title {
    color: var(--color-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .cta-prefooter {
        padding: var(--space-2xl) 0;
    }

    .cta-prefooter__inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-prefooter__media {
        flex: none;
        width: 100%;
        order: -1;
    }
}
