/* === Style dla Galerii w Stylu Portalu === */

/* --- GŁÓWNY KONTENER --- */
.agm-wnm-style-gallery {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

/* --- LEWA, DUŻA MINIATURKA --- */
.agm-wnm-large-thumb {
    flex: 2;
    min-width: 0;
}

/* --- PRAWA KOLUMNA Z MAŁYMI MINIATURKAMI --- */
.agm-wnm-small-thumbs-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* --- WSPÓLNE STYLE DLA WSZYSTKICH LINKÓW/KAFELKÓW W GALERII --- */
.agm-wnm-style-gallery a {
    display: block;
    position: relative;
    overflow: hidden;
    line-height: 0;
    height: 100%;
}

/* --- WSPÓLNE STYLE DLA WSZYSTKICH OBRAZKÓW --- */
.agm-wnm-style-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* --- EFEKT PO NAJECHANIU MYSZKĄ --- */
.agm-wnm-style-gallery a:hover img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* --- STYLIZACJA NAKŁADKI "+X ZDJĘĆ" --- */
.agm-wnm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.agm-wnm-style-gallery a:hover .agm-wnm-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.agm-wnm-overlay span {
    font-size: 28px;
    font-weight: 700;
    display: block;
    line-height: 1.1;
}

/* === Style dla Nawigacji na Zdjęciu w Galerii (ZMIANY) === */

.newsx-single-post-media {
    position: relative;
    overflow: hidden;
}

.agm-overlay-nav {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none;
}

.agm-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    /* --- KLUCZOWA ZMIANA: Strzałki są teraz widoczne cały czas! --- */
    opacity: 0.6; /* Zamiast '0', ustawiamy lekką przezroczystość */
    transition: opacity 0.3s ease, background-color 0.3s ease;
    pointer-events: auto;
    border-radius: 5px;
}

/* Na desktopie, po najechaniu na obrazek, strzałki stają się w 100% widoczne */
.newsx-single-post-media:hover .agm-nav-arrow {
    opacity: 1;
}

/* Gdy kursor jest bezpośrednio nad strzałką, też staje się w 100% widoczna i ciemniejsza */
.agm-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1; /* Dodajemy dla pewności */
}

.agm-nav-prev { left: 10px; }
.agm-nav-next { right: 10px; }

.agm-nav-arrow svg { width: 36px; height: 36px; }