/* Feed Instagrama - zamiennik martwego widgetu Mobirise */

.ig-feed {
    background-color: #fff;
    padding: 60px 0;
}

.ig-feed__title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.ig-feed__title .socicon {
    margin-right: 10px;
}

.ig-feed__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 991px) {
    .ig-feed__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575px) {
    .ig-feed__grid { grid-template-columns: repeat(2, 1fr); }
}

.ig-feed__item {
    margin: 0;
}

.ig-feed__link {
    position: relative;
    display: block;
    overflow: hidden;
    /* Kwadrat niezaleznie od proporcji zdjecia - brak skakania layoutu (CLS) */
    aspect-ratio: 1 / 1;
    background-color: #eee;
}

/* Fallback dla przegladarek bez aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .ig-feed__link { height: 0; padding-bottom: 100%; }
}

.ig-feed__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.ig-feed__link:hover .ig-feed__img,
.ig-feed__link:focus .ig-feed__img {
    transform: scale(1.06);
}

.ig-feed__badge {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    pointer-events: none;
}

.ig-feed__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 10px 10px;
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity .25s ease;
}

.ig-feed__link:hover .ig-feed__caption,
.ig-feed__link:focus .ig-feed__caption {
    opacity: 1;
}

/* Na dotyku hover nie istnieje - podpis widoczny od razu */
@media (hover: none) {
    .ig-feed__caption { opacity: 1; }
}

.ig-feed__link:focus-visible {
    outline: 3px solid #149dcc;
    outline-offset: 2px;
}

.ig-feed__fallback-text {
    text-align: center;
    font-size: 16px;
    color: #555;
}

.ig-feed__cta {
    text-align: center;
    margin-top: 30px;
}

.ig-feed__debug {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #b00;
}

@media (prefers-reduced-motion: reduce) {
    .ig-feed__img,
    .ig-feed__caption { transition: none; }
    .ig-feed__link:hover .ig-feed__img { transform: none; }
}
