/**
 * Pre-Footer CTA – Floating high-impact card with 3D pop-out image.
 * Bold gradient (blue → purple/teal), white typography. RTL-friendly. Mobile: stack, reduced pop-out.
 */

.cta-pre-footer {
    --cta-brand: var(--primary-red, #FF6B00);
    --cta-gradient-start: #0f4c81;
    --cta-gradient-mid: #1a5f8a;
    --cta-gradient-end: #2d1b4e;
    --cta-text: #ffffff;
    --cta-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), 0 12px 24px rgba(0, 0, 0, 0.12);

    padding: clamp(3rem, 10vw, 5rem) clamp(1.25rem, 5vw, 2rem);
    padding-bottom: clamp(4rem, 14vw, 7rem); /* room for image pop-out */
    position: relative;
}

.cta-pre-footer__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ----- Floating card: rounded, gradient, visible overflow for image ----- */
.cta-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(2rem, 5vw, 4rem);
    min-height: 320px;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 4rem);
    border-radius: 24px;
    background: linear-gradient(135deg, var(--cta-gradient-start) 0%, var(--cta-gradient-mid) 45%, var(--cta-gradient-end) 100%);
    color: var(--cta-text);
    box-shadow: var(--cta-shadow);
    position: relative;
    overflow: visible;
}

/* ----- Content block (headline, subheadline, buttons) ----- */
.cta-card__content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 560px;
}

.cta-card__headline {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--cta-text);
}

.cta-card__subheadline {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 1.75rem;
    color: var(--cta-text);
}

.cta-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ----- Buttons ----- */
.cta-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.cta-card__btn--primary {
    background: var(--cta-text);
    color: var(--cta-brand);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-card__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-card__btn--secondary {
    background: transparent;
    color: var(--cta-text);
    border-color: var(--cta-text);
}

.cta-card__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    opacity: 1;
}

/* ----- Audience links to niche landing pages ----- */
.cta-card__audience-label {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.cta-card__audience-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}

.cta-card__audience-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cta-text);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cta-card__audience-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

/* ----- Image wrap: allows overflow for 3D pop-out ----- */
.cta-card__image-wrap {
    flex-shrink: 0;
    position: relative;
    width: clamp(180px, 28vw, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image overflows container (bottom) for 3D depth effect; overflow: visible on .cta-card */
.cta-card__image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    position: relative;
    bottom: -12%;
    margin-bottom: -10%;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.25));
}

/* ----- Mobile: stack (image on top, text below), reduce pop-out ----- */
@media (max-width: 991px) {
    .cta-pre-footer {
        padding-bottom: clamp(3rem, 8vw, 4rem);
    }

    .cta-card {
        flex-direction: column;
        min-height: auto;
        padding: clamp(2rem, 6vw, 2.5rem);
        gap: 1.5rem;
    }

    .cta-card__content {
        order: 2;
        max-width: none;
        text-align: center;
    }

    .cta-card__actions {
        justify-content: center;
    }

    .cta-card__audience-label {
        text-align: center;
    }

    .cta-card__audience-links {
        justify-content: center;
    }

    .cta-card__image-wrap {
        order: 1;
        width: clamp(160px, 45vw, 240px);
    }

    /* Reduce pop-out on small screens to avoid horizontal scroll / layout shift */
    .cta-card__image {
        bottom: 0;
        margin-bottom: 0;
        max-height: 280px;
    }
}

@media (max-width: 575px) {
    .cta-card__actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-card__btn {
        width: 100%;
    }
}
