/**
 * 2026 Eurekatech - Popup de imagen con enlace (Home)
 */

.cdb-popup {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.cdb-popup.is-open {
    display: flex;
}

.cdb-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

.cdb-popup-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(92vw, 960px);
    background: transparent;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: cdb-popup-in 0.35s ease;
}

.cdb-popup-link {
    display: block;
    margin: 0;
    line-height: 0;
    font-size: 0;
}

.cdb-popup-img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    vertical-align: top;
}

.cdb-popup-img-mobile {
    display: none;
}

.cdb-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 0;
}

.cdb-popup-close::before,
.cdb-popup-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 1px;
    background: #333333;
}

.cdb-popup-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cdb-popup-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.cdb-popup-close:hover,
.cdb-popup-close:focus {
    background: #ffffff;
    color: #000000;
}

body.cdb-popup-locked {
    overflow: hidden;
}

@keyframes cdb-popup-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 767px) {
    .cdb-popup-box {
        max-width: min(94vw, 560px);
    }

    .cdb-popup-img-desktop {
        display: none;
    }

    .cdb-popup-img-mobile {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdb-popup-box {
        animation: none;
    }
}
