/* ==========================================================================
   INTERACTIVE ELEMENTS & WOW FACTORS
   ========================================================================== */

/* Live Code Preview */
.live-code-preview {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.code-window {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 32px 128px rgba(0, 0, 0, 0.12);
    max-width: 500px;
    width: 100%;
}

.window-header {
    background: #2d2d2d;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.window-title {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-line {
    display: flex;
    margin-bottom: 0.5rem;
}

.line-number {
    color: #666;
    width: 30px;
    text-align: right;
    margin-right: 1rem;
    user-select: none;
}

.keyword { color: #c678dd; }
.variable { color: #e06c75; }
.string { color: #98c379; }
.function { color: #61afef; }
.comment { color: #5c6370; }

/* Live Code Preview Typing Animation */
.typing-line {
    position: relative;
}

.typing-line .code-text {
    position: relative;
    display: inline-block;
}

.typed-text {
    color: #61afef;
}

.cursor {
    animation: blink 1s infinite;
    color: #61afef;
    font-weight: bold;
    display: inline-block;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Project Timeline */
.project-timeline {
    margin-top: 4rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.timeline-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1A1A1A;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #2563EB, #3B82F6);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 3rem;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 3rem;
    margin-right: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #2563EB;
    background: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-dot.active {
    background: #2563EB;
    animation: pulse 2s infinite;
}

.timeline-dot.completed {
    background: #3B82F6;
    border-color: #3B82F6;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.timeline-content {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid #E8E8E8;
    flex: 1;
    max-width: 350px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.08);
}

.timeline-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1A1A1A;
}

.timeline-content p {
    color: #666666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.timeline-tech {
    font-size: 0.85rem;
    color: #2563EB;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: inline-block;
}

/* Case Studies Grid */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.case-study-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid #E8E8E8;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #2563EB;
}

.case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.08);
}

.case-study-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.case-study-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.case-study-meta h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1A1A1A;
}

.case-study-meta p {
    color: #666666;
    font-size: 0.9rem;
}

.case-study-quote {
    font-style: italic;
    line-height: 1.6;
    color: #1A1A1A;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.case-study-results {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #E8E8E8;
}

.result-item {
    text-align: center;
}

.result-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563EB;
    margin-bottom: 0.25rem;
}

.result-label {
    font-size: 0.85rem;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Client Stories Section */
.client-stories-section {
    padding: 6rem 0;
    background: #F8F9FA;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .live-code-preview {
        margin-top: 2rem;
    }
    
    .code-window {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: row;
        text-align: left;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
        max-width: none;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .case-study-results {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}