/* Frontend Styles for Freelancer Projects */
.flp-frontend-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filters */
.flp-frontend-filters {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.flp-filter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flp-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.flp-filter-row input,
.flp-filter-row select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.flp-filter-row input:focus,
.flp-filter-row select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.flp-filter-submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flp-filter-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.flp-filter-checkboxes {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.flp-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
}

.flp-filter-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007cba;
}

/* Projects List */
.flp-projects-list {
    display: grid;
    gap: 24px;
}

.flp-project-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.flp-project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.flp-project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-color: #007cba;
}

.flp-project-item:hover::before {
    transform: scaleX(1);
}

.flp-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.flp-project-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
    margin-right: 16px;
}

.flp-project-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.flp-project-title a:hover {
    color: #007cba;
}

.flp-project-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flp-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.flp-featured {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.flp-urgent {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.flp-nda {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.flp-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #007cba;
}

.flp-budget {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flp-budget-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flp-budget-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.flp-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.flp-score-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flp-score-value {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}

.flp-score-high {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.flp-score-medium {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.flp-score-low {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.flp-project-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.flp-project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.flp-project-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.flp-stat {
    font-size: 13px;
    color: #6c757d;
}

.flp-stat strong {
    color: #2c3e50;
    font-weight: 600;
}

.flp-project-actions {
    display: flex;
    gap: 12px;
}

.flp-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.flp-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
}

.flp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: white;
    text-decoration: none;
}

.flp-btn-secondary {
    background: #fff;
    color: #007cba;
    border: 2px solid #007cba;
}

.flp-btn-secondary:hover {
    background: #007cba;
    color: white;
    transform: translateY(-1px);
}

.flp-favorite-toggle {
    position: relative;
}

.flp-heart {
    font-size: 16px;
    transition: all 0.3s ease;
}

.flp-heart.flp-favorited {
    color: #e74c3c;
    animation: heartbeat 0.6s ease-in-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Load More */
.flp-load-more {
    text-align: center;
    margin-top: 32px;
}

.flp-load-more-btn {
    padding: 14px 32px;
    font-size: 16px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flp-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* No Projects */
.flp-no-projects {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.flp-no-projects p {
    margin: 0;
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
}

/* Loading States */
.flp-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.flp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .flp-frontend-container {
        padding: 16px;
    }
    
    .flp-filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .flp-filter-checkboxes {
        flex-direction: column;
        gap: 12px;
    }
    
    .flp-project-item {
        padding: 20px;
    }
    
    .flp-project-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .flp-project-title {
        margin-right: 0;
        font-size: 18px;
    }
    
    .flp-project-meta {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .flp-project-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .flp-project-stats {
        justify-content: center;
        gap: 16px;
    }
    
    .flp-project-actions {
        flex-direction: column;
    }
    
    .flp-btn {
        justify-content: center;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .flp-project-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .flp-project-badges {
        justify-content: center;
    }
    
    .flp-budget-amount {
        font-size: 16px;
    }
}

/* Accessibility */
.flp-btn:focus,
.flp-filter-row input:focus,
.flp-filter-row select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .flp-project-item {
        border-width: 2px;
    }
    
    .flp-btn-primary {
        background: #000;
    }
    
    .flp-btn-secondary {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .flp-project-item,
    .flp-btn,
    .flp-heart,
    .flp-filter-submit {
        transition: none;
    }
    
    .flp-project-item:hover {
        transform: none;
    }
    
    .flp-heart.flp-favorited {
        animation: none;
    }
}

/* Print styles */
@media print {
    .flp-frontend-filters,
    .flp-project-actions,
    .flp-load-more {
        display: none;
    }
    
    .flp-project-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}