/* Activity Feed Pulse Cards */
:root {
    --af-gap: 15px;
    --af-card-min-width: 260px;
    --af-card-max-width: 320px;
}

.dpfp-activity-feed {
    padding: 20px 0;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Modern 2025 Title */
.af-title-modern {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

.af-title-modern::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #f1c40f, #3498db);
    margin-top: 5px;
    border-radius: 2px;
    animation: af-gradient-shift 3s ease infinite;
    background-size: 200% 100%;
}

@keyframes af-gradient-shift {
    0% {
        background-position: 100% 0;
    }

    50% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

.af-en {
    display: block;
    font-size: 0.8rem;
    color: #999;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    -webkit-text-fill-color: #999;
    /* Reset text fill */
}

/* Container Visual Alignment Fix: Boxed approach */
.dpfp-activity-container {
    display: flex;
    overflow-x: auto;
    /* Custom Scrollbar for PC */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    max-width: 1200px;
    /* Match .container */
    margin: 0 auto;
    /* Center */
    padding: 10px 20px 30px 20px;
    gap: var(--af-gap);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling (Webkit) */
.dpfp-activity-container::-webkit-scrollbar {
    height: 6px;
    display: block;
    /* Force display on PC */
}

.dpfp-activity-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 10px;
}

.dpfp-activity-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: background 0.3s;
}

.dpfp-activity-container::-webkit-scrollbar-thumb:hover {
    background: rgba(4, 62, 128, 0.5);
    /* Darker on hover */
}

/* Hide scrollbar on mobile (Keep swipe feeling, but users can see indicator) */
@media (max-width: 600px) {
    .dpfp-activity-container::-webkit-scrollbar {
        display: none;
        /* Keep hidden on mobile for clean look */
    }
}

/* Card Style */
.activity-card {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px;
    text-decoration: none;
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
}

/* Indicator Stripe */
.activity-stripe {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ccc;
    /* fallback */
    border-radius: 4px 0 0 4px;
}

/* Header */
.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: #888;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    border-radius: 12px;
    padding: 3px 8px;
    background: #f0f0f0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Content */
.activity-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #2c3e50;
}

.activity-date {
    font-size: 0.75rem;
    color: #aaa;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Pulse Animation for "New" items (e.g. today) */
.activity-card.is-new::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #FF6B6B;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    animation: pulser 2s infinite;
}

@keyframes pulser {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

/* Specific Colors (injected inline or utility) */
.activity-icon {
    font-size: 0.8rem;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .activity-card {
        width: 85vw;
        /* Almost full width for better focus */
        padding: 12px;
    }

    .dpfp-activity-container {
        padding-left: 15px;
        scroll-padding-left: 15px;
        gap: 10px;
    }
}

/* Navigation Buttons (PC Only usually) */
.af-nav-btn {
    position: absolute;
    top: 50%;
    /* Center relative to wrapper */
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    color: #333;
    /* Default dark grey */
    font-size: 1.2rem;
    opacity: 0;
    /* Hidden by default, JS enables */
    pointer-events: none;
    /* Block clicks when hidden */
}

.af-nav-btn:hover {
    background: #043e80;
    /* dpfp-blue */
    color: #fff;
    box-shadow: 0 8px 16px rgba(4, 62, 128, 0.3);
    transform: translateY(-50%) scale(1.1);
    animation: none;
    /* Stop bounce on hover */
}

.af-prev {
    left: -15px;
    /* Slight overhang Left */
}

.af-next {
    right: -15px;
    /* Slight overhang Right */
    animation: bounceRight 2s infinite;
    /* Guide animation */
}

@keyframes bounceRight {

    0%,
    100% {
        transform: translate(0, -50%);
    }

    50% {
        transform: translate(5px, -50%);
    }
}

@media (max-width: 768px) {
    .af-nav-btn {
        display: none;
        /* Hide on mobile, swipe is natural */
    }
}