/* ============================================================
   AVAILABLE TASKS SECTION CSS
   Metbaber - Tasks Marketplace Styling
   ============================================================ */

/* CSS Variables (inherited from main) */
:root {
    --brand-red: #C8251E;
    --brand-red-dark: #A01A14;
    --brand-red-light: #E05050;
    --brand-gold: #C4882A;
    --brand-ink: #18110A;
    --brand-ink-muted: #6A5840;
    --brand-ink-faint: #A0896F;
    --brand-cream: #F9F5EE;
    --brand-cream-warm: #F2EAD8;
    --font-serif: 'Instrument Serif', 'DM Serif Display', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.12);
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ============================================================
   FILTER BUTTONS
   ============================================================ */
.tasks-filter-btn {
    padding: 8px 20px;
    border: 1.5px solid rgba(24, 17, 10, 0.12);
    background: white;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--brand-ink-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tasks-filter-btn:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
    transform: translateY(-2px);
}

.tasks-filter-btn.active {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: white;
    box-shadow: 0 4px 12px rgba(200, 37, 30, 0.25);
}

/* ============================================================
   TASKS GRID
   ============================================================ */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin: 40px 0;
}

/* Task Card */
.tasks-card {
    position: relative;
    animation: fadeInUp 0.5s ease backwards;
}

.tasks-card-inner {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tasks-card-inner:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* Card Accent Bar */
.tasks-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 2;
}

/* Task Number */
.tasks-card-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1;
    color: rgba(24, 17, 10, 0.06);
    z-index: 2;
    pointer-events: none;
}

/* Task Image */
.tasks-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.tasks-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.tasks-card-inner:hover .tasks-card-image img {
    transform: scale(1.05);
}

.tasks-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 10, 4, 0.5) 0%, transparent 50%);
    pointer-events: none;
}

/* Urgent Badge */
.tasks-card-urgent {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-red);
    color: white;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

/* Platform Badge */
.tasks-card-platform {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(18, 10, 4, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.tasks-card-platform i {
    font-size: 12px;
}

/* Task Content */
.tasks-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tasks-card-description {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--brand-ink-muted);
    margin-bottom: 16px;
    flex: 1;
}

/* Progress Bar */
.tasks-card-progress {
    margin-bottom: 16px;
}

.tasks-card-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--brand-ink-faint);
}

.tasks-card-progress-header span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tasks-card-progress-header .urgent {
    color: var(--brand-red);
    font-weight: 700;
}

.tasks-card-progress-bar {
    height: 6px;
    background: rgba(200, 37, 30, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.tasks-card-progress-bar div {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* Divider */
.tasks-card-divider {
    height: 1px;
    background: rgba(196, 136, 42, 0.12);
    margin: 12px 0;
}

/* Footer */
.tasks-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tasks-card-slots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(200, 37, 30, 0.08);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--brand-red);
    margin-bottom: 8px;
}

.tasks-card-price {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--brand-red);
    line-height: 1.2;
}

.tasks-card-price small {
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 400;
    opacity: 0.7;
}

.tasks-card-btn {
    background: var(--brand-red);
    border: none;
    border-radius: 9999px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tasks-card-btn:hover {
    transform: scale(1.05);
    opacity: 0.88;
    filter: brightness(1.05);
}

/* Empty State */
.tasks-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 32px;
    grid-column: 1 / -1;
}

.tasks-empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(200, 37, 30, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tasks-empty-icon i {
    font-size: 2.5rem;
    color: var(--brand-red);
}

.tasks-empty h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--brand-ink);
}

.tasks-empty p {
    color: var(--brand-ink-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* View All Button */
.tasks-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 20px 0 40px;
}

.tasks-view-all-line {
    flex: 1;
    height: 1px;
    background: rgba(196, 136, 42, 0.25);
}

/* Stats Footer */
.tasks-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    padding: 32px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(196, 136, 42, 0.12);
}

.tasks-stat {
    text-align: center;
}

.tasks-stat-value {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--brand-red);
    margin-bottom: 6px;
}

.tasks-stat-label {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--brand-ink-muted);
    letter-spacing: 0.05em;
}

/* ============================================================
   FILTER ANIMATIONS
   ============================================================ */
.tasks-card {
    transition: all 0.3s ease;
}

.tasks-card.filter-hidden {
    display: none;
}

.tasks-card.filter-visible {
    display: block;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 992px) {
    .tasks-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
    
    .tasks-filter-btn {
        padding: 6px 16px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .tasks-filter-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tasks-card-image {
        height: 160px;
    }
    
    .tasks-stats {
        gap: 16px;
    }
    
    .tasks-stat-value {
        font-size: 1.4rem;
    }
    
    .tasks-view-all {
        gap: 16px;
    }
    
    .tasks-view-all .btn {
        padding: 10px 24px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .d-flex.align-items-end.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .tasks-filter-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .tasks-card-content {
        padding: 16px;
    }
    
    .tasks-card-description {
        font-size: 12px;
    }
    
    .tasks-card-price {
        font-size: 1.1rem;
    }
    
    .tasks-card-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Skeleton Animation */
.tasks-card.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Hover Effects */
.tasks-card-inner {
    will-change: transform;
}

/* Focus States for Accessibility */
.tasks-card-btn:focus-visible,
.tasks-filter-btn:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}