/* ============================================================
   instagram-feed.css – Styles for the What's New Instagram grid
   micksbottle.com
   ============================================================ */

/* ── Grid container ─────────────────────────────────────────── */
#instagram-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 960px;
    margin: 0 auto 20px;
}

@media (max-width: 767px) {
    #instagram-feed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    #instagram-feed-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ───────────────────────────────────────────────────── */
.insta-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #1a1a1a;
    aspect-ratio: 4 / 5;
    /* 4:5 crop */
    cursor: pointer;
}

.insta-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ── Image ──────────────────────────────────────────────────── */
.insta-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.insta-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.15s ease;
}

.insta-card:hover .insta-img {
    transform: scale(1.04);
}

/* ── Overlay ────────────────────────────────────────────────── */
.insta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: background 0.3s ease;
    pointer-events: none;
    gap: 8px;
}

.insta-card:hover .insta-overlay {
    background: rgba(0, 0, 0, 0);
}

.insta-caption {
    color: #fff;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.insta-icon {
    color: #fff;
    font-size: 22px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}

.insta-card:hover .insta-caption,
.insta-card:hover .insta-icon {
    opacity: 0;
    transform: translateY(6px);
}

/* ── Carousel badge (stacked-frames icon) ───────────────────── */
.insta-carousel-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* ── Carousel counter ───────────────────────────────────────── */
.insta-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 7px;
    border-radius: 20px;
    pointer-events: none;
}

/* ── Carousel arrows ────────────────────────────────────────── */
.insta-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
}

.insta-arrow-prev {
    left: 8px;
}

.insta-arrow-next {
    right: 8px;
}

.insta-card:hover .insta-arrow {
    opacity: 1;
}

.insta-arrow:hover {
    background: rgba(0, 0, 0, 0.70);
}

/* ── Loading skeleton ───────────────────────────────────────── */
.insta-skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s infinite;
    aspect-ratio: 4 / 5;
    border-radius: 4px;
    cursor: default;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Empty / error state ────────────────────────────────────── */
.insta-empty {
    color: #aaa;
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px 0;
    font-size: 15px;
}

/* ── Footer "Follow us" link ────────────────────────────────── */
.insta-footer {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 10px;
}

.insta-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c8a26a;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #c8a26a;
    padding: 10px 24px;
    border-radius: 2px;
    transition: background 0.25s ease, color 0.25s ease;
}

.insta-more-link:hover {
    background: #c8a26a;
    color: #111;
    text-decoration: none;
}