/* Nirogify Instagram Feed Styling */

:root {
    --ig-bg: #fafafa;
    --ig-border: #dbdbdb;
    --ig-text: #262626;
    --ig-secondary-text: #8e8e8e;
    --ig-blue: #0095f6;
    --ig-blue-hover: #1877f2;
    --ig-story-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-section {
    background-color: #ffffff;
    padding-bottom: 50px;
}

/* Profile Header Styling */
.instagram-profile-header {
    margin-bottom: 44px;
    padding: 20px 0;
    border-bottom: 1px solid var(--ig-border);
}

.profile-avatar-container {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 0 auto;
}

.profile-avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ig-story-gradient);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #ffffff;
    object-fit: cover;
    background-color: #ffffff;
}

.profile-info {
    padding-left: 20px;
}

.profile-username-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-username {
    font-size: 28px;
    font-weight: 300;
    color: var(--ig-text);
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.verified-badge {
    color: #3897f0;
    font-size: 18px;
}

.btn-ig-follow {
    background-color: var(--ig-blue);
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 5px 24px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-ig-follow:hover {
    background-color: var(--ig-blue-hover);
}

.profile-stats-row {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.profile-stat-item {
    font-size: 16px;
    color: var(--ig-text);
}

.profile-stat-count {
    font-weight: 600;
}

.profile-bio {
    font-size: 16px;
    color: var(--ig-text);
    line-height: 1.5;
}

.profile-bio-name {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.profile-bio-category {
    color: var(--ig-secondary-text);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.profile-bio-link {
    color: #00376b;
    font-weight: 600;
    text-decoration: none;
}

.profile-bio-link:hover {
    text-decoration: underline;
}

/* Tab Navigation Styling */
.instagram-tabs {
    border-top: 1px solid var(--ig-border);
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 28px;
}

.instagram-tab-link {
    background: none;
    border: none;
    border-top: 1px solid transparent;
    color: var(--ig-secondary-text);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 18px 0;
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-top: -1px;
    cursor: pointer;
}

.instagram-tab-link i {
    font-size: 12px;
}

.instagram-tab-link.active,
.instagram-tab-link:hover {
    border-top-color: var(--ig-text);
    color: var(--ig-text);
}

/* Post Grid Styling */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

.instagram-grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #efefef;
    cursor: pointer;
    border-radius: 4px;
}

.instagram-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.instagram-grid-item:hover .instagram-post-image {
    transform: scale(1.05);
}

/* Post Badges (Top-Right) */
.post-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #ffffff;
    font-size: 18px;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* Hover Overlay Styling */
.instagram-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}

.instagram-grid-item:hover .instagram-hover-overlay {
    opacity: 1;
}

.overlay-metrics {
    display: flex;
    gap: 30px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.overlay-metric {
    display: flex;
    align-items: center;
    gap: 7px;
}

.overlay-metric i {
    font-size: 20px;
}

/* Modal Lightbox Styling (Split-Pane layout) */
.instagram-modal .modal-content {
    border-radius: 4px;
    border: none;
    overflow: hidden;
    background-color: #ffffff;
    max-height: 90vh;
}

.instagram-modal .modal-body {
    padding: 0;
    display: flex;
    height: 600px;
    max-height: 90vh;
}

.modal-media-pane {
    flex: 1.2;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.modal-media-pane img,
.modal-media-pane video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details-pane {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
    border-left: 1px solid var(--ig-border);
}

/* Lightbox Header */
.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ig-border);
}

.details-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.details-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.details-header-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ig-text);
    text-decoration: none;
}

.details-header-follow {
    color: var(--ig-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.details-header-follow:hover {
    color: var(--ig-blue-hover);
    text-decoration: underline;
}

/* Lightbox Comments list */
.details-comments-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    font-size: 14px;
    color: var(--ig-text);
    line-height: 1.4;
    word-break: break-word;
}

.comment-username {
    font-weight: 600;
    text-decoration: none;
    color: var(--ig-text);
    margin-right: 6px;
}

.comment-username:hover {
    text-decoration: underline;
}

.comment-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ig-secondary-text);
}

.comment-like-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--ig-secondary-text);
    cursor: pointer;
    font-size: 12px;
    padding: 2px;
}

.comment-like-btn.active {
    color: #ed4956;
}

/* Lightbox Action Panel */
.details-action-panel {
    border-top: 1px solid var(--ig-border);
    padding: 12px 16px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--ig-text);
    font-size: 24px;
    padding: 0;
    cursor: pointer;
    transition: color 0.1s ease;
}

.action-btn:hover {
    color: var(--ig-secondary-text);
}

.action-btn-like.active {
    color: #ed4956 !important;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.likes-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--ig-text);
    margin-bottom: 4px;
}

.post-date-info {
    font-size: 10px;
    color: var(--ig-secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA Footer Link */
.details-cta-panel {
    border-top: 1px solid var(--ig-border);
    padding: 16px;
    background-color: #fafafa;
}

.btn-ig-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--ig-text);
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-ig-cta:hover {
    background-color: #404040;
}

/* Custom Scrollbar */
.details-comments-list::-webkit-scrollbar {
    width: 6px;
}

.details-comments-list::-webkit-scrollbar-track {
    background: transparent;
}

.details-comments-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.details-comments-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

/* Empty tag states */
.empty-tab-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ig-secondary-text);
}

.empty-tab-state i {
    font-size: 62px;
    margin-bottom: 15px;
    color: var(--ig-text);
}

.empty-tab-state h3 {
    font-size: 28px;
    font-weight: 300;
    color: var(--ig-text);
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .instagram-grid {
        gap: 10px;
    }
    .profile-avatar-container {
        width: 120px;
        height: 120px;
    }
    .profile-username-row {
        margin-bottom: 12px;
    }
    .profile-username {
        font-size: 22px;
    }
}

@media (max-width: 767.98px) {
    .instagram-profile-header {
        margin-bottom: 20px;
    }
    .profile-info {
        padding-left: 0;
        text-align: center;
        margin-top: 20px;
    }
    .profile-username-row {
        justify-content: center;
    }
    .profile-stats-row {
        justify-content: center;
        gap: 20px;
        border-top: 1px solid var(--ig-border);
        border-bottom: 1px solid var(--ig-border);
        padding: 12px 0;
    }
    .profile-stat-item {
        font-size: 14px;
        text-align: center;
        flex: 1;
    }
    .profile-stat-count {
        display: block;
    }
    .profile-bio {
        text-align: left;
        padding: 0 10px;
    }
    
    .instagram-tabs {
        gap: 30px;
    }
    .instagram-tab-link {
        font-size: 11px;
        padding: 12px 0;
    }
    
    .instagram-modal .modal-body {
        flex-direction: column;
        height: auto;
        max-height: 85vh;
    }
    .modal-media-pane {
        flex: none;
        height: 350px;
    }
    .modal-details-pane {
        flex: none;
        height: 350px;
        border-left: none;
        border-top: 1px solid var(--ig-border);
    }
    .details-comments-list {
        height: 180px;
    }
}
