/* --- SECCIÓN STACK TECNOLÓGICO --- */
.stack-section {
    padding: 100px 0;
    background: transparent;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Nuevo subtítulo */
.section-subtitle {
    text-align: center;
    color: #a0aec0;
    font-size: 1.1rem;
    margin-top: 20px;
    letter-spacing: 1px;
}

.tech-marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduje el gap aquí porque se lo daremos al track */
    margin-top: 40px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.tech-track {
    display: flex;
    gap: 25px;
    width: max-content;
    will-change: transform;
    /* ESTA ES LA CLAVE: Padding para que el hover no se recorte */
    padding: 15px 0; 
}

.track-left {
    animation: scroll-left 25s linear infinite;
}

.track-right {
    animation: scroll-right 25s linear infinite;
}

.tech-marquee-wrapper:hover .tech-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    to { transform: translateX(calc(-50% - 12.5px)); }
}

@keyframes scroll-right {
    from { transform: translateX(calc(-50% - 12.5px)); }
    to { transform: translateX(0); }
}

/* Diseño de la Píldora */
.tech-pill {
    position: relative; /* Necesario para el z-index */
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 40px;
    background: rgba(4, 31, 38, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3); /* Borde un poco más visible por defecto */
    border-radius: 50px;
    backdrop-filter: blur(8px);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.tech-pill i {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px currentColor);
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Hover sin recortes */
.tech-pill:hover {
    color: #fff;
    background: rgba(4, 31, 38, 0.95);
    border-color: var(--cyan-glow);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2), inset 0 0 15px rgba(0, 240, 255, 0.3);
    transform: translateY(-8px) scale(1.05);
    z-index: 10; /* Fuerza a la píldora a estar por encima de las demás */
}

.tech-pill:hover i {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 15px currentColor);
}

@media (max-width: 768px) {
    .tech-pill { padding: 12px 30px; font-size: 1rem; }
    .tech-pill i { font-size: 1.5rem; }
}