/* =====================================================
   Insta Feed v5 – simsite.com.br
   ===================================================== */

.insta-feed-wrapper {
    --if-nav:      #E1306C;
    --if-gap:      8px;
    --if-radius:   8px;
    --if-img-size: 200px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
    width: 100%;
    margin: 16px 0;
}
.insta-feed-wrapper *, .insta-feed-wrapper *::before, .insta-feed-wrapper *::after {
    box-sizing: inherit;
}

/* ── Imagem base ── */
.if-img-wrap {
    position: relative;
    width: var(--if-img-size);
    height: var(--if-img-size);
    border-radius: var(--if-radius);
    overflow: hidden;
    background: #eee;
    display: block;
}
.if-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
a:hover .if-img-wrap img { transform: scale(1.06); }

/* Overlay hover */
.if-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.32);
    opacity: 0;
    transition: opacity .25s;
}
a:hover .if-overlay { opacity: 1; }
.if-overlay svg { width: 26px; height: 26px; fill: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }

/* Badge vídeo */
.if-video-badge {
    position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,.52); color: #fff;
    font-size: .62rem; padding: 2px 5px;
    border-radius: 3px; pointer-events: none;
}

/* ══════════════════════════════════════════
   CARROSSEL
══════════════════════════════════════════ */
.insta-feed-carousel { position: relative; }

.if-carousel {
    position: relative;
    overflow: hidden;   /* esconde tudo fora da área visível */
}

.if-track-wrapper { overflow: hidden; }

.if-track {
    display: flex;
    gap: var(--if-gap);
    transition: transform .5s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.if-slide { flex-shrink: 0; }
.if-slide a { display: block; text-decoration: none; }

/* ── Setas discretas sobrepostas nas laterais ── */
.if-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.82);
    color: #333;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 6px rgba(0,0,0,.18);
    transition: background .2s, opacity .2s, transform .2s;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.if-nav svg { width: 18px; height: 18px; fill: #333 !important; }
.if-nav:hover { background: rgba(255,255,255,.97); transform: translateY(-50%) scale(1.1); }
.if-nav:active { transform: translateY(-50%) scale(.94); }

.if-prev { left: 6px; }
.if-next { right: 6px; }

/* ══════════════════════════════════════════
   GRADE (GRID)
══════════════════════════════════════════ */
.insta-feed-grid .if-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; gap: 10px; flex-wrap: wrap;
}
.if-profile-link {
    display: flex; align-items: center; gap: 7px;
    text-decoration: none; color: #1a1a1a;
    font-weight: 600; font-size: .92rem;
    transition: opacity .2s;
}
.if-profile-link:hover { opacity: .7; }
.if-icon { width: 20px; height: 20px; fill: var(--if-nav); flex-shrink: 0; }
.if-visit-btn {
    display: inline-block; padding: 5px 14px;
    border-radius: 20px; background: var(--if-nav);
    color: #fff !important; text-decoration: none !important;
    font-size: .78rem; font-weight: 600;
    transition: opacity .2s, transform .15s; white-space: nowrap;
}
.if-visit-btn:hover { opacity: .85; transform: translateY(-1px); }

.if-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--if-gap);
}
.if-grid-item { flex: 0 0 var(--if-img-size); }
.if-grid-item a { display: block; text-decoration: none; }

/* ── Responsivo ── */
@media (max-width: 600px) {
    .insta-feed-wrapper { --if-img-size: 140px; }
    .if-nav { width: 26px; height: 26px; }
    .if-nav svg { width: 14px; height: 14px; }
}
