/* Popup System Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    direction: rtl;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    z-index: 10;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.popup-content {
    padding: 40px 30px 30px;
}

.popup-image {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    text-align: center;
}

.popup-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
    text-align: center;
    white-space: pre-line;
}

.popup-link-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.popup-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
        margin: 10px;
    }
    
    .popup-content {
        padding: 30px 20px 20px;
    }
    
    .popup-title {
        font-size: 20px;
    }
    
    .popup-text {
        font-size: 14px;
    }
    
    .popup-link-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .popup-image img {
        max-height: 250px;
    }
}

/* Scrollbar styling for popup content */
.popup-container::-webkit-scrollbar {
    width: 8px;
}

.popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popup-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}
