/* Styl dla wyskakującego okna */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
  }
  .modal-content {
    margin: auto;
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 500px;
    text-align: center;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
  }
  .modal img {
    width: auto; /* Szerokość dostosowana automatycznie */
    height: auto; /* Wysokość dostosowana automatycznie */
    max-width: 100%; /* Maksymalna szerokość obrazu, aby nie wykraczał poza kontener */
    max-height: 100%; /* Maksymalna wysokość obrazu, aby nie wykraczał poza kontener */
    display: block;
    margin-bottom: 10px;
  }
  .galeria-post {
    width: 360px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    background-color: #1d1d1d;
  }
  .galeria-tytul {
    background: linear-gradient(to bottom, #383838, #000000);
    padding: 20px 10px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
  }
  .galeria-img {
    background: linear-gradient(to bottom, #000000, #383838, #0d0d0d);
    display: flex;
    justify-content: center;
  }
  .galeria-opis {
    background: repeating-linear-gradient(to bottom, #0d0d0d 0%, #1b1b1b 100%);
    font-size: 14px;
    padding: 15px 30px;
  }
  .pagination {
    margin: 40px;
    text-align: center;
  }
  .close {
    color: #fff;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
    z-index: 2;
  }
  .close:hover {
    color: #f14401;
  }
  .prev,
  .next {
    cursor: pointer;
    position: absolute;
    top: 50%; /* Nowa wartość dla obu strzałek */
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.2s ease;
    border-radius: 3px;
    user-select: none;
  }
  .prev:hover,
  .next:hover {
    color: #f14401;
  }
  .prev {
    left: 0; /* Nowa wartość dla strzałki prev */
    transform: translate(-100%, -50%); /* Nowa deklaracja */
  }
  .next {
    right: 0; /* Nowa wartość dla strzałki next */
    transform: translate(100%, -50%); /* Nowa deklaracja */
  }
  /* Styl dla miniatur */
  .thumbnail {
    width: 320px;
    height: auto;
    margin: 5px;
    cursor: pointer;
    pointer-events: auto;
    user-select: auto; /* Uniemożliwia zaznaczanie obrazów */
    -webkit-touch-callout: auto; /* Wyłącz menu kontekstowe w iOS */
  }

  @media only screen and (max-width: 1025px) {
    .modal-content {
        width: 70%;
    }
  }
    @media only screen and (max-width: 426px) {
    .modal-content {
        padding: 90px 0;
        width: 90%;
        align-items: center;
    }
    .next {
    right: 40px;
    background-color: #000000ab;
    }
    .prev {
    left: 40px; /* Nowa wartość dla strzałki prev */
    background-color: #000000ab;
  }
  }