/* Pop-up overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Pop-up content */
.popup-content {
    background: transparent; /* Zmienione z white na transparent */
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    max-height: 80vh;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    border: none;
    outline: none;
    padding: 0; /* Usunięte padding */
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Przycisk zamknięcia - bardziej widoczny */
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.popup-close:hover {
    background-color: #333;
    transform: scale(1.05);
}

.popup-close:active {
    transform: scale(0.95);
}

.popup-close span {
    display: block;
    line-height: 1;
}

/* Treść pop-upu */
.popup-body {
    padding: 0; /* Usunięte padding - obraz wypełni całą przestrzeń */
    background: transparent;
}

.popup-text {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    text-align: center;
    background: white; /* Białe tło tylko dla tekstu */
    padding: 40px 30px 30px; /* Padding przeniesiony tutaj */
}

.popup-text h1, .popup-text h2, .popup-text h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.popup-text p {
    margin-bottom: 15px;
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    border: none;
    outline: none;
}

/* Tablet */
@media (max-width: 1024px) {
    .popup-content {
        max-width: 600px;
        width: 85%;
    }
    
    .popup-text {
        padding: 35px 25px 25px;
        font-size: 16px;
    }
}

/* Telefony - odstęp 5px z prawej i lewej */
@media (max-width: 768px) {
    .popup-content {
        width: calc(100% - 10px);
        margin: 0 5px;
        max-width: none;
    }
    
    .popup-text {
        padding: 30px 20px 20px;
        font-size: 15px;
    }
    
    .popup-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: calc(100% - 10px);
        margin: 0 5px;
        border-radius: 0;
    }
    
    .popup-text {
        padding: 25px 15px 15px;
        font-size: 14px;
    }
    
    .popup-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: 5px;
        right: 5px;
    }
}

/* Bardzo małe ekrany */
@media (max-width: 320px) {
    .popup-text {
        padding: 20px 10px 10px;
        font-size: 13px;
    }
}

/* Zapobieganie scrollowaniu strony */
body.popup-open {
    overflow: hidden;
}