.cta-popup-overlay {
    align-items: center;
    animation: popup-fade-in .3s ease-out;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, .8);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    opacity: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity .3s ease, visibility .3s ease;
    visibility: hidden;
    z-index: 9999
}

.cta-popup-overlay.show {
    opacity: 1;
    visibility: visible
}

.cta-popup-container {
    animation: popup-scale-in .3s ease-out;
    background-color: #1f2937;
    border: 1px solid hsla(0, 0%, 100%, .1);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5);
    height: auto;
    max-height: 90vh;
    max-width: 500px;
    min-height: 200px;
    overflow: hidden;
    position: relative;
    width: 100%
}

.cta-popup-close {
    align-items: center;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, .6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    height: 2.5rem;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transition: all .2s ease;
    width: 2.5rem;
    z-index: 10
}

.cta-popup-close:hover {
    background-color: rgba(239, 68, 68, .8);
    transform: scale(1.1)
}

.cta-popup-close:active {
    transform: scale(.95)
}

.cta-popup-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    padding: 1.5rem;
    text-align: center
}

.cta-popup-title {
    color: #f9fafb;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .3)
}

.cta-popup-image-container {
    align-items: center;
    border-radius: .75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
    display: flex;
    flex: 1;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden
}

.cta-popup-image-link {
    border-radius: .75rem;
    cursor: pointer;
    display: block;
    height: 100%;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transition: transform .3s ease, opacity .3s ease;
    width: 100%
}

.cta-popup-image-link:hover {
    opacity: .95;
    transform: scale(1.02)
}

.cta-popup-image-link:active {
    transform: scale(.98)
}

.cta-popup-image-link:after {
    background: linear-gradient(45deg, transparent, rgba(20, 184, 166, .1) 50%, transparent);
    bottom: 0;
    content: "";
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity .3s ease
}

.cta-popup-image-link:hover:after {
    opacity: 1
}

.cta-popup-image {
    display: block;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    transition: transform .3s ease;
    width: 100%
}

.cta-popup-image-link .cta-popup-image {
    transition: none
}

.cta-popup-image-link .cta-popup-image:hover {
    transform: none
}

.cta-popup-image:not(.cta-popup-image-link .cta-popup-image):hover {
    transform: scale(1.02)
}

.cta-popup-actions {
    flex-shrink: 0;
    margin-top: 1.5rem
}

.cta-popup-button {
    align-items: center;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    border: none;
    border-radius: .75rem;
    box-shadow: 0 4px 15px rgba(20, 184, 166, .4);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 600;
    justify-content: center;
    min-width: 200px;
    padding: .875rem 2rem;
    text-decoration: none;
    transition: all .3s ease
}

.cta-popup-button:hover {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    box-shadow: 0 8px 25px rgba(20, 184, 166, .6);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px)
}

.cta-popup-button:active {
    box-shadow: 0 4px 15px rgba(20, 184, 166, .4);
    transform: translateY(0)
}

@keyframes popup-fade-in {
    0% {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@keyframes popup-scale-in {
    0% {
        opacity: 0;
        transform: scale(.8) translateY(20px)
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

@media (max-width:640px) {
    .cta-popup-overlay {
        padding: .5rem
    }
    .cta-popup-container {
        border-radius: .75rem;
        max-height: 85vh;
        max-width: 100%;
        min-height: 300px
    }
    .cta-popup-content {
        min-height: 250px;
        padding: 1rem
    }
    .cta-popup-title {
        font-size: 1.25rem;
        margin-bottom: .75rem
    }
    .cta-popup-close {
        font-size: .875rem;
        height: 2rem;
        right: .75rem;
        top: .75rem;
        width: 2rem
    }
    .cta-popup-button {
        font-size: .875rem;
        min-width: 180px;
        padding: .75rem 1.5rem
    }
    .cta-popup-image {
        max-height: 50vh
    }
}

@media (max-width:480px) {
    .cta-popup-container {
        margin: .5rem;
        max-height: 80vh;
        min-height: 250px
    }
    .cta-popup-content {
        min-height: 200px;
        padding: .75rem
    }
    .cta-popup-title {
        font-size: 1.125rem
    }
    .cta-popup-button {
        min-width: auto;
        width: 100%
    }
    .cta-popup-image {
        max-height: 40vh
    }
}

@media (min-height:800px) {
    .cta-popup-image {
        max-height: 70vh
    }
    .cta-popup-container {
        max-height: 95vh
    }
}

.cta-popup-button:focus,
.cta-popup-close:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px
}

body.popup-open {
    overflow: hidden
}

.cta-popup-container.pulse {
    animation: popup-pulse 2s infinite
}

@keyframes popup-pulse {
    0%,
    to {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5)
    }
    50% {
        box-shadow: 0 25px 50px -12px rgba(20, 184, 166, .3)
    }
}

.light-theme .cta-popup-container {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .1)
}

.light-theme .cta-popup-title {
    color: #1f2937
}

.light-theme .cta-popup-close {
    background-color: hsla(0, 0%, 100%, .9);
    color: #1f2937
}

.light-theme .cta-popup-close:hover {
    background-color: rgba(239, 68, 68, .1);
    color: #dc2626
}