/* Services Section: Kinetic Timeline */
.services-timeline-section {
    padding: 4rem 0 8rem 0;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.services-timeline-section > .container {
    max-width: 100%;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.services-timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 20%, 
        rgba(255, 255, 255, 0.1) 80%, 
        transparent 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 8rem;
    position: relative;
    z-index: 2;
    padding-top: 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Kinetic Timeline Container */
.kinetic-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The Digital Thread */
.digital-thread {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    z-index: 1;
}

.thread-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 1px dashed rgba(255, 255, 255, 0.1);
}

.thread-fill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0%;
    /* Controlled by JS */
    background: linear-gradient(to bottom,
            #00f2ff,
            #0066ff);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.6),
        0 0 30px rgba(0, 102, 255, 0.4);
    border-radius: 4px;
    transition: height 0.1s linear;
}

.thread-head {
    position: absolute;
    top: 0;
    /* Controlled by JS (matches fill height) */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(0, 242, 255, 0.8);
    z-index: 2;
    opacity: 0;
    /* Hidden initially */
    transition: top 0.1s linear, opacity 0.3s ease;
}

/* Timeline Items */
.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    width: 45%;
    position: relative;
}

/* Staggered Layout */
.timeline-item.left {
    justify-content: flex-start;
}

.timeline-item.right {
    justify-content: flex-end;
}

.timeline-item.left .timeline-content {
    margin-right: 55%;
    padding-right: 3rem;
}

.timeline-item.right .timeline-content {
    margin-left: 55%;
    padding-left: 3rem;
}

/* Timeline Marker (Connection Point) */
.timeline-marker {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--background-light);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background: var(--primary-color);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
    transform: translateX(-50%) scale(1.2);
}

/* Connector Lines */
.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    right: 0;
    width: 3rem;
    height: 1px;
    background: linear-gradient(to right, var(--primary-color), rgba(59, 130, 246, 0.1));
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    left: 0;
    width: 3rem;
    height: 1px;
    background: linear-gradient(to left, var(--primary-color), rgba(59, 130, 246, 0.1));
}

/* Service Card Styling (Adapted for Timeline) */
.service-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.service-image img,
.service-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img,
.service-card:hover .service-image video {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.play-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.service-card:hover .play-icon {
    transform: scale(1);
}

.service-info {
    padding: 1.5rem;
}

.service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.service-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

.service-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.service-features {
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.feature-item i {
    color: #10b981;
    font-size: 0.75rem;
}

.feature-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.service-btn {
    width: auto;
    min-width: 220px;
    height: 52px;
    padding: 0 2.25rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(15, 23, 42, 0.2);
    border-radius: 14px;
    color: #ffffff;
    font-weight: 650;
    font-size: 1rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    justify-content: center;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-btn span {
    transition: transform 0.3s ease;
}

.service-btn i {
    transition: transform 0.3s ease;
}

.service-btn:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(59, 130, 246, 0.25),
        0 0 24px rgba(59, 130, 246, 0.15);
    color: #ffffff;
}

.service-btn:hover span {
    transform: translateX(4px);
}

.service-btn:hover i {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .kinetic-timeline {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .digital-thread {
        left: 2rem;
        transform: none;
    }

    .thread-line {
        left: 2rem;
        transform: none;
    }

    .thread-glow {
        left: 2rem;
        transform: none;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 3rem;
        width: auto;
        margin-bottom: 3rem;
    }

    .timeline-item.left,
    .timeline-item.right {
        justify-content: flex-start;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .timeline-marker {
        left: 2rem;
        transform: none;
        margin-left: -8px;
    }

    .timeline-item:hover .timeline-marker {
        transform: scale(1.2);
        margin-left: -8px;
    }

    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after {
        display: none;
    }
}
