/* Styl dla naszego komponentu galerii */
.gallery {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
}

/* To jest nasz pojemnik na obrazek. On ucina treść. */
.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

.slide {
    width: 100%;
    height: 100%;
    display: none;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center var(--vertical-pos, 50%);
}

/* Przyciski są POZA pojemnikiem .gallery-main, więc nie zostaną ucięte. */
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.prev { left: 15px; }
.next { right: 15px; }

.gallery-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dot.active, .dot:hover {
    background-color: #fff;
}


/* ============================================================= */
/*       Style nadpisujące galerię na potrzeby karty (dogs.html)      */
/* ============================================================= */

/* Ustawiamy stałą wysokość dla kontenera obrazu na karcie. */
.card .card-img-container {
    height: 250px;
}

/* Reszta stylów dla karty pozostaje taka sama, ponieważ teraz
   problem jest rozwiązany u źródła. */
.card .gallery {
    height: 100%;
    width: 100%;
    border-radius: 0;
}

.card .gallery .gallery-main {
    aspect-ratio: unset;
    height: 100%;
    border-radius: 0;
}

.card .gallery .gallery-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.45);
}

.card .gallery .prev { left: 10px; }
.card .gallery .next { right: 10px; }

.card .gallery .gallery-dots {
    display: none;
}