/* Import fontu Nunito Sans z Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,700;0,800;1,300;1,400;1,700;1,800&display=swap');

/* Globalny styl fontu dla całej strony */
body {
    font-family: 'Nunito Sans', sans-serif;
    overflow-x: hidden;
}

/* Ogólne style */
img {
    max-width: 100%;
}

.map-container {
    position: relative;
    display: flex;
    width: 100%;

}

.map-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.lock {
    position: absolute;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.lock-icon {
    width: 50px;
    height: 50px;
    display: block;
}

/* Sznurek i pieczęć */
.string,
.seal {
    position: absolute;
    cursor: pointer;
}

.string {
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    height: 100%;
}

.seal {
    top: 43%;
    left: 28%;
    transform: translate(-50%, -50%);
    width: 800px;
    z-index: 11;
    animation: pulse 2s infinite;
}

/* Animacje */
@keyframes lockPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes shake {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(5deg); }
    50% { transform: translate(-50%, -50%) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) rotate(5deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.lock.shake {
    animation: shake 0.5s;
}

/* Styl popupu dla filmików */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    position: relative;
    background: none;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-media {
    width: 100%;
    display: flex;
    justify-content: center;
}

.popup-media video,
.popup-media img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
}

.popup-media p {
    margin: 10px 0 0;
    font-size: 1.2em;
    font-style: italic;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    width: 100%;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    z-index: 1002;
    padding: 8px 12px;
    border-radius: 50%;
}

/* Media query dla urządzeń mobilnych dla popupów filmików */
@media (max-width: 767.98px) {
    .map-image {
        content: url('images/mapa-mobile.png');
    }

    .lock-icon {
        width: 35px;
        height: 35px;
    }

    .close-btn {
        font-size: 32px;
        padding: 10px 14px;
    }

    .popup-media video,
    .popup-media img {
        max-height: 60vh;
    }

    .string {
        content: url('images/sznurek-mobile.png');
        width: 100%;
    }

    .seal {
        width: 400px;
        top: 30%;
        left: 61%;
    }
}

/* Styl kontenera książki */
.book-container .row {
    align-items: center;
}

.book-container {
    background: #000;
    position: relative;
    background-size: cover;
    padding: 166px 241px 200px 180px;
    background-repeat: no-repeat;
    background-position: center;
}

.book-description p {
    font-size: 20px;
}

.hidden {
    display: none;
}

.toggle-btn {
    color: #920000;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
}

.buy-btn {
    background: #920000;
    color: #FFF;
    text-decoration: none;
    padding: 22px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 20px;
    display: inline-block;
    line-height: 0;
    cursor: pointer;
}

.pdf-btn {
    background: #000;
    color: #FFF;
    text-decoration: none;
    padding: 22px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 20px;
    margin-left: 20px;
    display: inline-block;
    line-height: 0;
}

.btn-content {
    margin-top: 80px;
}

footer {
    background: #000;
    color: #FFF;
    padding-top: 20px;
    padding-bottom: 20px;
}

footer a {
    color: inherit;
    text-decoration: none;
}

.footer-info {
    display: flex;
    justify-content: space-between;
}

/* Style dla popupu BuyBoxa */
.buybox-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.buybox-content {
    position: relative;
    background: none;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 800px;
}

.buybox-content .close-btn {
    top: -59px;
    right: 99px;
}

.buybox-media {
    width: 100%;
    display: flex;
    justify-content: center;
}

.buybox-media .bb-widget {
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    height: auto !important;
    max-height: 80vh !important;
    overflow: auto !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 8px !important;
}

.buybox-media .bb-widget * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 767.98px) {
    .buybox-media .bb-widget {
        max-width: 90% !important;
        padding: 10px !important;
    }
}

@media(max-width:1439px){
  .book-container {
    padding: 164px 50px 200px 50px;
}
}
@media(max-width:1024px){
  .book-container {
    padding: 164px 20px 200px 20px;
}
.btn-content {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: baseline;
}
}

@media(max-width:768px){
  .footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.book-container {
    padding: 180px 15px 180px 15px;
}
.btn-content {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.pdf-btn{
  margin-left: 0;
}
}

.tooltip {
    position: absolute;
    top: 0; /* Początkowa pozycja, zostanie ustawiona dynamicznie w JS */
    left: 0; /* Początkowa pozycja, zostanie ustawiona dynamicznie w JS */
    background-color: #FFF;
    color: #000;
    border: 3px solid #920000;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    max-width: 250px; /* Maksymalna szerokość */
    text-align: center; /* Wyśrodkowanie tekstu */
    z-index: 9; /* Wyżej niż kłódki i sznurek */
    opacity: 1; /* Domyślnie widoczny */
    transition: opacity 0.3s ease; /* Płynne znikanie */
    pointer-events: none; /* Uniemożliwia interakcję */
    box-sizing: border-box; /* Uwzględnia padding w szerokości */
    line-height: 1.4; /* Lepsza czytelność tekstu */
}

.tooltip.hidden {
    opacity: 0;
    pointer-events: none; /* Uniemożliwia interakcję po ukryciu */
}

/* Dziubek wskazujący na kłódkę */
.tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Pozycja dziubka pod tooltipem */
    left: 20%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #920000; /* Kolor dziubka pasujący do tła */
}

