/* =============================================
   Tech Scroll Section - Animated Text Marquee
   ============================================= */

.tech-scroll-section {
    padding: 60px 0;
    overflow: hidden;
    position: relative;
}

.tech-scroll-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.5), transparent);
}

.tech-scroll-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.5), transparent);
}

/* Scroll Track */
.tech-scroll-track {
    display: flex;
    width: max-content;
    animation: techScroll 30s linear infinite;
}

.tech-scroll-track:hover {
    animation-play-state: paused;
}

/* Reverse direction for second row */
.tech-scroll-track.reverse {
    animation: techScrollReverse 25s linear infinite;
}

@keyframes techScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes techScrollReverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Scroll Items Container */
.tech-scroll-items {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Individual Scroll Item */
.tech-scroll-item {
    display: flex;
    align-items: center;
    padding: 0 30px;
    white-space: nowrap;
    position: relative;
}

.tech-scroll-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.tech-scroll-item:hover h3 {
    color: #26d300;
    text-shadow: 0 0 20px rgba(38, 211, 0, 0.5);
}

/* Accent Text */
.tech-scroll-item h3 span {
    color: #26d300;
    position: relative;
}

.tech-scroll-item h3 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #26d300;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tech-scroll-item:hover h3 span::after {
    transform: scaleX(1);
}

/* Separator Icon */
.tech-scroll-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 20px;
    position: relative;
}

.tech-scroll-separator::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(38, 211, 0, 0.3);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.tech-scroll-separator::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(38, 211, 0, 0.2);
    transform: rotate(45deg);
}

.tech-scroll-separator i {
    font-size: 1rem;
    color: #26d300;
    z-index: 1;
    animation: separatorPulse 2s ease-in-out infinite;
}

@keyframes separatorPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Glitch Effect on Hover */
.tech-scroll-item:hover h3::before,
.tech-scroll-item:hover h3::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tech-scroll-item:hover h3::before {
    color: #ff0040;
    animation: glitch1 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.tech-scroll-item:hover h3::after {
    color: #00fff9;
    animation: glitch2 0.3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* Binary decoration */
.tech-scroll-binary {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(38, 211, 0, 0.15);
    letter-spacing: 3px;
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
}

/* Scanline effect */
.tech-scroll-section .scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 2;
}

/* Edge fade */
.tech-scroll-wrapper {
    position: relative;
}

.tech-scroll-wrapper::before,
.tech-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 3;
    pointer-events: none;
}

.tech-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, #0a0a0a 0%, transparent 100%);
}

.tech-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, #0a0a0a 100%);
}

/* Row spacing */
.tech-scroll-row {
    margin: 15px 0;
}

.tech-scroll-row:first-child {
    margin-top: 0;
}

.tech-scroll-row:last-child {
    margin-bottom: 0;
}

/* Second row with smaller text */
.tech-scroll-row.secondary .tech-scroll-item h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.tech-scroll-row.secondary .tech-scroll-item:hover h3 {
    color: #26d300;
}

.tech-scroll-row.secondary .tech-scroll-separator::before {
    width: 30px;
    height: 30px;
}

.tech-scroll-row.secondary .tech-scroll-separator::after {
    width: 15px;
    height: 15px;
}

/* Responsive */
@media (max-width: 991px) {
    .tech-scroll-section {
        padding: 40px 0;
    }
    
    .tech-scroll-item h3 {
        font-size: 1.8rem;
    }
    
    .tech-scroll-row.secondary .tech-scroll-item h3 {
        font-size: 1.4rem;
    }
    
    .tech-scroll-wrapper::before,
    .tech-scroll-wrapper::after {
        width: 80px;
    }
}

@media (max-width: 767px) {
    .tech-scroll-item h3 {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    
    .tech-scroll-row.secondary .tech-scroll-item h3 {
        font-size: 1.1rem;
    }
    
    .tech-scroll-separator {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .tech-scroll-item {
        padding: 0 15px;
    }
    
    .tech-scroll-wrapper::before,
    .tech-scroll-wrapper::after {
        width: 50px;
    }
}
