/* =========================================================================
   GWS Instagram Flux — Front-end Styles
   ========================================================================= */

.jif-feed {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Grid */
.jif-grid {
    display: grid;
    grid-template-columns: repeat(var(--jif-columns, 3), 1fr);
    gap: var(--jif-gap, 4px);
}

/* Item */
.jif-item {
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.jif-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.jif-item-inner {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 ratio */
    overflow: hidden;
}

.jif-item-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jif-item:hover .jif-item-inner img {
    transform: scale(1.05);
}

/* Badges (video / carousel icons) */
.jif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}

.jif-badge svg {
    display: block;
}

/* Hover overlay */
.jif-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
    padding: 12px;
}

.jif-item:hover .jif-overlay {
    opacity: 1;
}

.jif-caption {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    margin: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Error */
.jif-error {
    padding: 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #664d03;
    font-size: 14px;
}

/* =========================================================================
   Follow Button
   ========================================================================= */

.jif-follow {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.jif-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(214, 41, 118, 0.35);
    line-height: 1;
}

.jif-follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(214, 41, 118, 0.5);
    color: #fff !important;
    text-decoration: none !important;
}

.jif-follow-btn:active {
    transform: translateY(0);
}

.jif-follow-icon {
    flex-shrink: 0;
}

.jif-follow-btn strong {
    font-weight: 700;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1024px) {
    .jif-grid {
        grid-template-columns: repeat(var(--jif-columns-tablet, 3), 1fr);
    }
}

@media (max-width: 768px) {
    .jif-grid {
        grid-template-columns: repeat(var(--jif-columns-tablet, 3), 1fr);
    }
    .jif-badge svg {
        width: 16px;
        height: 16px;
    }
    .jif-caption {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .jif-grid {
        grid-template-columns: repeat(var(--jif-columns-mobile, 2), 1fr);
    }
    .jif-follow-btn {
        padding: 12px 24px;
        font-size: 13px;
    }
    .jif-follow-icon {
        width: 16px;
        height: 16px;
    }
}
