/* ========== REFERENCES TIMELINE SECTION ========== */
.references-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

.reference-item {
    position: relative;
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.reference-item:nth-child(1) { animation-delay: 0.1s; }
.reference-item:nth-child(2) { animation-delay: 0.2s; }
.reference-item:nth-child(3) { animation-delay: 0.3s; }
.reference-item:nth-child(4) { animation-delay: 0.4s; }
.reference-item:nth-child(5) { animation-delay: 0.5s; }
.reference-item:nth-child(6) { animation-delay: 0.6s; }
.reference-item:nth-child(7) { animation-delay: 0.7s; }
.reference-item:nth-child(8) { animation-delay: 0.8s; }
.reference-item:nth-child(9) { animation-delay: 0.9s; }
.reference-item:nth-child(10) { animation-delay: 1s; }

.timeline-marker {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.marker-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.reference-item:hover .marker-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.3);
}

.marker-line {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.1));
    margin-top: 8px;
}

.reference-item:last-child .marker-line {
    display: none;
}

.reference-content-card {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.reference-content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.reference-badge {
    position: absolute;
    top: -12px;
    right: 30px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reference-badge.ongoing {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.reference-badge.completed {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-color);
}

.client-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.client-logo.whh {
    background: linear-gradient(135deg, #059669, #047857);
}

.client-logo.oxfam {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.client-logo.ngo {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.client-logo.ecommerce {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.client-info {
    flex: 1;
}

.client-info h3 {
    margin: 0 0 5px 0;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.period i {
    color: var(--primary-color);
}

.project-title {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.project-description {
    margin: 0 0 20px 0;
    color: var(--secondary-text-color);
    font-size: 1rem;
    line-height: 1.7;
}

.reference-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--light-color);
}

.contact-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1rem;
}

.regions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.region-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.05));
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.region-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

.region-tag i {
    font-size: 0.75rem;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.client-card {
    text-align: center;
    padding: 40px 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.client-card:hover::before {
    transform: scaleX(1);
}

.client-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.2);
}

.client-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.client-card:hover .client-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.client-icon-wrapper.ong {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.client-icon-wrapper.institutions {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.client-icon-wrapper.international {
    background: linear-gradient(135deg, #059669, #047857);
}

.client-icon-wrapper.entreprises {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.client-card h4 {
    margin: 0 0 12px 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.client-card p {
    margin: 0;
    color: var(--secondary-text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .references-timeline {
        max-width: 100%;
        padding: 30px 20px;
    }
    
    .reference-content-card {
        padding: 25px;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .reference-item {
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .timeline-marker {
        width: 30px;
    }
    
    .marker-dot {
        width: 16px;
        height: 16px;
    }
    
    .reference-content-card {
        padding: 20px;
    }
    
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .client-logo {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .client-info h3 {
        font-size: 1.1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.95rem;
    }
    
    .reference-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .regions-tags {
        margin-left: 0;
        width: 100%;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .references-timeline {
        padding: 20px 10px;
    }
    
    .reference-item {
        gap: 15px;
    }
    
    .timeline-marker {
        width: 25px;
    }
    
    .marker-dot {
        width: 14px;
        height: 14px;
    }
    
    .reference-content-card {
        padding: 18px;
    }
    
    .reference-badge {
        top: -10px;
        right: 18px;
        padding: 5px 12px;
        font-size: 0.75rem;
    }
    
    .client-logo {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .client-info h3 {
        font-size: 1rem;
    }
    
    .period {
        font-size: 0.85rem;
    }
    
    .project-title {
        font-size: 1rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .contact-info {
        font-size: 0.85rem;
        width: 100%;
    }
    
    .region-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}
