/**
 * BIOINTE - FEED STYLES
 * Posts, Stories, Comments, Feed Layout
 */

/* ==========================================
   PROFILE CARD (SIDEBAR)
   ========================================== */

.profile-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.profile-cover {
    height: 80px;
    overflow: hidden;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    padding: 0 20px 20px;
    text-align: center;
}

.profile-avatar-wrapper {
    margin-top: -40px;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.profile-name {
    font-size: 18px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-headline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-stats-mini {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.btn-view-profile {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    font-size: 14px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-fast);
}

.btn-view-profile:hover {
    background: var(--gradient-primary);
    color: white;
}

/* ==========================================
   QUICK LINKS CARD
   ========================================== */

.quick-links-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.quick-links-card h4 {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.quick-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.quick-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.quick-link svg {
    flex-shrink: 0;
}

.quick-link .badge,
.quick-link .amount {
    margin-left: auto;
    font-size: 12px;
    font-weight: var(--font-semibold);
}

.quick-link .badge {
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
}

.quick-link .amount {
    color: var(--success);
}

/* ==========================================
   TRENDING CARD
   ========================================== */

.trending-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.trending-card h4 {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    transition: all var(--transition-fast);
}

.trending-item:hover {
    padding-left: 8px;
}

.trending-topic {
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--primary);
}

.trending-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==========================================
   STORIES SECTION
   ========================================== */

.stories-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.story-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.story-item:hover .story-avatar {
    transform: scale(1.05);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: -1;
}

.add-story .story-avatar {
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.story-item span {
    font-size: 12px;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   CREATE POST CARD
   ========================================== */

.create-post-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.create-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.create-post-input {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.create-post-input:hover,
.create-post-input:focus {
    background: var(--bg-active);
}

.create-post-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    font-size: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.post-action-btn.active {
    color: var(--primary);
}

.post-action-btn svg {
    flex-shrink: 0;
}

/* ==========================================
   POST CARD
   ========================================== */

.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: slideInUp var(--transition-base);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    position: relative;
}

.post-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.separator {
    color: var(--text-tertiary);
}

.post-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.post-content {
    padding: 0 20px 16px;
}

.post-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    color: var(--primary);
    font-size: 14px;
    font-weight: var(--font-medium);
    transition: opacity var(--transition-fast);
}

.post-tag:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.post-media {
    margin-bottom: 16px;
    overflow: hidden;
}

.post-media img {
    width: 100%;
    height: auto;
    display: block;
}

.video-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.post-stat svg {
    color: var(--text-tertiary);
}

.post-actions {
    display: flex;
    padding: 8px 12px;
}

.post-actions .post-action-btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
}

.post-actions .post-action-btn.active {
    color: var(--primary);
}

.post-actions .post-action-btn.active svg {
    fill: var(--primary);
}

/* ==========================================
   POST COMMENTS
   ========================================== */

.post-comments {
    padding: 20px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border-light);
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-header strong {
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.comment-header span {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-content p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: var(--font-semibold);
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
}

.comment-actions button:hover {
    color: var(--primary);
}

.comment-likes {
    color: var(--text-tertiary);
}

.write-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.comment-input {
    flex: 1;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-comment-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.send-comment-btn:hover {
    transform: scale(1.1);
}

/* ==========================================
   LOAD MORE
   ========================================== */

.load-more-section {
    text-align: center;
    padding: 32px 0;
}

.btn-load-more {
    padding: 14px 32px;
    background: white;
    color: var(--primary);
    font-weight: var(--font-semibold);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-load-more:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

/* ==========================================
   SUGGESTIONS CARD (SIDEBAR RIGHT)
   ========================================== */

.suggestions-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.suggestions-card h4 {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-info strong {
    display: block;
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-info span {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-info small {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.btn-connect {
    padding: 6px 16px;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: var(--font-semibold);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-connect:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================
   EVENTS CARD
   ========================================== */

.events-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.events-card h4 {
    font-size: 16px;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.event-item:hover {
    background: var(--bg-hover);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.event-day {
    font-size: 20px;
    font-weight: var(--font-bold);
    color: white;
    line-height: 1;
}

.event-month {
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

.event-info {
    flex: 1;
}

.event-info strong {
    display: block;
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.event-info span {
    font-size: 13px;
    color: var(--text-secondary);
}

.view-all-link {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 12px;
    color: var(--primary);
    font-size: 14px;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.view-all-link:hover {
    background: var(--bg-hover);
}

/* ==========================================
   PREMIUM CARD
   ========================================== */

.premium-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 11px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.premium-card h4 {
    font-size: 20px;
    font-weight: var(--font-bold);
    color: white;
    margin-bottom: 12px;
}

.premium-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-premium {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary);
    font-weight: var(--font-bold);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   CREATE POST MODAL
   ========================================== */

.modal-post {
    max-width: 700px;
}

.post-creator-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.post-creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.post-visibility {
    padding: 4px 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
}

.post-textarea {
    width: 100%;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    resize: vertical;
    margin-bottom: 16px;
    transition: border-color var(--transition-fast);
}

.post-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.post-media-preview {
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-media-preview img {
    width: 100%;
    height: auto;
}

.post-creator-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
}

.media-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    font-size: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.media-btn:hover {
    background: var(--bg-active);
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================
   SKELETON LOADING
   ========================================== */

.post-skeleton {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
}

.skeleton-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-active);
}

.skeleton-info {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    background: var(--bg-active);
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-content {
    margin-bottom: 16px;
}

.skeleton-image {
    width: 100%;
    height: 300px;
    background: var(--bg-active);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
}

.animate-on-scroll.animate-in {
    animation: slideInUp 0.5s ease forwards;
}

/* Stagger animation for multiple items */
.post-card:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.3s; }
.post-card:nth-child(5) { animation-delay: 0.4s; }

/* ==========================================
   RESPONSIVE - FEED
   ========================================== */

@media (max-width: 768px) {
    .stories-container {
        gap: 8px;
    }
    
    .story-avatar {
        width: 56px;
        height: 56px;
    }
    
    .create-post-card {
        padding: 16px;
    }
    
    .post-card {
        border-radius: var(--radius-md);
    }
    
    .post-header {
        padding: 16px;
    }
    
    .post-content {
        padding: 0 16px 12px;
    }
    
    .post-stats {
        padding: 10px 16px;
    }
    
    .post-actions .post-action-btn span {
        display: none;
    }
    
    .post-comments {
        padding: 16px;
    }
    
    .modal-post {
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media (max-width: 640px) {
    .post-creator-actions {
        flex-wrap: wrap;
    }
    
    .media-btn span {
        display: none;
    }
    
    .event-date {
        width: 48px;
        height: 48px;
    }
    
    .event-day {
        font-size: 18px;
    }
}