/* Jungli Instagram Feed Styles */

.jungli-instagram-feed {
    display: grid;
    gap: 15px;
    margin: 20px 0;
    width: 100%;
}

.jungli-instagram-feed[data-columns="1"] {
    grid-template-columns: 1fr;
}

.jungli-instagram-feed[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.jungli-instagram-feed[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.jungli-instagram-feed[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.jungli-ig-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Квадратний контейнер */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f5f5f5;
}

.jungli-ig-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.jungli-ig-item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
}

.jungli-ig-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jungli-ig-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.jungli-ig-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 15px 15px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-height: 60%;
    overflow: hidden;
}

.jungli-ig-item:hover .jungli-ig-overlay {
    opacity: 1;
}

.jungli-ig-overlay p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Meta counters (likes, comments) */
.jungli-ig-meta {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}
.jungli-ig-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Instagram Profile Header Styles */
.jungli-instagram-profile {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.jungli-ig-profile-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.jungli-ig-profile-avatar {
    flex-shrink: 0;
}

.jungli-ig-profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.jungli-ig-profile-info {
    flex: 1;
}

.jungli-ig-profile-username {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.jungli-ig-profile-username a {
    color: #262626;
    text-decoration: none;
    transition: color 0.2s;
}

.jungli-ig-profile-username a:hover {
    color: #0095f6;
}

.jungli-ig-profile-name {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #262626;
}

.jungli-ig-profile-stats {
    display: flex;
    gap: 20px;
    margin: 12px 0 16px 0;
    flex-wrap: wrap;
}

.jungli-ig-stat {
    font-size: 16px;
    color: #262626;
}

.jungli-ig-stat strong {
    font-weight: 600;
}

.jungli-ig-profile-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #262626;
    white-space: pre-line;
}

.jungli-ig-profile-actions {
    margin: 16px 0 12px 0;
}

.jungli-ig-follow-btn {
    display: inline-block;
    padding: 8px 24px;
    background: #0095f6;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.jungli-ig-follow-btn:hover {
    background: #1877f2;
    transform: translateY(-1px);
}

/* Responsive Profile */
@media (max-width: 768px) {
    .jungli-ig-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .jungli-ig-profile-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .jungli-ig-profile-username {
        font-size: 20px;
    }
    
    .jungli-ig-profile-stats {
        justify-content: center;
    }
    
    .jungli-ig-profile-actions {
        text-align: center;
    }
    
    .jungli-ig-follow-btn {
        width: 100%;
        max-width: 280px;
    }
}

.jungli-ig-error {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jungli-instagram-feed[data-columns="4"],
    .jungli-instagram-feed[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .jungli-instagram-feed[data-columns="4"],
    .jungli-instagram-feed[data-columns="3"],
    .jungli-instagram-feed[data-columns="2"] {
        grid-template-columns: 1fr;
    }
    
    .jungli-ig-overlay {
        opacity: 1; /* Показуємо підписи на мобільних */
    }
}

