.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Posiciones del popup */
.popup-position-centro {
    align-items: center;
    justify-content: center;
}

.popup-position-superior-izquierda {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.popup-position-superior-derecha {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.popup-position-inferior-izquierda {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
}

.popup-position-inferior-centro {
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

.popup-position-inferior-derecha {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.popup-overlay.popup-no-overlay {
    pointer-events: none;
}

.popup-overlay.popup-with-overlay {
    pointer-events: all;
}

.popup-overlay.popup-visible {
    opacity: 1;
}

.popup-overlay.popup-no-overlay.popup-visible {
    pointer-events: none;
}

.popup-overlay.popup-no-overlay .popup-container {
    pointer-events: all;
}

.popup-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.popup-container.popup-clickeable:hover {
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
}

.popup-overlay.popup-visible .popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: #03255c;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.popup-close:hover {
    background-color: #021a40;
    transform: scale(1.1);
}

.popup-close svg {
    color: #fff;
}

.popup-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-image img {
    width: 100%;
    height: auto;
    display: block;
}

.popup-text {
    padding: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.popup-text h1,
.popup-text h2,
.popup-text h3,
.popup-text h4,
.popup-text h5,
.popup-text h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #03255c;
}

.popup-text p {
    margin-bottom: 15px;
}

.popup-text a {
    color: #03255c;
    text-decoration: underline;
}

.popup-text a:hover {
    color: #021a40;
}

.popup-button-container {
    padding: 20px 30px 30px 30px;
    text-align: center;
}

.popup-btn-link {
    display: inline-block;
    background-color: #03255c;
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.popup-btn-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9);
}

@media (max-width: 768px) {
    /* En móvil, todas las posiciones se centran */
    .popup-overlay {
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
    }
    
    .popup-container {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .popup-text {
        padding: 20px;
        font-size: 14px;
    }
    
    .popup-button-container {
        padding: 15px 20px 20px 20px;
    }
    
    .popup-btn-link {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .popup-close {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }
    
    .popup-close svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .popup-container {
        max-width: 98%;
    }
    
    .popup-text {
        padding: 15px;
    }
    
    .popup-button-container {
        padding: 10px 15px 15px 15px;
    }
    
    .popup-btn-link {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }
}
