/**
 * Homepage Sections CSS
 * Styles for Platform Stats, Completed Series, and Community Feed
 */

/* ========== PLATFORM STATISTICS SECTION ========== */
.platform-stats-section {
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.platform-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(35, 35, 35, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e50914, #ff3333);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 9, 20, 0.4);
    box-shadow: 0 8px 32px rgba(229, 9, 20, 0.15);
}

.stat-icon {
    font-size: 40px;
    color: #e50914;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin: 8px 0;
    line-height: 1;
    font-family: 'Roboto', Arial, sans-serif;
}

.stat-label {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Responsive stats grid */
@media (max-width: 991px) {
    .platform-stats-grid {
        gap: 16px;
        padding: 0 12px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .platform-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 0 12px;
    }

    .stat-card {
        padding: 16px 8px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
}

/* ========== COMPLETED SERIES SECTION ========== */
.completed-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e50914 0%, #c40812 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

/* ========== COMMUNITY ACTIVITY FEED ========== */
.community-feed-section {
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.community-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 20px;
}

.community-feed-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.community-feed-header h2 i {
    color: #e50914;
    font-size: 24px;
}

.community-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.activity-card {
    background: linear-gradient(135deg, rgba(35, 35, 35, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 14px;
}

.activity-card:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 9, 20, 0.4);
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.15);
}

.activity-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.activity-username {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.activity-username:hover {
    color: #e50914;
}

.activity-type {
    font-size: 12px;
    color: #999;
}

.activity-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffa500;
    font-size: 12px;
    margin-left: 6px;
}

.activity-rating i {
    font-size: 11px;
}

.activity-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-project-link {
    font-size: 12px;
    color: #e50914;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.activity-project-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.activity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-time {
    font-size: 11px;
    color: #666;
}

/* Social post card specific styles */
.activity-card.post-activity .activity-text {
    font-style: normal;
}

/* Review card specific styles */
.activity-card.review-activity .activity-text {
    font-style: italic;
    color: #b3b3b3;
}

/* Post image preview */
.activity-image-preview {
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    max-height: 150px;
}

.activity-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Project thumbnail for reviews */
.activity-project-thumbnail {
    width: 80px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.activity-project-thumbnail:hover {
    border-color: rgba(229, 9, 20, 0.6);
    transform: scale(1.05);
}

.activity-project-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.activity-project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive community feed */
@media (max-width: 768px) {
    .community-feed-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .community-feed-header h2 {
        font-size: 24px;
    }

    .activity-card {
        padding: 16px;
    }

    .activity-avatar {
        width: 42px;
        height: 42px;
    }
}

/* ========== ANIMATION UTILITIES ========== */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animate {
    animation: countUp 0.5s ease-out;
}

/* Social post thumbnail (300px wide, auto height) */
.activity-social-thumbnail {
    width: 120px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.activity-social-thumbnail:hover {
    border-color: rgba(229, 9, 20, 0.6);
    transform: scale(1.05);
}

.activity-social-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.activity-social-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Media count badge (+N indicator) */
.media-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}
